@quereus/quereus 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/src/core/database-events.d.ts +99 -1
- package/dist/src/core/database-events.d.ts.map +1 -1
- package/dist/src/core/database-events.js +219 -3
- package/dist/src/core/database-events.js.map +1 -1
- package/dist/src/core/database-materialized-views-plan-builders.d.ts.map +1 -1
- package/dist/src/core/database-materialized-views-plan-builders.js +29 -2
- package/dist/src/core/database-materialized-views-plan-builders.js.map +1 -1
- package/dist/src/core/database-transaction.d.ts +9 -0
- package/dist/src/core/database-transaction.d.ts.map +1 -1
- package/dist/src/core/database-transaction.js +9 -0
- package/dist/src/core/database-transaction.js.map +1 -1
- package/dist/src/core/database.d.ts +7 -1
- package/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +20 -5
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/func/builtins/aggregate.js +11 -11
- package/dist/src/func/builtins/aggregate.js.map +1 -1
- package/dist/src/func/builtins/builtin-window-functions.d.ts.map +1 -1
- package/dist/src/func/builtins/builtin-window-functions.js +15 -85
- package/dist/src/func/builtins/builtin-window-functions.js.map +1 -1
- package/dist/src/func/builtins/conversion.d.ts.map +1 -1
- package/dist/src/func/builtins/conversion.js +10 -9
- package/dist/src/func/builtins/conversion.js.map +1 -1
- package/dist/src/func/builtins/datetime.d.ts.map +1 -1
- package/dist/src/func/builtins/datetime.js +28 -10
- package/dist/src/func/builtins/datetime.js.map +1 -1
- package/dist/src/func/builtins/json.d.ts.map +1 -1
- package/dist/src/func/builtins/json.js +23 -17
- package/dist/src/func/builtins/json.js.map +1 -1
- package/dist/src/func/builtins/mutation.js +2 -2
- package/dist/src/func/builtins/mutation.js.map +1 -1
- package/dist/src/func/builtins/return-types.d.ts +327 -0
- package/dist/src/func/builtins/return-types.d.ts.map +1 -0
- package/dist/src/func/builtins/return-types.js +43 -0
- package/dist/src/func/builtins/return-types.js.map +1 -0
- package/dist/src/func/builtins/scalar.d.ts.map +1 -1
- package/dist/src/func/builtins/scalar.js +138 -71
- package/dist/src/func/builtins/scalar.js.map +1 -1
- package/dist/src/func/builtins/schema.d.ts.map +1 -1
- package/dist/src/func/builtins/schema.js +11 -3
- package/dist/src/func/builtins/schema.js.map +1 -1
- package/dist/src/func/builtins/string.d.ts.map +1 -1
- package/dist/src/func/builtins/string.js +4 -2
- package/dist/src/func/builtins/string.js.map +1 -1
- package/dist/src/func/builtins/timespan.d.ts +3 -0
- package/dist/src/func/builtins/timespan.d.ts.map +1 -1
- package/dist/src/func/builtins/timespan.js +15 -11
- package/dist/src/func/builtins/timespan.js.map +1 -1
- package/dist/src/func/registration.d.ts +35 -1
- package/dist/src/func/registration.d.ts.map +1 -1
- package/dist/src/func/registration.js +235 -41
- package/dist/src/func/registration.js.map +1 -1
- package/dist/src/index.d.ts +11 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/parser/parser.d.ts +46 -0
- package/dist/src/parser/parser.d.ts.map +1 -1
- package/dist/src/parser/parser.js +160 -44
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/planner/analysis/check-extraction.d.ts.map +1 -1
- package/dist/src/planner/analysis/check-extraction.js +37 -4
- package/dist/src/planner/analysis/check-extraction.js.map +1 -1
- package/dist/src/planner/analysis/comparison-collation.d.ts +20 -22
- package/dist/src/planner/analysis/comparison-collation.d.ts.map +1 -1
- package/dist/src/planner/analysis/comparison-collation.js +29 -26
- package/dist/src/planner/analysis/comparison-collation.js.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.d.ts +0 -7
- package/dist/src/planner/analysis/constraint-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.js +59 -59
- package/dist/src/planner/analysis/constraint-extractor.js.map +1 -1
- package/dist/src/planner/building/alter-table.d.ts.map +1 -1
- package/dist/src/planner/building/alter-table.js +65 -27
- package/dist/src/planner/building/alter-table.js.map +1 -1
- package/dist/src/planner/building/coercion.d.ts +21 -45
- package/dist/src/planner/building/coercion.d.ts.map +1 -1
- package/dist/src/planner/building/coercion.js +42 -91
- package/dist/src/planner/building/coercion.js.map +1 -1
- package/dist/src/planner/building/expression.d.ts +17 -0
- package/dist/src/planner/building/expression.d.ts.map +1 -1
- package/dist/src/planner/building/expression.js +28 -17
- package/dist/src/planner/building/expression.js.map +1 -1
- package/dist/src/planner/building/function-call.d.ts.map +1 -1
- package/dist/src/planner/building/function-call.js +7 -2
- package/dist/src/planner/building/function-call.js.map +1 -1
- package/dist/src/planner/building/select-aggregates.d.ts +1 -1
- package/dist/src/planner/building/select-aggregates.d.ts.map +1 -1
- package/dist/src/planner/building/select-aggregates.js +53 -2
- package/dist/src/planner/building/select-aggregates.js.map +1 -1
- package/dist/src/planner/building/select-context.d.ts +7 -0
- package/dist/src/planner/building/select-context.d.ts.map +1 -1
- package/dist/src/planner/building/select-context.js +10 -40
- package/dist/src/planner/building/select-context.js.map +1 -1
- package/dist/src/planner/building/select.d.ts +37 -1
- package/dist/src/planner/building/select.d.ts.map +1 -1
- package/dist/src/planner/building/select.js +112 -51
- package/dist/src/planner/building/select.js.map +1 -1
- package/dist/src/planner/cost/conjunct-cost.d.ts +40 -0
- package/dist/src/planner/cost/conjunct-cost.d.ts.map +1 -1
- package/dist/src/planner/cost/conjunct-cost.js +45 -0
- package/dist/src/planner/cost/conjunct-cost.js.map +1 -1
- package/dist/src/planner/cost/index.d.ts +10 -0
- package/dist/src/planner/cost/index.d.ts.map +1 -1
- package/dist/src/planner/cost/index.js +15 -0
- package/dist/src/planner/cost/index.js.map +1 -1
- package/dist/src/planner/nodes/aggregate-node.d.ts +6 -0
- package/dist/src/planner/nodes/aggregate-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/aggregate-node.js +10 -2
- package/dist/src/planner/nodes/aggregate-node.js.map +1 -1
- package/dist/src/planner/nodes/alias-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/alias-node.js +2 -1
- package/dist/src/planner/nodes/alias-node.js.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.d.ts +24 -8
- package/dist/src/planner/nodes/alter-table-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.js.map +1 -1
- package/dist/src/planner/nodes/asof-scan-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/asof-scan-node.js +4 -1
- package/dist/src/planner/nodes/asof-scan-node.js.map +1 -1
- package/dist/src/planner/nodes/asserted-keys-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/asserted-keys-node.js +2 -1
- package/dist/src/planner/nodes/asserted-keys-node.js.map +1 -1
- package/dist/src/planner/nodes/bloom-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/bloom-join-node.js +8 -3
- package/dist/src/planner/nodes/bloom-join-node.js.map +1 -1
- package/dist/src/planner/nodes/cache-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/cache-node.js +2 -1
- package/dist/src/planner/nodes/cache-node.js.map +1 -1
- package/dist/src/planner/nodes/distinct-node.d.ts +6 -0
- package/dist/src/planner/nodes/distinct-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/distinct-node.js +10 -2
- package/dist/src/planner/nodes/distinct-node.js.map +1 -1
- package/dist/src/planner/nodes/eager-prefetch-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/eager-prefetch-node.js +2 -1
- package/dist/src/planner/nodes/eager-prefetch-node.js.map +1 -1
- package/dist/src/planner/nodes/fanout-lookup-join-node.d.ts +5 -0
- package/dist/src/planner/nodes/fanout-lookup-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/fanout-lookup-join-node.js +13 -6
- package/dist/src/planner/nodes/fanout-lookup-join-node.js.map +1 -1
- package/dist/src/planner/nodes/filter.d.ts.map +1 -1
- package/dist/src/planner/nodes/filter.js +12 -5
- package/dist/src/planner/nodes/filter.js.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.d.ts +6 -0
- package/dist/src/planner/nodes/hash-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.js +10 -2
- package/dist/src/planner/nodes/hash-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/join-node.d.ts +20 -1
- package/dist/src/planner/nodes/join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-node.js +30 -9
- package/dist/src/planner/nodes/join-node.js.map +1 -1
- package/dist/src/planner/nodes/join-utils.d.ts +21 -0
- package/dist/src/planner/nodes/join-utils.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-utils.js +26 -0
- package/dist/src/planner/nodes/join-utils.js.map +1 -1
- package/dist/src/planner/nodes/key-set-semi-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/key-set-semi-join-node.js +5 -1
- package/dist/src/planner/nodes/key-set-semi-join-node.js.map +1 -1
- package/dist/src/planner/nodes/lens-auxiliary-access-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/lens-auxiliary-access-node.js +2 -1
- package/dist/src/planner/nodes/lens-auxiliary-access-node.js.map +1 -1
- package/dist/src/planner/nodes/limit-offset.d.ts +6 -0
- package/dist/src/planner/nodes/limit-offset.d.ts.map +1 -1
- package/dist/src/planner/nodes/limit-offset.js +10 -2
- package/dist/src/planner/nodes/limit-offset.js.map +1 -1
- package/dist/src/planner/nodes/merge-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/merge-join-node.js +8 -3
- package/dist/src/planner/nodes/merge-join-node.js.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts +5 -0
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.js +9 -2
- package/dist/src/planner/nodes/ordinal-slice-node.js.map +1 -1
- package/dist/src/planner/nodes/plan-node.d.ts +24 -0
- package/dist/src/planner/nodes/plan-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node.js.map +1 -1
- package/dist/src/planner/nodes/project-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/project-node.js +2 -1
- package/dist/src/planner/nodes/project-node.js.map +1 -1
- package/dist/src/planner/nodes/reference.d.ts.map +1 -1
- package/dist/src/planner/nodes/reference.js +3 -2
- package/dist/src/planner/nodes/reference.js.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.js +2 -1
- package/dist/src/planner/nodes/retrieve-node.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +5 -18
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/planner/nodes/sort.d.ts.map +1 -1
- package/dist/src/planner/nodes/sort.js +3 -1
- package/dist/src/planner/nodes/sort.js.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.d.ts +6 -0
- package/dist/src/planner/nodes/stream-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.js +10 -2
- package/dist/src/planner/nodes/stream-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.d.ts.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.js +5 -0
- package/dist/src/planner/nodes/table-access-nodes.js.map +1 -1
- package/dist/src/planner/nodes/window-function.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-function.js +8 -0
- package/dist/src/planner/nodes/window-function.js.map +1 -1
- package/dist/src/planner/nodes/window-node.d.ts +1 -1
- package/dist/src/planner/nodes/window-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-node.js +3 -1
- package/dist/src/planner/nodes/window-node.js.map +1 -1
- package/dist/src/planner/optimizer.d.ts +9 -1
- package/dist/src/planner/optimizer.d.ts.map +1 -1
- package/dist/src/planner/optimizer.js +77 -6
- package/dist/src/planner/optimizer.js.map +1 -1
- package/dist/src/planner/rules/access/rule-key-set-seek.d.ts.map +1 -1
- package/dist/src/planner/rules/access/rule-key-set-seek.js +3 -68
- package/dist/src/planner/rules/access/rule-key-set-seek.js.map +1 -1
- package/dist/src/planner/rules/access/rule-select-access-path.d.ts +19 -0
- package/dist/src/planner/rules/access/rule-select-access-path.d.ts.map +1 -1
- package/dist/src/planner/rules/access/rule-select-access-path.js +24 -3
- package/dist/src/planner/rules/access/rule-select-access-path.js.map +1 -1
- package/dist/src/planner/rules/cache/rule-cte-optimization.d.ts.map +1 -1
- package/dist/src/planner/rules/cache/rule-cte-optimization.js +9 -0
- package/dist/src/planner/rules/cache/rule-cte-optimization.js.map +1 -1
- package/dist/src/planner/rules/cache/rule-nested-loop-right-cache.d.ts.map +1 -1
- package/dist/src/planner/rules/cache/rule-nested-loop-right-cache.js +6 -4
- package/dist/src/planner/rules/cache/rule-nested-loop-right-cache.js.map +1 -1
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts +5 -31
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts.map +1 -1
- package/dist/src/planner/rules/join/equi-pair-extractor.js +4 -44
- package/dist/src/planner/rules/join/equi-pair-extractor.js.map +1 -1
- package/dist/src/planner/rules/join/index-nested-loop.d.ts +49 -0
- package/dist/src/planner/rules/join/index-nested-loop.d.ts.map +1 -0
- package/dist/src/planner/rules/join/index-nested-loop.js +285 -0
- package/dist/src/planner/rules/join/index-nested-loop.js.map +1 -0
- package/dist/src/planner/rules/join/rule-fanout-batched-outer.js +8 -8
- package/dist/src/planner/rules/join/rule-join-physical-selection.d.ts +10 -4
- package/dist/src/planner/rules/join/rule-join-physical-selection.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-join-physical-selection.js +83 -27
- package/dist/src/planner/rules/join/rule-join-physical-selection.js.map +1 -1
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js +4 -4
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-conjunct-ordering.d.ts +21 -8
- package/dist/src/planner/rules/predicate/rule-filter-conjunct-ordering.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-conjunct-ordering.js +70 -14
- package/dist/src/planner/rules/predicate/rule-filter-conjunct-ordering.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-selectivity.d.ts +42 -17
- package/dist/src/planner/rules/predicate/rule-filter-selectivity.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-selectivity.js +84 -154
- package/dist/src/planner/rules/predicate/rule-filter-selectivity.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-join-predicate-pushdown.d.ts +73 -0
- package/dist/src/planner/rules/predicate/rule-join-predicate-pushdown.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-join-predicate-pushdown.js +205 -0
- package/dist/src/planner/rules/predicate/rule-join-predicate-pushdown.js.map +1 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.d.ts +14 -11
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js +21 -85
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.d.ts +7 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.js +7 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.js.map +1 -1
- package/dist/src/planner/rules/shared/access-leaf.d.ts +39 -0
- package/dist/src/planner/rules/shared/access-leaf.d.ts.map +1 -0
- package/dist/src/planner/rules/shared/access-leaf.js +79 -0
- package/dist/src/planner/rules/shared/access-leaf.js.map +1 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js +18 -8
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js.map +1 -1
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.d.ts +3 -1
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js +27 -10
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js.map +1 -1
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js +69 -11
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.d.ts +17 -7
- package/dist/src/planner/rules/window/rule-monotonic-window.d.ts.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.js +124 -87
- package/dist/src/planner/rules/window/rule-monotonic-window.js.map +1 -1
- package/dist/src/planner/scopes/aliased.d.ts.map +1 -1
- package/dist/src/planner/scopes/aliased.js +6 -0
- package/dist/src/planner/scopes/aliased.js.map +1 -1
- package/dist/src/planner/stats/catalog-stats.d.ts +44 -13
- package/dist/src/planner/stats/catalog-stats.d.ts.map +1 -1
- package/dist/src/planner/stats/catalog-stats.js +137 -61
- package/dist/src/planner/stats/catalog-stats.js.map +1 -1
- package/dist/src/planner/stats/conjunct-selectivity.d.ts +48 -0
- package/dist/src/planner/stats/conjunct-selectivity.d.ts.map +1 -0
- package/dist/src/planner/stats/conjunct-selectivity.js +168 -0
- package/dist/src/planner/stats/conjunct-selectivity.js.map +1 -0
- package/dist/src/planner/stats/index.d.ts +22 -3
- package/dist/src/planner/stats/index.d.ts.map +1 -1
- package/dist/src/planner/stats/index.js.map +1 -1
- package/dist/src/planner/stats/table-cardinality.d.ts +28 -0
- package/dist/src/planner/stats/table-cardinality.d.ts.map +1 -0
- package/dist/src/planner/stats/table-cardinality.js +29 -0
- package/dist/src/planner/stats/table-cardinality.js.map +1 -0
- package/dist/src/planner/util/column-origins.d.ts +29 -8
- package/dist/src/planner/util/column-origins.d.ts.map +1 -1
- package/dist/src/planner/util/column-origins.js +74 -14
- package/dist/src/planner/util/column-origins.js.map +1 -1
- package/dist/src/planner/util/fd-utils.d.ts +32 -8
- package/dist/src/planner/util/fd-utils.d.ts.map +1 -1
- package/dist/src/planner/util/fd-utils.js +46 -9
- package/dist/src/planner/util/fd-utils.js.map +1 -1
- package/dist/src/planner/util/ind-utils.d.ts +56 -17
- package/dist/src/planner/util/ind-utils.d.ts.map +1 -1
- package/dist/src/planner/util/ind-utils.js +82 -21
- package/dist/src/planner/util/ind-utils.js.map +1 -1
- package/dist/src/planner/util/key-utils.d.ts +20 -2
- package/dist/src/planner/util/key-utils.d.ts.map +1 -1
- package/dist/src/planner/util/key-utils.js +37 -3
- package/dist/src/planner/util/key-utils.js.map +1 -1
- package/dist/src/planner/util/row-estimates.d.ts +28 -0
- package/dist/src/planner/util/row-estimates.d.ts.map +1 -0
- package/dist/src/planner/util/row-estimates.js +40 -0
- package/dist/src/planner/util/row-estimates.js.map +1 -0
- package/dist/src/planner/util/row-population.d.ts +42 -0
- package/dist/src/planner/util/row-population.d.ts.map +1 -0
- package/dist/src/planner/util/row-population.js +71 -0
- package/dist/src/planner/util/row-population.js.map +1 -0
- package/dist/src/runtime/emit/add-constraint.d.ts.map +1 -1
- package/dist/src/runtime/emit/add-constraint.js +39 -1
- package/dist/src/runtime/emit/add-constraint.js.map +1 -1
- package/dist/src/runtime/emit/aggregate.d.ts.map +1 -1
- package/dist/src/runtime/emit/aggregate.js +4 -4
- package/dist/src/runtime/emit/aggregate.js.map +1 -1
- package/dist/src/runtime/emit/alter-schema-event.d.ts +42 -0
- package/dist/src/runtime/emit/alter-schema-event.d.ts.map +1 -0
- package/dist/src/runtime/emit/alter-schema-event.js +28 -0
- package/dist/src/runtime/emit/alter-schema-event.js.map +1 -0
- package/dist/src/runtime/emit/alter-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-table.js +380 -154
- package/dist/src/runtime/emit/alter-table.js.map +1 -1
- package/dist/src/runtime/emit/analyze.d.ts.map +1 -1
- package/dist/src/runtime/emit/analyze.js +35 -3
- package/dist/src/runtime/emit/analyze.js.map +1 -1
- package/dist/src/runtime/emit/cast.d.ts.map +1 -1
- package/dist/src/runtime/emit/cast.js +4 -19
- package/dist/src/runtime/emit/cast.js.map +1 -1
- package/dist/src/runtime/emit/dml-executor.d.ts.map +1 -1
- package/dist/src/runtime/emit/dml-executor.js +64 -27
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/drop-index.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-index.js +4 -3
- package/dist/src/runtime/emit/drop-index.js.map +1 -1
- package/dist/src/runtime/emit/hash-aggregate.d.ts.map +1 -1
- package/dist/src/runtime/emit/hash-aggregate.js +2 -2
- package/dist/src/runtime/emit/hash-aggregate.js.map +1 -1
- package/dist/src/runtime/emit/join.d.ts.map +1 -1
- package/dist/src/runtime/emit/join.js +8 -67
- package/dist/src/runtime/emit/join.js.map +1 -1
- package/dist/src/runtime/emit/key-set-semi-join.d.ts.map +1 -1
- package/dist/src/runtime/emit/key-set-semi-join.js +6 -0
- package/dist/src/runtime/emit/key-set-semi-join.js.map +1 -1
- package/dist/src/runtime/emit/operand-comparator.d.ts +30 -0
- package/dist/src/runtime/emit/operand-comparator.d.ts.map +1 -1
- package/dist/src/runtime/emit/operand-comparator.js +34 -0
- package/dist/src/runtime/emit/operand-comparator.js.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.d.ts.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.js +30 -0
- package/dist/src/runtime/emit/schema-declarative.js.map +1 -1
- package/dist/src/runtime/emit/subquery.d.ts.map +1 -1
- package/dist/src/runtime/emit/subquery.js +153 -52
- package/dist/src/runtime/emit/subquery.js.map +1 -1
- package/dist/src/runtime/emit/window.js +36 -23
- package/dist/src/runtime/emit/window.js.map +1 -1
- package/dist/src/schema/catalog-persistability.d.ts +19 -16
- package/dist/src/schema/catalog-persistability.d.ts.map +1 -1
- package/dist/src/schema/catalog-persistability.js +76 -20
- package/dist/src/schema/catalog-persistability.js.map +1 -1
- package/dist/src/schema/catalog.d.ts +67 -2
- package/dist/src/schema/catalog.d.ts.map +1 -1
- package/dist/src/schema/catalog.js +194 -3
- package/dist/src/schema/catalog.js.map +1 -1
- package/dist/src/schema/column.d.ts +26 -3
- package/dist/src/schema/column.d.ts.map +1 -1
- package/dist/src/schema/column.js.map +1 -1
- package/dist/src/schema/ddl-generator.d.ts.map +1 -1
- package/dist/src/schema/ddl-generator.js +19 -6
- package/dist/src/schema/ddl-generator.js.map +1 -1
- package/dist/src/schema/function.d.ts +32 -1
- package/dist/src/schema/function.d.ts.map +1 -1
- package/dist/src/schema/function.js +10 -2
- package/dist/src/schema/function.js.map +1 -1
- package/dist/src/schema/manager.d.ts +84 -7
- package/dist/src/schema/manager.d.ts.map +1 -1
- package/dist/src/schema/manager.js +153 -53
- package/dist/src/schema/manager.js.map +1 -1
- package/dist/src/schema/schema-differ.d.ts.map +1 -1
- package/dist/src/schema/schema-differ.js +104 -28
- package/dist/src/schema/schema-differ.js.map +1 -1
- package/dist/src/schema/table.d.ts +149 -1
- package/dist/src/schema/table.d.ts.map +1 -1
- package/dist/src/schema/table.js +248 -1
- package/dist/src/schema/table.js.map +1 -1
- package/dist/src/schema/unique-enforcement.d.ts +5 -3
- package/dist/src/schema/unique-enforcement.d.ts.map +1 -1
- package/dist/src/schema/unique-enforcement.js +5 -3
- package/dist/src/schema/unique-enforcement.js.map +1 -1
- package/dist/src/types/builtin-types.d.ts +16 -0
- package/dist/src/types/builtin-types.d.ts.map +1 -1
- package/dist/src/types/builtin-types.js +46 -8
- package/dist/src/types/builtin-types.js.map +1 -1
- package/dist/src/types/cast-semantics.d.ts +42 -0
- package/dist/src/types/cast-semantics.d.ts.map +1 -1
- package/dist/src/types/cast-semantics.js +64 -0
- package/dist/src/types/cast-semantics.js.map +1 -1
- package/dist/src/types/comparison-coercion.d.ts +101 -0
- package/dist/src/types/comparison-coercion.d.ts.map +1 -0
- package/dist/src/types/comparison-coercion.js +162 -0
- package/dist/src/types/comparison-coercion.js.map +1 -0
- package/dist/src/types/index.d.ts +2 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +2 -2
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/logical-type.d.ts +7 -0
- package/dist/src/types/logical-type.d.ts.map +1 -1
- package/dist/src/types/logical-type.js.map +1 -1
- package/dist/src/types/validation.d.ts +56 -0
- package/dist/src/types/validation.d.ts.map +1 -1
- package/dist/src/types/validation.js +68 -0
- package/dist/src/types/validation.js.map +1 -1
- package/dist/src/util/coercion.d.ts +8 -0
- package/dist/src/util/coercion.d.ts.map +1 -1
- package/dist/src/util/coercion.js +8 -0
- package/dist/src/util/coercion.js.map +1 -1
- package/dist/src/util/comparison.d.ts +16 -3
- package/dist/src/util/comparison.d.ts.map +1 -1
- package/dist/src/util/comparison.js +21 -5
- package/dist/src/util/comparison.js.map +1 -1
- package/dist/src/util/key-serializer.d.ts +46 -0
- package/dist/src/util/key-serializer.d.ts.map +1 -1
- package/dist/src/util/key-serializer.js +47 -0
- package/dist/src/util/key-serializer.js.map +1 -1
- package/dist/src/util/value-set.d.ts +21 -0
- package/dist/src/util/value-set.d.ts.map +1 -0
- package/dist/src/util/value-set.js +22 -0
- package/dist/src/util/value-set.js.map +1 -0
- package/dist/src/vtab/capabilities.d.ts +1 -1
- package/dist/src/vtab/events.d.ts +5 -1
- package/dist/src/vtab/events.d.ts.map +1 -1
- package/dist/src/vtab/events.js.map +1 -1
- package/dist/src/vtab/memory/layer/alter-column.d.ts +147 -0
- package/dist/src/vtab/memory/layer/alter-column.d.ts.map +1 -0
- package/dist/src/vtab/memory/layer/alter-column.js +214 -0
- package/dist/src/vtab/memory/layer/alter-column.js.map +1 -0
- package/dist/src/vtab/memory/layer/base.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/base.js +4 -3
- package/dist/src/vtab/memory/layer/base.js.map +1 -1
- package/dist/src/vtab/memory/layer/interface.d.ts +2 -2
- package/dist/src/vtab/memory/layer/interface.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.d.ts +176 -25
- package/dist/src/vtab/memory/layer/manager.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.js +572 -495
- package/dist/src/vtab/memory/layer/manager.js.map +1 -1
- package/dist/src/vtab/memory/layer/scan-layer.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/scan-layer.js +32 -5
- package/dist/src/vtab/memory/layer/scan-layer.js.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.d.ts +101 -15
- package/dist/src/vtab/memory/layer/transaction.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.js +133 -45
- package/dist/src/vtab/memory/layer/transaction.js.map +1 -1
- package/dist/src/vtab/memory/module.d.ts.map +1 -1
- package/dist/src/vtab/memory/module.js +2 -1
- package/dist/src/vtab/memory/module.js.map +1 -1
- package/dist/src/vtab/memory/table.d.ts.map +1 -1
- package/dist/src/vtab/memory/table.js +11 -6
- package/dist/src/vtab/memory/table.js.map +1 -1
- package/dist/src/vtab/module.d.ts +51 -21
- package/dist/src/vtab/module.d.ts.map +1 -1
- package/dist/src/vtab/table.d.ts +1 -1
- package/dist/src/vtab/table.js +1 -1
- package/package.json +3 -3
|
@@ -66,8 +66,10 @@ function subtreeTouchesCte(node) {
|
|
|
66
66
|
*
|
|
67
67
|
* We can't just read `right.physical.estimatedRows`. Two gaps make the top of
|
|
68
68
|
* the subtree read too low:
|
|
69
|
-
* -
|
|
70
|
-
*
|
|
69
|
+
* - Not every node propagates the physical estimate. The single-source relays and
|
|
70
|
+
* the join family do (`physicalSourceRows`), but a set operation, an async
|
|
71
|
+
* gather, or a CTE reference in between still stamps nothing, so the subtree top
|
|
72
|
+
* can be `undefined` while the leaf underneath has a count.
|
|
71
73
|
* - An access leaf's `physical.estimatedRows` is the *table* row count, but the
|
|
72
74
|
* module's own access-plan estimate (getBestAccessPlan `rows`, the true "how
|
|
73
75
|
* many rows will this scan hand back" — e.g. a high-latency vtab reporting
|
|
@@ -78,8 +80,8 @@ function subtreeTouchesCte(node) {
|
|
|
78
80
|
* NOTE: this over-estimates a large base scan that a selective Filter shrinks —
|
|
79
81
|
* output rows may be few, yet the max reflects the pre-filter scan. That biases
|
|
80
82
|
* toward NOT caching such a right side (a missed optimization, never a memory
|
|
81
|
-
* hazard). If a real workload wants those cached,
|
|
82
|
-
*
|
|
83
|
+
* hazard). If a real workload wants those cached, read the subtree top instead of
|
|
84
|
+
* the max — the Filter's own physical estimate now carries the post-filter count.
|
|
83
85
|
*/
|
|
84
86
|
function estimateRightRows(node) {
|
|
85
87
|
let max;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-nested-loop-right-cache.js","sourceRoot":"","sources":["../../../../../src/planner/rules/cache/rule-nested-loop-right-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,GAAG,GAAG,YAAY,CAAC,wCAAwC,CAAC,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AACH,MAAM,cAAc,GAA8B,IAAI,GAAG,CAAC;IACzD,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,GAAG;IAChB,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,uBAAuB;CACpC,CAAC,CAAC;AAEH,6EAA6E;AAC7E,SAAS,iBAAiB,CAAC,IAAc;IACxC,MAAM,KAAK,GAAe,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QAC7B,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,IAAI,CAAC;QACtD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;YAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"rule-nested-loop-right-cache.js","sourceRoot":"","sources":["../../../../../src/planner/rules/cache/rule-nested-loop-right-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,GAAG,GAAG,YAAY,CAAC,wCAAwC,CAAC,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AACH,MAAM,cAAc,GAA8B,IAAI,GAAG,CAAC;IACzD,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,GAAG;IAChB,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,uBAAuB;CACpC,CAAC,CAAC;AAEH,6EAA6E;AAC7E,SAAS,iBAAiB,CAAC,IAAc;IACxC,MAAM,KAAK,GA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import { type TypeSlice } from '../../analysis/comparison-collation.js';
|
|
9
8
|
export interface EquiPairExtraction {
|
|
10
9
|
equiPairs: EquiJoinPair[];
|
|
11
10
|
residual: ScalarPlanNode | undefined;
|
|
12
11
|
/**
|
|
13
12
|
* For each entry in `equiPairs`, the original `=` ScalarPlanNode it was
|
|
14
|
-
* extracted from
|
|
15
|
-
* source node). Same length and order as `equiPairs`. Useful when a rule
|
|
13
|
+
* extracted from. Same length and order as `equiPairs`. Useful when a rule
|
|
16
14
|
* wants to demote a subset of equi-pairs back into the residual (e.g., the
|
|
17
15
|
* monotonic-merge rule keeps only the monotonic-driving pair as the merge
|
|
18
|
-
* key and pushes the rest into the residual).
|
|
16
|
+
* key and pushes the rest into the residual). Typed optional for that
|
|
17
|
+
* demotion path's convenience; extraction always fills every slot.
|
|
19
18
|
*/
|
|
20
19
|
equiPairNodes: Array<ScalarPlanNode | undefined>;
|
|
21
20
|
}
|
|
@@ -89,35 +88,10 @@ export declare function combineResidual(base: ScalarPlanNode | undefined, extras
|
|
|
89
88
|
* physically sorted in its comparator's order and a `timespan` side is sorted by
|
|
90
89
|
* elapsed time while a `text` side is sorted by text — no single comparator merges
|
|
91
90
|
* those two orders, so canonicalizing would fix hash join and leave merge join
|
|
92
|
-
* unsound. Declined pairs demote to the residual
|
|
93
|
-
*
|
|
91
|
+
* unsound. Declined pairs demote to the residual and the `=` operator's own
|
|
92
|
+
* semantics apply. See `docs/types.md`
|
|
94
93
|
* § "Semantic ordering"; ticket
|
|
95
94
|
* `mixed-type-equi-join-key-drops-semantic-matches`.
|
|
96
95
|
*/
|
|
97
96
|
export declare function extractEquiPairs(condition: ScalarPlanNode | undefined, leftAttrIds: Set<number>, rightAttrIds: Set<number>): EquiPairExtraction | null;
|
|
98
|
-
/**
|
|
99
|
-
* The slice of an {@link import('../../nodes/plan-node.js').Attribute} the USING
|
|
100
|
-
* extractor reads. Structural rather than the full `Attribute` so tests can pass a
|
|
101
|
-
* literal; both production call sites pass real attributes.
|
|
102
|
-
*/
|
|
103
|
-
type UsingAttr = {
|
|
104
|
-
id: number;
|
|
105
|
-
name: string;
|
|
106
|
-
type?: TypeSlice;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Convert USING-column names into equi-pairs given the left/right attributes.
|
|
110
|
-
* Returns null if no pairs could be matched.
|
|
111
|
-
*
|
|
112
|
-
* Collation is handled as in {@link extractEquiPairs}: a pair over columns with
|
|
113
|
-
* differing declared collations IS extracted, tagged `collationsMatch: false`
|
|
114
|
-
* (hash/bloom join it; merge declines) and with `valueDiscriminating` per the
|
|
115
|
-
* value-discrimination gate. Two shapes still sink the whole extraction to
|
|
116
|
-
* `null` (USING has no residual to demote into — the generic join evaluates
|
|
117
|
-
* the condition instead): a same-rank explicit/declared collation *conflict*,
|
|
118
|
-
* and disagreeing semantic ordering (one side `timespan`, the other plain
|
|
119
|
-
* `text` — see the semantic-ordering gate on {@link extractEquiPairs}).
|
|
120
|
-
*/
|
|
121
|
-
export declare function extractEquiPairsFromUsing(usingColumns: readonly string[] | undefined, leftAttrs: ReadonlyArray<UsingAttr>, rightAttrs: ReadonlyArray<UsingAttr>): EquiPairExtraction | null;
|
|
122
|
-
export {};
|
|
123
97
|
//# sourceMappingURL=equi-pair-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equi-pair-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/join/equi-pair-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"equi-pair-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/join/equi-pair-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE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';
|
|
8
8
|
import { normalizePredicate } from '../../analysis/predicate-normalizer.js';
|
|
9
9
|
import { PlanNodeCharacteristics } from '../../framework/characteristics.js';
|
|
10
|
-
import { operandCollation, isValueDiscriminatingEquality,
|
|
11
|
-
import {
|
|
10
|
+
import { operandCollation, isValueDiscriminatingEquality, resolveComparisonCollation, } from '../../analysis/comparison-collation.js';
|
|
11
|
+
import { semanticOrderingsAgree } from '../../../util/comparison.js';
|
|
12
12
|
/**
|
|
13
13
|
* Check whether `source`'s `physical.ordering` covers the given equi-pair
|
|
14
14
|
* columns positionally for the chosen `side` (the merge-join emitter compares
|
|
@@ -136,8 +136,8 @@ export function combineResidual(base, extras) {
|
|
|
136
136
|
* physically sorted in its comparator's order and a `timespan` side is sorted by
|
|
137
137
|
* elapsed time while a `text` side is sorted by text — no single comparator merges
|
|
138
138
|
* those two orders, so canonicalizing would fix hash join and leave merge join
|
|
139
|
-
* unsound. Declined pairs demote to the residual
|
|
140
|
-
*
|
|
139
|
+
* unsound. Declined pairs demote to the residual and the `=` operator's own
|
|
140
|
+
* semantics apply. See `docs/types.md`
|
|
141
141
|
* § "Semantic ordering"; ticket
|
|
142
142
|
* `mixed-type-equi-join-key-drops-semantic-matches`.
|
|
143
143
|
*/
|
|
@@ -185,44 +185,4 @@ export function extractEquiPairs(condition, leftAttrIds, rightAttrIds) {
|
|
|
185
185
|
const residual = combineResidual(undefined, residuals);
|
|
186
186
|
return { equiPairs, residual, equiPairNodes };
|
|
187
187
|
}
|
|
188
|
-
/**
|
|
189
|
-
* Convert USING-column names into equi-pairs given the left/right attributes.
|
|
190
|
-
* Returns null if no pairs could be matched.
|
|
191
|
-
*
|
|
192
|
-
* Collation is handled as in {@link extractEquiPairs}: a pair over columns with
|
|
193
|
-
* differing declared collations IS extracted, tagged `collationsMatch: false`
|
|
194
|
-
* (hash/bloom join it; merge declines) and with `valueDiscriminating` per the
|
|
195
|
-
* value-discrimination gate. Two shapes still sink the whole extraction to
|
|
196
|
-
* `null` (USING has no residual to demote into — the generic join evaluates
|
|
197
|
-
* the condition instead): a same-rank explicit/declared collation *conflict*,
|
|
198
|
-
* and disagreeing semantic ordering (one side `timespan`, the other plain
|
|
199
|
-
* `text` — see the semantic-ordering gate on {@link extractEquiPairs}).
|
|
200
|
-
*/
|
|
201
|
-
export function extractEquiPairsFromUsing(usingColumns, leftAttrs, rightAttrs) {
|
|
202
|
-
if (!usingColumns || usingColumns.length === 0)
|
|
203
|
-
return null;
|
|
204
|
-
const equiPairs = [];
|
|
205
|
-
for (const colName of usingColumns) {
|
|
206
|
-
const lower = colName.toLowerCase();
|
|
207
|
-
const leftAttr = leftAttrs.find(a => a.name.toLowerCase() === lower);
|
|
208
|
-
const rightAttr = rightAttrs.find(a => a.name.toLowerCase() === lower);
|
|
209
|
-
if (leftAttr && rightAttr) {
|
|
210
|
-
if (resolveComparisonCollation(leftAttr.type ?? {}, rightAttr.type ?? {}).kind === 'conflict')
|
|
211
|
-
return null;
|
|
212
|
-
if (!semanticOrderingsAgree(leftAttr.type?.logicalType, rightAttr.type?.logicalType))
|
|
213
|
-
return null;
|
|
214
|
-
const lColl = normalizeCollationName(leftAttr.type?.collationName ?? 'BINARY');
|
|
215
|
-
const rColl = normalizeCollationName(rightAttr.type?.collationName ?? 'BINARY');
|
|
216
|
-
equiPairs.push({
|
|
217
|
-
leftAttrId: leftAttr.id,
|
|
218
|
-
rightAttrId: rightAttr.id,
|
|
219
|
-
collationsMatch: lColl === rColl,
|
|
220
|
-
valueDiscriminating: isValueDiscriminatingTypePair(leftAttr.type, rightAttr.type),
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
if (equiPairs.length === 0)
|
|
225
|
-
return null;
|
|
226
|
-
return { equiPairs, residual: undefined, equiPairNodes: equiPairs.map(() => undefined) };
|
|
227
|
-
}
|
|
228
188
|
//# sourceMappingURL=equi-pair-extractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equi-pair-extractor.js","sourceRoot":"","sources":["../../../../../src/planner/rules/join/equi-pair-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,gBAAgB,EAChB,6BAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"equi-pair-extractor.js","sourceRoot":"","sources":["../../../../../src/planner/rules/join/equi-pair-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,gBAAgB,EAChB,6BAA6B,EAC7B,0BAA0B,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAgBrE;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CACnC,MAA0B,EAC1B,SAAkC,EAClC,IAAsB;IAEtB,MAAM,QAAQ,GAAG,uBAAuB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACrD,IAAI,SAAS,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAErD,MAAM,SAAS,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAA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AAW,EAAE,GAAG,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC,CAAC;oBAC5F,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACtB,MAAM,GAAG,IAAI,CAAC;gBACf,CAAC;YACF,CAAC;QACF,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACF,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAExC,MAAM,QAAQ,GAAG,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEvD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Index-nested-loop candidate construction for `rule-join-physical-selection`.
|
|
3
|
+
*
|
|
4
|
+
* When a join's inner (right) side bottoms out in a plain every-row walk over a
|
|
5
|
+
* table whose module can answer an equality seek on the join key, the walk is
|
|
6
|
+
* replaced by an `IndexSeekNode` whose seek keys are column references into the
|
|
7
|
+
* OUTER row. The node above stays the logical `JoinNode`, so the existing
|
|
8
|
+
* nested-loop emitter drives it: for each outer row it installs the outer row
|
|
9
|
+
* slot and re-opens the inner pipeline, and the seek-key expressions resolve
|
|
10
|
+
* through the runtime context by attribute id — the same machinery correlated
|
|
11
|
+
* subqueries already exercise.
|
|
12
|
+
*
|
|
13
|
+
* Join(inner, s, SeqScan(big)) Join(inner, s, IndexSeek(big, keys=[s.k]))
|
|
14
|
+
* ON big.id = s.k ──▶ ON big.id = s.k
|
|
15
|
+
* reads every row of big one seek per row of s
|
|
16
|
+
*
|
|
17
|
+
* This module only CONSTRUCTS the candidate (recognize the shape, probe the
|
|
18
|
+
* module, cost it); the four-way cost comparison and the join rebuild live in
|
|
19
|
+
* the caller. Every gate below declines by returning null, which leaves the
|
|
20
|
+
* nested-loop / hash / merge competition unchanged.
|
|
21
|
+
*
|
|
22
|
+
* NOTE: one extra pair of `getBestAccessPlan` probes runs per qualifying
|
|
23
|
+
* equi-join, uncached (see `probeModule`). Cheap for both shipped modules;
|
|
24
|
+
* memoize by (table, seek columns) only if a third-party module with an
|
|
25
|
+
* expensive planner shows up in optimization profiles — mirrors the
|
|
26
|
+
* rule-key-set-seek tripwire.
|
|
27
|
+
*/
|
|
28
|
+
import type { RelationalPlanNode } from '../../nodes/plan-node.js';
|
|
29
|
+
import type { OptContext } from '../../framework/context.js';
|
|
30
|
+
import { JoinNode } from '../../nodes/join-node.js';
|
|
31
|
+
import type { EquiJoinPair } from '../../nodes/join-utils.js';
|
|
32
|
+
export interface IndexNestedLoopCandidate {
|
|
33
|
+
/** Rebuilt right subtree with the access leaf replaced by the correlated seek. */
|
|
34
|
+
readonly newRight: RelationalPlanNode;
|
|
35
|
+
/** Engine-currency cost, comparable with nestedLoop/hash/merge in the caller. */
|
|
36
|
+
readonly cost: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Try to build an index-nested-loop candidate for `node`: the right subtree
|
|
40
|
+
* rebuilt with its access leaf replaced by a correlated `IndexSeekNode`, plus
|
|
41
|
+
* its engine-currency cost. Returns null when any gate declines; the caller's
|
|
42
|
+
* nested-loop / hash / merge competition is then unchanged.
|
|
43
|
+
*
|
|
44
|
+
* `equiPairs` must be non-empty and oriented left=outer / right=inner (as
|
|
45
|
+
* `extractEquiPairs` produces for this join). `outerRows` is the caller's
|
|
46
|
+
* left-side estimate — the same input hash and merge selection use.
|
|
47
|
+
*/
|
|
48
|
+
export declare function tryIndexNestedLoop(node: JoinNode, equiPairs: readonly EquiJoinPair[], outerRows: number, context: OptContext): IndexNestedLoopCandidate | null;
|
|
49
|
+
//# sourceMappingURL=index-nested-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-nested-loop.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/join/index-nested-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,0BAA0B,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgB9D,MAAM,WAAW,wBAAwB;IACxC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAiND;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,UAAU,GACjB,wBAAwB,GAAG,IAAI,CA2EjC"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Index-nested-loop candidate construction for `rule-join-physical-selection`.
|
|
3
|
+
*
|
|
4
|
+
* When a join's inner (right) side bottoms out in a plain every-row walk over a
|
|
5
|
+
* table whose module can answer an equality seek on the join key, the walk is
|
|
6
|
+
* replaced by an `IndexSeekNode` whose seek keys are column references into the
|
|
7
|
+
* OUTER row. The node above stays the logical `JoinNode`, so the existing
|
|
8
|
+
* nested-loop emitter drives it: for each outer row it installs the outer row
|
|
9
|
+
* slot and re-opens the inner pipeline, and the seek-key expressions resolve
|
|
10
|
+
* through the runtime context by attribute id — the same machinery correlated
|
|
11
|
+
* subqueries already exercise.
|
|
12
|
+
*
|
|
13
|
+
* Join(inner, s, SeqScan(big)) Join(inner, s, IndexSeek(big, keys=[s.k]))
|
|
14
|
+
* ON big.id = s.k ──▶ ON big.id = s.k
|
|
15
|
+
* reads every row of big one seek per row of s
|
|
16
|
+
*
|
|
17
|
+
* This module only CONSTRUCTS the candidate (recognize the shape, probe the
|
|
18
|
+
* module, cost it); the four-way cost comparison and the join rebuild live in
|
|
19
|
+
* the caller. Every gate below declines by returning null, which leaves the
|
|
20
|
+
* nested-loop / hash / merge competition unchanged.
|
|
21
|
+
*
|
|
22
|
+
* NOTE: one extra pair of `getBestAccessPlan` probes runs per qualifying
|
|
23
|
+
* equi-join, uncached (see `probeModule`). Cheap for both shipped modules;
|
|
24
|
+
* memoize by (table, seek columns) only if a third-party module with an
|
|
25
|
+
* expensive planner shows up in optimization profiles — mirrors the
|
|
26
|
+
* rule-key-set-seek tripwire.
|
|
27
|
+
*/
|
|
28
|
+
import { createLogger } from '../../../common/logger.js';
|
|
29
|
+
import { IndexScanNode, IndexSeekNode } from '../../nodes/table-access-nodes.js';
|
|
30
|
+
import { FilterNode } from '../../nodes/filter.js';
|
|
31
|
+
import { ColumnReferenceNode } from '../../nodes/reference.js';
|
|
32
|
+
import { BinaryOpNode } from '../../nodes/scalar.js';
|
|
33
|
+
import { PlanNodeCharacteristics } from '../../framework/characteristics.js';
|
|
34
|
+
import { hasSemanticOrdering } from '../../../util/comparison.js';
|
|
35
|
+
import { extractConstraints, createTableInfoFromNode } from '../../analysis/constraint-extractor.js';
|
|
36
|
+
import { selectPhysicalNode } from '../access/rule-select-access-path.js';
|
|
37
|
+
import { peelToAccessLeaf, rebuildChain, buildProbeRequest } from '../shared/access-leaf.js';
|
|
38
|
+
import { combineResidual } from './equi-pair-extractor.js';
|
|
39
|
+
import { indexNestedLoopJoinCost } from '../../cost/index.js';
|
|
40
|
+
import { validateAccessPlan } from '../../../vtab/best-access-plan.js';
|
|
41
|
+
const log = createLogger('optimizer:rule:index-nested-loop');
|
|
42
|
+
/**
|
|
43
|
+
* The inner leaf, when it is an unconstrained every-row walk whose `FilterInfo`
|
|
44
|
+
* may be replaced wholesale: a plain full scan, or an ordering-only index walk
|
|
45
|
+
* (plan='scan'). A leaf already carrying pushed constraints had its residual
|
|
46
|
+
* Filter dropped on the module's promise to enforce them; replacing its
|
|
47
|
+
* FilterInfo with our seek would silently drop those predicates
|
|
48
|
+
* (backlog/feat-index-nested-loop-over-pushed-constraints). A pushed
|
|
49
|
+
* limit / offset is likewise a directive the seek would not honor.
|
|
50
|
+
*/
|
|
51
|
+
function admitLeaf(right) {
|
|
52
|
+
const leaf = peelToAccessLeaf(right);
|
|
53
|
+
if (!leaf) {
|
|
54
|
+
log('decline: right does not peel to an access leaf through Alias/Project/Filter');
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const fi = leaf.filterInfo;
|
|
58
|
+
const isEveryRowWalk = fi.accessPath?.kind === 'fullScan'
|
|
59
|
+
|| (fi.accessPath?.kind === 'index' && fi.accessPath.plan === 'scan');
|
|
60
|
+
if (!isEveryRowWalk || fi.constraints.length !== 0
|
|
61
|
+
|| fi.limit !== undefined || fi.offset !== undefined) {
|
|
62
|
+
log('decline: leaf is not an unconstrained every-row walk');
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
// A leaf whose emission order absorbed a SortNode is the only thing producing
|
|
66
|
+
// the query's ORDER BY; a seek emits in seek-key order instead.
|
|
67
|
+
if (leaf instanceof IndexScanNode && leaf.orderingLoadBearing) {
|
|
68
|
+
log('decline: leaf emission order is load-bearing (absorbed a Sort)');
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return leaf;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolve each equi pair to (leaf column index, outer attribute position) and
|
|
75
|
+
* apply the two type gates that keep a raw-value seek from under-fetching. The
|
|
76
|
+
* seek key is passed through verbatim (no cast is applied to a dynamic value
|
|
77
|
+
* expression), so a cross-type key (INTEGER column vs REAL key) or a
|
|
78
|
+
* semantic-ordering key type ('PT1H' ≡ 'PT60M' but byte-distinct) can miss rows
|
|
79
|
+
* `=` considers equal — and the ON condition retained above the join cannot
|
|
80
|
+
* resurrect a row the seek never returned. Same two gates as
|
|
81
|
+
* rule-key-set-seek's resolveSeekColumns.
|
|
82
|
+
*/
|
|
83
|
+
function resolvePairs(leaf, outer, equiPairs) {
|
|
84
|
+
const leafAttrIndex = leaf.getAttributeIndex();
|
|
85
|
+
const leafAttrs = leaf.getAttributes();
|
|
86
|
+
const outerAttrIndex = outer.getAttributeIndex();
|
|
87
|
+
const outerAttrs = outer.getAttributes();
|
|
88
|
+
const resolved = [];
|
|
89
|
+
for (const pair of equiPairs) {
|
|
90
|
+
// A TableAccessNode's attributes are the table reference's, positionally
|
|
91
|
+
// 1:1 with tableSchema.columns — so this index IS the table column index.
|
|
92
|
+
const innerCol = leafAttrIndex.get(pair.rightAttrId) ?? -1;
|
|
93
|
+
if (innerCol === -1) {
|
|
94
|
+
log('decline: join key attr %d is not a leaf column', pair.rightAttrId);
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const outerIdx = outerAttrIndex.get(pair.leftAttrId) ?? -1;
|
|
98
|
+
if (outerIdx === -1) {
|
|
99
|
+
log('decline: join key attr %d is not an outer column', pair.leftAttrId);
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
const innerType = leafAttrs[innerCol].type;
|
|
103
|
+
const outerType = outerAttrs[outerIdx].type;
|
|
104
|
+
if (innerType.logicalType.name !== outerType.logicalType.name) {
|
|
105
|
+
log('decline: logical types differ (%s vs %s)', innerType.logicalType.name, outerType.logicalType.name);
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
if (hasSemanticOrdering(innerType.logicalType) || hasSemanticOrdering(outerType.logicalType)) {
|
|
109
|
+
log('decline: semantic-ordering key type %s', innerType.logicalType.name);
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
resolved.push({ innerCol, outerIdx });
|
|
113
|
+
}
|
|
114
|
+
return resolved;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Build the seek predicate: `leaf.col = outer.col` per pair, ANDed. Inner side
|
|
118
|
+
* FIRST — the constraint extractor picks the first side it can map to the
|
|
119
|
+
* probed table as "the column", so this ordering is what makes the extraction
|
|
120
|
+
* come back oriented inner-column-seeks-on-outer-value (asserted by the
|
|
121
|
+
* caller). Construction mirrors `createSortForEquiPairs`.
|
|
122
|
+
*/
|
|
123
|
+
function buildSeekPredicate(leaf, outer, resolved) {
|
|
124
|
+
const leafAttrs = leaf.getAttributes();
|
|
125
|
+
const outerAttrs = outer.getAttributes();
|
|
126
|
+
const conjuncts = resolved.map(({ innerCol, outerIdx }) => {
|
|
127
|
+
const innerAttr = leafAttrs[innerCol];
|
|
128
|
+
const outerAttr = outerAttrs[outerIdx];
|
|
129
|
+
const innerRef = new ColumnReferenceNode(leaf.scope, { type: 'column', table: '', name: innerAttr.name, schema: '' }, innerAttr.type, innerAttr.id, innerCol);
|
|
130
|
+
const outerRef = new ColumnReferenceNode(outer.scope, { type: 'column', table: '', name: outerAttr.name, schema: '' }, outerAttr.type, outerAttr.id, outerIdx);
|
|
131
|
+
return new BinaryOpNode(leaf.scope, { type: 'binary', operator: '=', left: innerRef.expression, right: outerRef.expression }, innerRef, outerRef);
|
|
132
|
+
});
|
|
133
|
+
// resolved is never empty (caller requires ≥1 equi pair), so combineResidual
|
|
134
|
+
// always returns a node.
|
|
135
|
+
return combineResidual(undefined, conjuncts);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Probe the module twice — once with the synthesized join constraints, once
|
|
139
|
+
* with no filters — and admit the seek only when the module's OWN answers say a
|
|
140
|
+
* per-row seek beats its scan (`cost` and `rows` both smaller). Comparing
|
|
141
|
+
* module currency to module currency keeps the engine's cost units out of the
|
|
142
|
+
* module's — the same discipline as rule-key-set-seek's break-even.
|
|
143
|
+
*
|
|
144
|
+
* These requests are the ENGINE's, not the user's: a module that answers one
|
|
145
|
+
* with a plan `validateAccessPlan` rejects gets logged and declined, never
|
|
146
|
+
* thrown — the user's own query ran fine before this rule probed.
|
|
147
|
+
*/
|
|
148
|
+
function probeModule(context, leaf, constraints) {
|
|
149
|
+
const tableSchema = leaf.tableSchema;
|
|
150
|
+
const vtabModule = leaf.source.vtabModule;
|
|
151
|
+
const getBestAccessPlan = vtabModule.getBestAccessPlan;
|
|
152
|
+
if (typeof getBestAccessPlan !== 'function') {
|
|
153
|
+
log('decline: module has no getBestAccessPlan');
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const tableRows = leaf.source.estimatedRows || undefined;
|
|
157
|
+
const ask = (filters) => {
|
|
158
|
+
const request = buildProbeRequest(tableSchema, tableRows, filters);
|
|
159
|
+
const plan = getBestAccessPlan.call(vtabModule, context.db, tableSchema, request);
|
|
160
|
+
validateAccessPlan(request, plan);
|
|
161
|
+
return plan;
|
|
162
|
+
};
|
|
163
|
+
let seekPlan;
|
|
164
|
+
let scanPlan;
|
|
165
|
+
try {
|
|
166
|
+
seekPlan = ask(constraints);
|
|
167
|
+
scanPlan = ask([]);
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
log('decline: module %s answered a synthesized probe on %s with an invalid plan: %s', tableSchema.vtabModuleName, tableSchema.name, e instanceof Error ? e.message : String(e));
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
if (!seekPlan.indexName || !seekPlan.seekColumnIndexes || seekPlan.seekColumnIndexes.length === 0) {
|
|
174
|
+
log('decline: module did not claim an index seek');
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
// Every seek column must be one of our equality constraints, and every
|
|
178
|
+
// constraint the seek consumes must be claimed handled — otherwise the
|
|
179
|
+
// module answered a different question than the one we will emit.
|
|
180
|
+
const constraintCols = new Set(constraints.map(c => c.columnIndex));
|
|
181
|
+
if (!seekPlan.seekColumnIndexes.every(col => constraintCols.has(col))) {
|
|
182
|
+
log('decline: seek columns extend beyond the join constraints');
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
const seekCols = new Set(seekPlan.seekColumnIndexes);
|
|
186
|
+
for (let i = 0; i < constraints.length; i++) {
|
|
187
|
+
if (seekCols.has(constraints[i].columnIndex) && seekPlan.handledFilters[i] !== true) {
|
|
188
|
+
log('decline: module claimed a seek column without handling its filter');
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// A module-supplied JS residual has no place to run in this path.
|
|
193
|
+
if (seekPlan.residualFilter) {
|
|
194
|
+
log('decline: module attached a residualFilter');
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
// The module's own statement that a seek beats a scan on this table.
|
|
198
|
+
if (seekPlan.rows === undefined || scanPlan.rows === undefined
|
|
199
|
+
|| !(seekPlan.cost < scanPlan.cost) || !(seekPlan.rows < scanPlan.rows)) {
|
|
200
|
+
log('decline: module costs do not favor the seek (seek %s/%s vs scan %s/%s)', seekPlan.cost, seekPlan.rows, scanPlan.cost, scanPlan.rows);
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
return seekPlan;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Try to build an index-nested-loop candidate for `node`: the right subtree
|
|
207
|
+
* rebuilt with its access leaf replaced by a correlated `IndexSeekNode`, plus
|
|
208
|
+
* its engine-currency cost. Returns null when any gate declines; the caller's
|
|
209
|
+
* nested-loop / hash / merge competition is then unchanged.
|
|
210
|
+
*
|
|
211
|
+
* `equiPairs` must be non-empty and oriented left=outer / right=inner (as
|
|
212
|
+
* `extractEquiPairs` produces for this join). `outerRows` is the caller's
|
|
213
|
+
* left-side estimate — the same input hash and merge selection use.
|
|
214
|
+
*/
|
|
215
|
+
export function tryIndexNestedLoop(node, equiPairs, outerRows, context) {
|
|
216
|
+
// Only the left-driven join types: the nested-loop emitter installs the left
|
|
217
|
+
// row slot before re-opening the right pipeline (driveFromLeft), which is
|
|
218
|
+
// what makes the correlated seek keys resolve. `right` / `full` drive from
|
|
219
|
+
// the right with no left slot installed. `cross` never reaches here (no
|
|
220
|
+
// condition ⇒ no equi pairs).
|
|
221
|
+
const jt = node.joinType;
|
|
222
|
+
if (jt !== 'inner' && jt !== 'left' && jt !== 'semi' && jt !== 'anti')
|
|
223
|
+
return null;
|
|
224
|
+
// Purity gate. Determinism is deliberately NOT gated: the nested loop
|
|
225
|
+
// already re-executes the inner side once per outer row, so replacing a scan
|
|
226
|
+
// with a seek does not change how often a non-deterministic inner runs.
|
|
227
|
+
// (rule-key-set-seek gates determinism because it drains its key source
|
|
228
|
+
// exactly once — a different execution-count contract.)
|
|
229
|
+
if (PlanNodeCharacteristics.subtreeHasSideEffects(node.right)) {
|
|
230
|
+
log('decline: right side has side effects');
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
const leaf = admitLeaf(node.right);
|
|
234
|
+
if (!leaf)
|
|
235
|
+
return null;
|
|
236
|
+
const resolved = resolvePairs(leaf, node.left, equiPairs);
|
|
237
|
+
if (!resolved || resolved.length === 0)
|
|
238
|
+
return null;
|
|
239
|
+
// Synthesize `leaf.col = outer.col` and run it through the same constraint
|
|
240
|
+
// extraction a pushed user predicate gets.
|
|
241
|
+
const predicate = buildSeekPredicate(leaf, node.left, resolved);
|
|
242
|
+
const tableSchema = leaf.tableSchema;
|
|
243
|
+
const tInfo = createTableInfoFromNode(leaf.source, `${tableSchema.schemaName}.${tableSchema.name}`);
|
|
244
|
+
const extraction = extractConstraints(predicate, [tInfo]);
|
|
245
|
+
const constraints = extraction.constraintsByTable.get(tInfo.relationKey) ?? [];
|
|
246
|
+
// Orientation assertion: every conjunct must have extracted as an equality
|
|
247
|
+
// on an INNER column with a correlated (per-outer-row) binding, with nothing
|
|
248
|
+
// left over. Inner-side-first construction makes this hold today; the check
|
|
249
|
+
// is here so a future extractor change declines loudly instead of seeking on
|
|
250
|
+
// the wrong column.
|
|
251
|
+
if (constraints.length !== resolved.length || extraction.residualPredicate !== undefined
|
|
252
|
+
|| !constraints.every(c => c.op === '=' && c.correlated === true
|
|
253
|
+
&& tInfo.columnIndexMap.has(c.attributeId))) {
|
|
254
|
+
log('decline: constraint extraction did not return %d oriented correlated equalities', resolved.length);
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
const seekPlan = probeModule(context, leaf, constraints);
|
|
258
|
+
if (!seekPlan)
|
|
259
|
+
return null;
|
|
260
|
+
// Reuse the full access-path machinery: collation cover (over the real
|
|
261
|
+
// `innerCol = outerCol` source expressions, so the join key's RESOLVED
|
|
262
|
+
// comparison collation is what gets checked), composite seeks, NULL
|
|
263
|
+
// handling, and reattachUnconsumedConstraints all come from
|
|
264
|
+
// selectPhysicalNode.
|
|
265
|
+
const rebuiltLeaf = selectPhysicalNode(leaf.source, seekPlan, [...constraints]);
|
|
266
|
+
// Verify an IndexSeekNode actually came back. selectPhysicalNode degrades to
|
|
267
|
+
// a SeqScan + residual on a collation decline (MISMATCH_UNSAFE — the seek
|
|
268
|
+
// would under-fetch) and to an EmptyResultNode on an "impossible" predicate;
|
|
269
|
+
// both mean no index-nested-loop here. An EmptyResultNode in particular must
|
|
270
|
+
// NOT be adopted — it would be sound only if the join key were provably
|
|
271
|
+
// literal NULL, which a dynamic per-outer-row binding never is.
|
|
272
|
+
let probe = rebuiltLeaf;
|
|
273
|
+
while (probe instanceof FilterNode)
|
|
274
|
+
probe = probe.source;
|
|
275
|
+
if (!(probe instanceof IndexSeekNode)) {
|
|
276
|
+
log('decline: selectPhysicalNode did not produce an IndexSeek (got %s)', probe.nodeType);
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
const newRight = rebuildChain(node.right, leaf, rebuiltLeaf);
|
|
280
|
+
const latencyMs = node.right.physical.expectedLatencyMs ?? 0;
|
|
281
|
+
const cost = indexNestedLoopJoinCost(outerRows, seekPlan.rows, latencyMs);
|
|
282
|
+
log('candidate: seek %s.%s via %s (%s rows/seek, cost %s for %s outer rows)', tableSchema.name, seekPlan.seekColumnIndexes.map(c => tableSchema.columns[c]?.name).join(','), seekPlan.indexName, seekPlan.rows, cost, outerRows);
|
|
283
|
+
return { newRight, cost };
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=index-nested-loop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-nested-loop.js","sourceRoot":"","sources":["../../../../../src/planner/rules/join/index-nested-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAA4B,MAAM,wCAAwC,CAAC;AAC/H,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAuB,MAAM,0BAA0B,CAAC;AAClH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAA6B,MAAM,mCAAmC,CAAC;AAElG,MAAM,GAAG,GAAG,YAAY,CAAC,kCAAkC,CAAC,CAAC;AAe7D;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,KAAyB;IAC3C,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACX,GAAG,CAAC,6EAA6E,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,GAA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AY,UAAU;QAAE,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IACzD,IAAI,CAAC,CAAC,KAAK,YAAY,aAAa,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,mEAAmE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzF,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iBAAiB,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,uBAAuB,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAK,EAAE,SAAS,CAAC,CAAC;IAC3E,GAAG,CAAC,wEAAwE,EAC3E,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,iBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC9F,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACrD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -75,14 +75,14 @@ import { EagerPrefetchNode } from '../../nodes/eager-prefetch-node.js';
|
|
|
75
75
|
import { PlanNodeCharacteristics } from '../../framework/characteristics.js';
|
|
76
76
|
const log = createLogger('optimizer:rule:fanout-batched-outer');
|
|
77
77
|
/**
|
|
78
|
-
* Best-available row estimate for the fan-out's outer.
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
78
|
+
* Best-available row estimate for the fan-out's outer. Single-source relays now
|
|
79
|
+
* carry the leaf's `physical.estimatedRows` upward (`physicalSourceRows`), but not
|
|
80
|
+
* every wrapper does — a CTE reference or a set operation in between stamps
|
|
81
|
+
* nothing — so a value can be present on the leaf's `physical` yet undefined above
|
|
82
|
+
* it. Read the node's own estimate first, then descend single-relation
|
|
83
|
+
* pass-throughs (alias/filter/sort/…) to recover the leaf's estimate. A
|
|
84
|
+
* multi-relation node (a join outer in a subquery cluster) returns `undefined`,
|
|
85
|
+
* which the caller treats as failing the cardinality gate.
|
|
86
86
|
*/
|
|
87
87
|
function outerRowEstimate(node) {
|
|
88
88
|
const direct = node.physical?.estimatedRows ?? node.estimatedRows;
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Required Characteristics:
|
|
5
5
|
* - Node must be a logical JoinNode (not already a physical join)
|
|
6
|
-
* - Node must have an equi-join predicate for hash/merge
|
|
6
|
+
* - Node must have an equi-join predicate for hash/merge/index-NL consideration
|
|
7
|
+
* - Neither side may be correlated (a correlated side must keep the
|
|
8
|
+
* nested-loop driver — hash/merge drain a side outside any outer row's scope)
|
|
7
9
|
*
|
|
8
10
|
* Applied When:
|
|
9
|
-
* - Logical JoinNode with equi-join predicates where hash
|
|
11
|
+
* - Logical JoinNode with equi-join predicates where hash join, merge join, or
|
|
12
|
+
* an index-nested-loop (per-outer-row seek into the inner side, built by
|
|
13
|
+
* `index-nested-loop.ts`) is cheaper than the plain nested loop
|
|
10
14
|
*
|
|
11
|
-
* Benefits: Replaces O(n*m) nested loop with O(n+m) hash/merge join
|
|
15
|
+
* Benefits: Replaces the O(n*m) nested loop with an O(n+m) hash/merge join, or
|
|
16
|
+
* with an O(n·seek) index-nested-loop when the inner side's module can answer
|
|
17
|
+
* an equality seek on the join key
|
|
12
18
|
*/
|
|
13
19
|
import type { PlanNode } from '../../nodes/plan-node.js';
|
|
14
20
|
import type { OptContext } from '../../framework/context.js';
|
|
15
|
-
export declare function ruleJoinPhysicalSelection(node: PlanNode,
|
|
21
|
+
export declare function ruleJoinPhysicalSelection(node: PlanNode, context: OptContext): PlanNode | null;
|
|
16
22
|
//# sourceMappingURL=rule-join-physical-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-join-physical-selection.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/join/rule-join-physical-selection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rule-join-physical-selection.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/join/rule-join-physical-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAiD,MAAM,0BAA0B,CAAC;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAmD7D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAgN9F"}
|