Class PromqlParserUtils

java.lang.Object
org.elasticsearch.xpack.esql.parser.promql.PromqlParserUtils

public class PromqlParserUtils extends Object
  • Method Details

    • parseDuration

      public static Duration parseDuration(Source source, String string)
    • adjustSource

      public static Source adjustSource(Source source, int startLine, int startColumn)
      Adjusts the location of the source by the line and column offsets.
      See Also:
    • adjustLocation

      public static Location adjustLocation(Location location, int startLine, int startColumn)
      Adjusts the location by the line and column offsets. The PromQL query inside the PROMQL command is parsed separately, so its line and column numbers need to be adjusted to match their position inside the full ES|QL query.
    • adjustParsingException

      public static ParsingException adjustParsingException(ParsingException pe, int promqlStartLine, int promqlStartColumn)
      Adjusts the line and column numbers of the given ParsingException by the provided offsets. The PromQL query inside the PROMQL command is parsed separately, so its line and column numbers need to be adjusted to match their position inside the full ES|QL query.
    • parseDate

      public static Instant parseDate(Source source, String value)