Class Verifier

java.lang.Object
org.elasticsearch.xpack.esql.analysis.Verifier

public class Verifier extends Object
This class is part of the planner. Responsible for failing impossible queries with a human-readable error message. In particular, this step does type resolution and fails queries based on invalid type expressions.
  • Constructor Details

  • Method Details

    • licenseState

      public XPackLicenseState licenseState()
    • validateBinaryComparison

      public static Failure validateBinaryComparison(BinaryComparison bc)
      Limit QL's comparisons to types we support. This should agree with EsqlBinaryComparison's checkCompatibility method
      Returns:
      null if the given binary comparison has valid input types, otherwise a failure message suitable to return to the user.
    • validateUnsignedLongOperator

      public static Failure validateUnsignedLongOperator(BinaryOperator<?,?,?,?> bo)
      Ensure that UNSIGNED_LONG types are not implicitly converted when used in arithmetic binary operator, as this cannot be done since: - unsigned longs are passed through the engine as longs, so/and - negative values cannot be represented (i.e. range [Long.MIN_VALUE, "abs"(Long.MIN_VALUE) + Long.MAX_VALUE] won't fit on 64 bits); - a conversion to double isn't possible, since upper range UL values can no longer be distinguished ex: (double) 18446744073709551615 == (double) 18446744073709551614 - the implicit ESQL's Cast doesn't currently catch Exception and nullify the result. Let the user handle the operation explicitly.