Interface PostOptimizationVerificationAware
- All Known Implementing Classes:
Bucket,FoldablesConvertFunction,Match,MatchOperator,MvSort,OrderBy,Term,ToDatePeriod,ToTimeDuration
public interface PostOptimizationVerificationAware
Interface implemented by expressions that require validation post logical optimization,
when the plan and references have been not just resolved but also replaced.
-
Method Summary
Modifier and TypeMethodDescriptionvoidpostOptimizationVerification(Failures failures) Validates the implementing expression - discovered failures are reported to the givenFailuresclass.
-
Method Details
-
postOptimizationVerification
Validates the implementing expression - discovered failures are reported to the givenFailuresclass.Example: the
Bucketfunction, which produces buckets over a numerical or date field, based on a number of literal arguments needs to check if its arguments are all indeed literals. This is how this verification is performed:@Override public void postOptimizationVerification(Failures failures) { String operation = sourceText(); failures.add(isFoldable(buckets, operation, SECOND)) .add(from != null ? isFoldable(from, operation, THIRD) : null) .add(to != null ? isFoldable(to, operation, FOURTH) : null); }
-