Interface PostAnalysisVerificationAware

All Known Implementing Classes:
Aggregate, ChangePoint, Completion, Dissect, Eval, Filter, Grok, InlineJoin, Join, LookupJoin, OrderBy, RegexExtract, Row

public interface PostAnalysisVerificationAware
Interface implemented by expressions or plans that require validation after query plan analysis, when the indices and references have been resolved, but before the plan is transformed further by optimizations. The interface is similar to PostAnalysisPlanVerificationAware, but focused on individual expressions or plans, typically covering syntactic checks.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Allows the implementer to validate itself.
  • Method Details

    • postAnalysisVerification

      void postAnalysisVerification(Failures failures)
      Allows the implementer to validate itself. This usually involves checking its internal setup, which often means checking the parameters it received on construction: their data or syntactic type, class, their count, expressions' structure etc. The discovered failures are added to the given Failures object.

      It is often more useful to perform the checks as extended as it makes sense, over stopping at the first failure. This will allow the author to progress faster to a correct query.

      Example: the Filter class, which models the WHERE command, checks that the expression it filters on - condition - is of a Boolean or NULL type:

           
           @Override
           void postAnalysisVerification(Failures failures) {
                if (condition.dataType() != NULL && condition.dataType() != BOOLEAN) {
                    failures.add(fail(condition, "Condition expression needs to be boolean, found [{}]", condition.dataType()));
                }
           }
           
           
      Parameters:
      failures - the object to add failures to.