Package dev.frostlake.executor
Class MergeRowShape
java.lang.Object
dev.frostlake.executor.MergeRowShape
The MERGE evaluation shape for one (source table, target table, aliases) combination: the merged
__MERGE__ table exposing alias.col / tablename.col / bare-name slots, one
ExpressionEvaluator over it, and the slot mapping that refills a values list per
source/target row pair. Everything here is invariant per MERGE statement — it used to be rebuilt
for every candidate PAIR (a fresh column list, Table (with its name-index map), and
evaluator per pair, up to three cross-product passes deep).
Two modes mirror the two former builders exactly, slot for slot: the CONDITION shape (source
qualified-only, target qualified + bare) and the VALUE shape (source additionally exposed under a
__S__ bare prefix, and optionally re-exposed bare LAST so a WHEN-NOT-MATCHED insert
resolves unqualified names to the SOURCE via the name index's last-wins rule).
-
Method Summary
Modifier and TypeMethodDescriptionstatic MergeRowShapebuild(Table targetTable, Table sourceTable, String targetAlias, String sourceAlias, boolean valueMode, boolean unqualifiedFromSource, FunctionRegistry functionRegistry, Catalog catalog, QueryExecutor executor) Evaluateexprover the merged row for this pair (refills only the values list).
-
Method Details
-
build
public static MergeRowShape build(Table targetTable, Table sourceTable, String targetAlias, String sourceAlias, boolean valueMode, boolean unqualifiedFromSource, FunctionRegistry functionRegistry, Catalog catalog, QueryExecutor executor) -
evaluate
Evaluateexprover the merged row for this pair (refills only the values list). -
mergedTable
-