Class TupleInExpression
java.lang.Object
dev.frostlake.executor.expressions.TupleInExpression
- All Implemented Interfaces:
Expression
Row-constructor
IN test: (a, b) IN (SELECT x, y ...),
(a, b) IN ((1, 2), (3, 4)), or the type-invalid flat spelling (a, b) IN (1, 2).
The three right-hand shapes carry different live-verified semantics. The SUBQUERY form is
TWO-VALUED: a NULL on either side never matches and never yields UNKNOWN — a miss is plain FALSE
for IN and TRUE for NOT IN. The tuple-ROW list form applies full row-value
three-valued logic (a row with a definite pair mismatch is FALSE, an all-equal row TRUE, anything
else UNKNOWN). The FLAT scalar list is a compile-time type error ("Invalid argument types for
function 'IN'") — it is parsed only so the refusal can name the ROW shape the way Snowflake does.
-
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) Accept a visitor for the visitor patternbooleanbooleanbooleanbooleanisNot()static TupleInExpressionofFlatList(List<Expression> values, List<Expression> flatListValues, boolean not) static TupleInExpressionofSubquery(List<Expression> values, SubqueryExpression subquery, boolean not) static TupleInExpressionofTupleRows(List<Expression> values, List<List<Expression>> tupleRows, boolean not)
-
Method Details
-
ofTupleRows
public static TupleInExpression ofTupleRows(List<Expression> values, List<List<Expression>> tupleRows, boolean not) -
ofFlatList
public static TupleInExpression ofFlatList(List<Expression> values, List<Expression> flatListValues, boolean not) -
ofSubquery
public static TupleInExpression ofSubquery(List<Expression> values, SubqueryExpression subquery, boolean not) -
getValues
-
getTupleRows
-
getFlatListValues
-
getSubquery
-
hasSubquery
public boolean hasSubquery() -
hasTupleRows
public boolean hasTupleRows() -
hasFlatList
public boolean hasFlatList() -
isNot
public boolean isNot() -
accept
Description copied from interface:ExpressionAccept a visitor for the visitor pattern- Specified by:
acceptin interfaceExpression
-