Class PredicateValidator
java.lang.Object
com.darkcollective.relix.semantic.internal.PredicateValidator
- All Implemented Interfaces:
PredicateVisitor<Void>
Validates attribute references and function calls within a predicate tree.
Used by RelAlgebraValidator to check the boolean conditions that
appear in:
- Selection nodes (σ) — predicate checked against the input relation's schema.
- Conditioned join nodes (⋈, ⟕, ⟖, ⟗, ⋉, ▷) — predicate checked against the combined left+right schema produced by the visitor's schema concatenation.
Checks performed
AttributeOperand— the column name (qualifier stripped) must exist in the available schema.FunctionCall— the function must be registered in the symbol table, and the argument count must match at least one overload. Arguments are recursively validated.- Compound operands (
BinaryArithmeticExpression,UnaryOperand,SetLiteralOperand) — recursed into. - Compound predicates (
AndPredicate,OrPredicate,NotPredicate) — recursed into. - Literals (
NumberOperand,StringOperand,BooleanOperand) — no checks needed.
All errors are appended to the mutable errors list supplied at
construction time; the visitor never throws.
-
Method Summary
Modifier and TypeMethodDescriptionvisit(AndPredicate node) Visits a logical conjunction (∧).visit(ComparisonPredicate node) Visits a comparison predicate (=, ≠, <, ≤, >, ≥).visit(ElementOfPredicate node) Visits a set-membership test (∈ or ∉).visit(NotPredicate node) Visits a logical negation (¬).visit(NullPredicate node) Visits a null test (= ⊥ or ≠ ⊥).visit(OrPredicate node) Visits a logical disjunction (∨).visit(PatternPredicate node) Visits a pattern-matching test (LIKE or NOT LIKE).
-
Method Details
-
visit
Description copied from interface:PredicateVisitorVisits a logical conjunction (∧).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a logical disjunction (∨).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a logical negation (¬).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a comparison predicate (=, ≠, <, ≤, >, ≥).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a null test (= ⊥ or ≠ ⊥).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a set-membership test (∈ or ∉).- Specified by:
visitin interfacePredicateVisitor<Void>
-
visit
Description copied from interface:PredicateVisitorVisits a pattern-matching test (LIKE or NOT LIKE).- Specified by:
visitin interfacePredicateVisitor<Void>
-