@quereus/quereus 2.7.0 → 2.9.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/dist/src/common/errors.d.ts +21 -0
- package/dist/src/common/errors.d.ts.map +1 -1
- package/dist/src/common/errors.js +29 -0
- package/dist/src/common/errors.js.map +1 -1
- package/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +20 -7
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/core/statement.d.ts.map +1 -1
- package/dist/src/core/statement.js +15 -5
- package/dist/src/core/statement.js.map +1 -1
- package/dist/src/emit/ast-stringify.d.ts.map +1 -1
- package/dist/src/emit/ast-stringify.js +0 -4
- package/dist/src/emit/ast-stringify.js.map +1 -1
- package/dist/src/func/builtins/explain.d.ts.map +1 -1
- package/dist/src/func/builtins/explain.js +39 -36
- package/dist/src/func/builtins/explain.js.map +1 -1
- package/dist/src/func/builtins/json-helpers.d.ts +1 -1
- package/dist/src/func/builtins/json-helpers.d.ts.map +1 -1
- package/dist/src/func/builtins/json-helpers.js.map +1 -1
- package/dist/src/func/builtins/json.d.ts.map +1 -1
- package/dist/src/func/builtins/json.js +5 -7
- package/dist/src/func/builtins/json.js.map +1 -1
- package/dist/src/func/builtins/scalar.d.ts.map +1 -1
- package/dist/src/func/builtins/scalar.js +17 -2
- package/dist/src/func/builtins/scalar.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/parser/ast.d.ts +4 -3
- package/dist/src/parser/ast.d.ts.map +1 -1
- package/dist/src/parser/lexer.d.ts.map +1 -1
- package/dist/src/parser/lexer.js +8 -48
- package/dist/src/parser/lexer.js.map +1 -1
- package/dist/src/parser/parser.d.ts.map +1 -1
- package/dist/src/parser/parser.js +43 -11
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/parser/utils.d.ts +10 -1
- package/dist/src/parser/utils.d.ts.map +1 -1
- package/dist/src/parser/utils.js +23 -0
- package/dist/src/parser/utils.js.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.js +0 -1
- package/dist/src/planner/analysis/constraint-extractor.js.map +1 -1
- package/dist/src/planner/building/constraint-builder.d.ts +12 -1
- package/dist/src/planner/building/constraint-builder.d.ts.map +1 -1
- package/dist/src/planner/building/constraint-builder.js +60 -1
- package/dist/src/planner/building/constraint-builder.js.map +1 -1
- package/dist/src/planner/building/create-view.d.ts.map +1 -1
- package/dist/src/planner/building/create-view.js +16 -0
- package/dist/src/planner/building/create-view.js.map +1 -1
- package/dist/src/planner/building/delete.d.ts.map +1 -1
- package/dist/src/planner/building/delete.js +13 -7
- package/dist/src/planner/building/delete.js.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.d.ts.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.js +27 -17
- package/dist/src/planner/building/foreign-key-builder.js.map +1 -1
- package/dist/src/planner/building/insert.d.ts.map +1 -1
- package/dist/src/planner/building/insert.js +51 -43
- package/dist/src/planner/building/insert.js.map +1 -1
- package/dist/src/planner/building/select-aggregates.d.ts +4 -1
- package/dist/src/planner/building/select-aggregates.d.ts.map +1 -1
- package/dist/src/planner/building/select-aggregates.js +122 -21
- package/dist/src/planner/building/select-aggregates.js.map +1 -1
- package/dist/src/planner/building/select-modifiers.d.ts +6 -2
- package/dist/src/planner/building/select-modifiers.d.ts.map +1 -1
- package/dist/src/planner/building/select-modifiers.js +20 -5
- package/dist/src/planner/building/select-modifiers.js.map +1 -1
- package/dist/src/planner/building/select-ordinal.d.ts +20 -0
- package/dist/src/planner/building/select-ordinal.d.ts.map +1 -0
- package/dist/src/planner/building/select-ordinal.js +62 -0
- package/dist/src/planner/building/select-ordinal.js.map +1 -0
- package/dist/src/planner/building/select.d.ts.map +1 -1
- package/dist/src/planner/building/select.js +78 -19
- package/dist/src/planner/building/select.js.map +1 -1
- package/dist/src/planner/building/update.d.ts.map +1 -1
- package/dist/src/planner/building/update.js +38 -27
- package/dist/src/planner/building/update.js.map +1 -1
- package/dist/src/planner/building/with.d.ts.map +1 -1
- package/dist/src/planner/building/with.js +25 -2
- package/dist/src/planner/building/with.js.map +1 -1
- package/dist/src/planner/framework/characteristics.d.ts +3 -1
- package/dist/src/planner/framework/characteristics.d.ts.map +1 -1
- package/dist/src/planner/framework/characteristics.js +7 -0
- package/dist/src/planner/framework/characteristics.js.map +1 -1
- package/dist/src/planner/framework/physical-utils.d.ts +22 -1
- package/dist/src/planner/framework/physical-utils.d.ts.map +1 -1
- package/dist/src/planner/framework/physical-utils.js +47 -0
- package/dist/src/planner/framework/physical-utils.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 -0
- package/dist/src/planner/nodes/alias-node.js.map +1 -1
- package/dist/src/planner/nodes/asof-scan-node.d.ts +137 -0
- package/dist/src/planner/nodes/asof-scan-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/asof-scan-node.js +223 -0
- package/dist/src/planner/nodes/asof-scan-node.js.map +1 -0
- package/dist/src/planner/nodes/constraint-check-node.d.ts +25 -1
- package/dist/src/planner/nodes/constraint-check-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/constraint-check-node.js +36 -6
- package/dist/src/planner/nodes/constraint-check-node.js.map +1 -1
- package/dist/src/planner/nodes/distinct-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/distinct-node.js +7 -0
- package/dist/src/planner/nodes/distinct-node.js.map +1 -1
- package/dist/src/planner/nodes/filter.d.ts.map +1 -1
- package/dist/src/planner/nodes/filter.js +8 -2
- package/dist/src/planner/nodes/filter.js.map +1 -1
- package/dist/src/planner/nodes/function.d.ts +11 -1
- package/dist/src/planner/nodes/function.d.ts.map +1 -1
- package/dist/src/planner/nodes/function.js +94 -1
- package/dist/src/planner/nodes/function.js.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.js +2 -0
- package/dist/src/planner/nodes/hash-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-node.js +10 -2
- package/dist/src/planner/nodes/join-node.js.map +1 -1
- package/dist/src/planner/nodes/join-utils.d.ts +19 -1
- package/dist/src/planner/nodes/join-utils.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-utils.js +46 -0
- package/dist/src/planner/nodes/join-utils.js.map +1 -1
- package/dist/src/planner/nodes/limit-offset.d.ts.map +1 -1
- package/dist/src/planner/nodes/limit-offset.js +2 -0
- 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 +4 -1
- package/dist/src/planner/nodes/merge-join-node.js.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts +50 -0
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/ordinal-slice-node.js +127 -0
- package/dist/src/planner/nodes/ordinal-slice-node.js.map +1 -0
- package/dist/src/planner/nodes/plan-node-type.d.ts +2 -0
- package/dist/src/planner/nodes/plan-node-type.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.js +2 -0
- package/dist/src/planner/nodes/plan-node-type.js.map +1 -1
- package/dist/src/planner/nodes/plan-node.d.ts +130 -1
- package/dist/src/planner/nodes/plan-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node.js +49 -0
- 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 +6 -1
- package/dist/src/planner/nodes/project-node.js.map +1 -1
- package/dist/src/planner/nodes/recursive-cte-node.d.ts +5 -3
- package/dist/src/planner/nodes/recursive-cte-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/recursive-cte-node.js +24 -8
- package/dist/src/planner/nodes/recursive-cte-node.js.map +1 -1
- package/dist/src/planner/nodes/reference.d.ts +4 -1
- package/dist/src/planner/nodes/reference.d.ts.map +1 -1
- package/dist/src/planner/nodes/reference.js +16 -0
- package/dist/src/planner/nodes/reference.js.map +1 -1
- package/dist/src/planner/nodes/returning-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/returning-node.js +5 -12
- package/dist/src/planner/nodes/returning-node.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts +7 -1
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +100 -1
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/planner/nodes/set-operation-node.d.ts +2 -1
- package/dist/src/planner/nodes/set-operation-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/set-operation-node.js +9 -0
- package/dist/src/planner/nodes/set-operation-node.js.map +1 -1
- package/dist/src/planner/nodes/sort.d.ts.map +1 -1
- package/dist/src/planner/nodes/sort.js +20 -0
- package/dist/src/planner/nodes/sort.js.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.js +2 -0
- package/dist/src/planner/nodes/stream-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.d.ts +37 -2
- package/dist/src/planner/nodes/table-access-nodes.d.ts.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.js +87 -10
- package/dist/src/planner/nodes/table-access-nodes.js.map +1 -1
- package/dist/src/planner/nodes/update-node.d.ts +1 -3
- package/dist/src/planner/nodes/update-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/update-node.js +3 -9
- package/dist/src/planner/nodes/update-node.js.map +1 -1
- package/dist/src/planner/nodes/window-node.d.ts +61 -2
- package/dist/src/planner/nodes/window-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-node.js +64 -3
- package/dist/src/planner/nodes/window-node.js.map +1 -1
- package/dist/src/planner/optimizer-tuning.d.ts +9 -0
- package/dist/src/planner/optimizer-tuning.d.ts.map +1 -1
- package/dist/src/planner/optimizer-tuning.js +3 -0
- package/dist/src/planner/optimizer-tuning.js.map +1 -1
- package/dist/src/planner/optimizer.d.ts.map +1 -1
- package/dist/src/planner/optimizer.js +91 -0
- package/dist/src/planner/optimizer.js.map +1 -1
- package/dist/src/planner/rules/access/rule-asof-strategy-select.d.ts +30 -0
- package/dist/src/planner/rules/access/rule-asof-strategy-select.d.ts.map +1 -0
- package/dist/src/planner/rules/access/rule-asof-strategy-select.js +112 -0
- package/dist/src/planner/rules/access/rule-asof-strategy-select.js.map +1 -0
- package/dist/src/planner/rules/access/rule-monotonic-limit-pushdown.d.ts +33 -0
- package/dist/src/planner/rules/access/rule-monotonic-limit-pushdown.d.ts.map +1 -0
- package/dist/src/planner/rules/access/rule-monotonic-limit-pushdown.js +162 -0
- package/dist/src/planner/rules/access/rule-monotonic-limit-pushdown.js.map +1 -0
- package/dist/src/planner/rules/access/rule-monotonic-range-access.d.ts +29 -0
- package/dist/src/planner/rules/access/rule-monotonic-range-access.d.ts.map +1 -0
- package/dist/src/planner/rules/access/rule-monotonic-range-access.js +175 -0
- package/dist/src/planner/rules/access/rule-monotonic-range-access.js.map +1 -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 +53 -36
- package/dist/src/planner/rules/access/rule-select-access-path.js.map +1 -1
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts +61 -0
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts.map +1 -0
- package/dist/src/planner/rules/join/equi-pair-extractor.js +155 -0
- package/dist/src/planner/rules/join/equi-pair-extractor.js.map +1 -0
- 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 +3 -123
- package/dist/src/planner/rules/join/rule-join-physical-selection.js.map +1 -1
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.d.ts +21 -0
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.js +405 -0
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.js.map +1 -0
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.d.ts +31 -0
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js +113 -0
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js.map +1 -0
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.js +7 -3
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-merge.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.js.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.d.ts.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.js +161 -9
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.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 +2 -2
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.d.ts +47 -0
- package/dist/src/planner/rules/window/rule-monotonic-window.d.ts.map +1 -0
- package/dist/src/planner/rules/window/rule-monotonic-window.js +341 -0
- package/dist/src/planner/rules/window/rule-monotonic-window.js.map +1 -0
- package/dist/src/runtime/context-helpers.d.ts +9 -0
- package/dist/src/runtime/context-helpers.d.ts.map +1 -1
- package/dist/src/runtime/context-helpers.js +5 -0
- package/dist/src/runtime/context-helpers.js.map +1 -1
- package/dist/src/runtime/emit/alter-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-table.js +286 -7
- package/dist/src/runtime/emit/alter-table.js.map +1 -1
- package/dist/src/runtime/emit/asof-scan.d.ts +10 -0
- package/dist/src/runtime/emit/asof-scan.d.ts.map +1 -0
- package/dist/src/runtime/emit/asof-scan.js +467 -0
- package/dist/src/runtime/emit/asof-scan.js.map +1 -0
- package/dist/src/runtime/emit/binary.d.ts.map +1 -1
- package/dist/src/runtime/emit/binary.js +12 -7
- package/dist/src/runtime/emit/binary.js.map +1 -1
- package/dist/src/runtime/emit/constraint-check.d.ts.map +1 -1
- package/dist/src/runtime/emit/constraint-check.js +145 -62
- package/dist/src/runtime/emit/constraint-check.js.map +1 -1
- package/dist/src/runtime/emit/create-assertion.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-assertion.js +6 -6
- package/dist/src/runtime/emit/create-assertion.js.map +1 -1
- package/dist/src/runtime/emit/dml-executor.d.ts.map +1 -1
- package/dist/src/runtime/emit/dml-executor.js +133 -76
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/ordinal-slice.d.ts +13 -0
- package/dist/src/runtime/emit/ordinal-slice.d.ts.map +1 -0
- package/dist/src/runtime/emit/ordinal-slice.js +89 -0
- package/dist/src/runtime/emit/ordinal-slice.js.map +1 -0
- package/dist/src/runtime/emit/recursive-cte.d.ts.map +1 -1
- package/dist/src/runtime/emit/recursive-cte.js +61 -10
- package/dist/src/runtime/emit/recursive-cte.js.map +1 -1
- package/dist/src/runtime/emit/returning.d.ts.map +1 -1
- package/dist/src/runtime/emit/returning.js +9 -4
- package/dist/src/runtime/emit/returning.js.map +1 -1
- package/dist/src/runtime/emit/scalar-function.d.ts.map +1 -1
- package/dist/src/runtime/emit/scalar-function.js +2 -1
- package/dist/src/runtime/emit/scalar-function.js.map +1 -1
- package/dist/src/runtime/emit/scan.d.ts +19 -3
- package/dist/src/runtime/emit/scan.d.ts.map +1 -1
- package/dist/src/runtime/emit/scan.js +12 -8
- package/dist/src/runtime/emit/scan.js.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.d.ts.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.js +91 -14
- package/dist/src/runtime/emit/schema-declarative.js.map +1 -1
- package/dist/src/runtime/emit/table-valued-function.d.ts.map +1 -1
- package/dist/src/runtime/emit/table-valued-function.js +4 -2
- package/dist/src/runtime/emit/table-valued-function.js.map +1 -1
- package/dist/src/runtime/emit/update.d.ts.map +1 -1
- package/dist/src/runtime/emit/update.js +8 -5
- package/dist/src/runtime/emit/update.js.map +1 -1
- package/dist/src/runtime/emit/window.d.ts.map +1 -1
- package/dist/src/runtime/emit/window.js +732 -37
- package/dist/src/runtime/emit/window.js.map +1 -1
- package/dist/src/runtime/foreign-key-actions.js +7 -6
- package/dist/src/runtime/foreign-key-actions.js.map +1 -1
- package/dist/src/runtime/register.d.ts.map +1 -1
- package/dist/src/runtime/register.js +4 -0
- package/dist/src/runtime/register.js.map +1 -1
- package/dist/src/schema/catalog.d.ts +12 -0
- package/dist/src/schema/catalog.d.ts.map +1 -1
- package/dist/src/schema/catalog.js +47 -6
- package/dist/src/schema/catalog.js.map +1 -1
- package/dist/src/schema/column.d.ts +7 -0
- package/dist/src/schema/column.d.ts.map +1 -1
- package/dist/src/schema/column.js.map +1 -1
- package/dist/src/schema/function.d.ts +28 -3
- package/dist/src/schema/function.d.ts.map +1 -1
- package/dist/src/schema/function.js.map +1 -1
- package/dist/src/schema/manager.d.ts +42 -6
- package/dist/src/schema/manager.d.ts.map +1 -1
- package/dist/src/schema/manager.js +175 -23
- package/dist/src/schema/manager.js.map +1 -1
- package/dist/src/schema/rename-rewriter.d.ts +4 -0
- package/dist/src/schema/rename-rewriter.d.ts.map +1 -0
- package/dist/src/schema/rename-rewriter.js +506 -0
- package/dist/src/schema/rename-rewriter.js.map +1 -0
- package/dist/src/schema/schema-differ.d.ts +18 -1
- package/dist/src/schema/schema-differ.d.ts.map +1 -1
- package/dist/src/schema/schema-differ.js +344 -42
- package/dist/src/schema/schema-differ.js.map +1 -1
- package/dist/src/schema/table.d.ts +65 -2
- package/dist/src/schema/table.d.ts.map +1 -1
- package/dist/src/schema/table.js +144 -0
- package/dist/src/schema/table.js.map +1 -1
- package/dist/src/types/logical-type.d.ts +11 -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/util/ast-literal.d.ts +11 -0
- package/dist/src/util/ast-literal.d.ts.map +1 -0
- package/dist/src/util/ast-literal.js +26 -0
- package/dist/src/util/ast-literal.js.map +1 -0
- package/dist/src/util/async-iterator.d.ts +2 -1
- package/dist/src/util/async-iterator.d.ts.map +1 -1
- package/dist/src/util/async-iterator.js +4 -4
- package/dist/src/util/async-iterator.js.map +1 -1
- package/dist/src/util/patterns.d.ts.map +1 -1
- package/dist/src/util/patterns.js +58 -10
- package/dist/src/util/patterns.js.map +1 -1
- package/dist/src/vtab/best-access-plan.d.ts +48 -0
- package/dist/src/vtab/best-access-plan.d.ts.map +1 -1
- package/dist/src/vtab/best-access-plan.js +29 -0
- package/dist/src/vtab/best-access-plan.js.map +1 -1
- package/dist/src/vtab/filter-info.d.ts +14 -0
- package/dist/src/vtab/filter-info.d.ts.map +1 -1
- package/dist/src/vtab/memory/index.d.ts +8 -0
- package/dist/src/vtab/memory/index.d.ts.map +1 -1
- package/dist/src/vtab/memory/index.js +11 -0
- package/dist/src/vtab/memory/index.js.map +1 -1
- package/dist/src/vtab/memory/layer/base.d.ts +8 -1
- package/dist/src/vtab/memory/layer/base.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/base.js +36 -2
- package/dist/src/vtab/memory/layer/base.js.map +1 -1
- package/dist/src/vtab/memory/layer/manager.d.ts +5 -1
- package/dist/src/vtab/memory/layer/manager.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.js +63 -13
- package/dist/src/vtab/memory/layer/manager.js.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.js +21 -2
- package/dist/src/vtab/memory/layer/transaction.js.map +1 -1
- package/dist/src/vtab/memory/module.d.ts +45 -2
- package/dist/src/vtab/memory/module.d.ts.map +1 -1
- package/dist/src/vtab/memory/module.js +268 -27
- package/dist/src/vtab/memory/module.js.map +1 -1
- package/dist/src/vtab/memory/utils/predicate.d.ts +27 -0
- package/dist/src/vtab/memory/utils/predicate.d.ts.map +1 -0
- package/dist/src/vtab/memory/utils/predicate.js +182 -0
- package/dist/src/vtab/memory/utils/predicate.js.map +1 -0
- package/dist/src/vtab/module.d.ts +24 -0
- package/dist/src/vtab/module.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-asof-strategy-select.js","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-asof-strategy-select.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,GAAG,GAAG,YAAY,CAAC,qCAAqC,CAAC,CAAC;AAOhE;;;;GAIG;AACH,SAAS,kBAAkB,CAC1B,QAAkE,EAClE,KAAgC,EAChC,SAAiB;IAEjB,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,SAAS;QAAE,OAAO,IAAI,CAAC;IAC1D,MAAM,GAAG,GAAoB,EAAE,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE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AAK,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QACrD,GAAG,CAAC,+DAA+D,EAClE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,QAAQ,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QACrC,GAAG,CAAC,mEAAmE,EACtE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAC9B,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,kBAAkB;IAClB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,MAAM,CAAC,kBAAkB,CAAC;IACxE,IAAI,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC/C,GAAG,CAAC,oEAAoE,EACvE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACb,CAAC;IAED,GAAG,CAAC,uEAAuE,EAC1E,SAAS,EAAE,YAAY,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: Monotonic LIMIT/OFFSET pushdown
|
|
3
|
+
*
|
|
4
|
+
* Pattern (the rule peels through these in order, top-down from the
|
|
5
|
+
* LimitOffsetNode toward the leaf):
|
|
6
|
+
*
|
|
7
|
+
* LimitOffsetNode
|
|
8
|
+
* └─ SortNode? (single trivial column ref matching leaf monotonicOn)
|
|
9
|
+
* └─ (ProjectNode | AliasNode)* (only trivial column-reference projections)
|
|
10
|
+
* └─ IndexScan / IndexSeek / SeqScan
|
|
11
|
+
* (advertises monotonicOn AND accessCapabilities.ordinalSeek)
|
|
12
|
+
*
|
|
13
|
+
* On a successful match, the entire `LimitOffset[/Sort]/.../leaf` subtree is
|
|
14
|
+
* replaced with `…/OrdinalSlice(leaf)` — the OrdinalSlice slots in directly
|
|
15
|
+
* above the leaf, threading the resolved offset/limit into the leaf's
|
|
16
|
+
* FilterInfo so the vtab can seek directly to the kth row in O(log N)
|
|
17
|
+
* instead of buffering k+n rows.
|
|
18
|
+
*
|
|
19
|
+
* Trivial Project nodes (all projections are bare ColumnReferenceNodes) and
|
|
20
|
+
* Alias wrappers preserve row count and order, so we can descend through
|
|
21
|
+
* them — the OrdinalSlice still slices the leaf in monotonic order.
|
|
22
|
+
*
|
|
23
|
+
* The rule rejects all of:
|
|
24
|
+
* - `Sort` whose key isn't a single trivial column ref into the leaf
|
|
25
|
+
* - `Sort` direction mismatching the advertised `monotonicOn.direction`
|
|
26
|
+
* - any non-trivial intermediate node (Filter, Distinct, Aggregate, etc.)
|
|
27
|
+
* - leaf advertising `monotonicOn` but not `ordinalSeek`
|
|
28
|
+
* - multi-key `ORDER BY`
|
|
29
|
+
*/
|
|
30
|
+
import type { PlanNode } from '../../nodes/plan-node.js';
|
|
31
|
+
import type { OptContext } from '../../framework/context.js';
|
|
32
|
+
export declare function ruleMonotonicLimitPushdown(node: PlanNode, _context: OptContext): PlanNode | null;
|
|
33
|
+
//# sourceMappingURL=rule-monotonic-limit-pushdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-monotonic-limit-pushdown.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-monotonic-limit-pushdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAsB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AA+F7D,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CA0EhG"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: Monotonic LIMIT/OFFSET pushdown
|
|
3
|
+
*
|
|
4
|
+
* Pattern (the rule peels through these in order, top-down from the
|
|
5
|
+
* LimitOffsetNode toward the leaf):
|
|
6
|
+
*
|
|
7
|
+
* LimitOffsetNode
|
|
8
|
+
* └─ SortNode? (single trivial column ref matching leaf monotonicOn)
|
|
9
|
+
* └─ (ProjectNode | AliasNode)* (only trivial column-reference projections)
|
|
10
|
+
* └─ IndexScan / IndexSeek / SeqScan
|
|
11
|
+
* (advertises monotonicOn AND accessCapabilities.ordinalSeek)
|
|
12
|
+
*
|
|
13
|
+
* On a successful match, the entire `LimitOffset[/Sort]/.../leaf` subtree is
|
|
14
|
+
* replaced with `…/OrdinalSlice(leaf)` — the OrdinalSlice slots in directly
|
|
15
|
+
* above the leaf, threading the resolved offset/limit into the leaf's
|
|
16
|
+
* FilterInfo so the vtab can seek directly to the kth row in O(log N)
|
|
17
|
+
* instead of buffering k+n rows.
|
|
18
|
+
*
|
|
19
|
+
* Trivial Project nodes (all projections are bare ColumnReferenceNodes) and
|
|
20
|
+
* Alias wrappers preserve row count and order, so we can descend through
|
|
21
|
+
* them — the OrdinalSlice still slices the leaf in monotonic order.
|
|
22
|
+
*
|
|
23
|
+
* The rule rejects all of:
|
|
24
|
+
* - `Sort` whose key isn't a single trivial column ref into the leaf
|
|
25
|
+
* - `Sort` direction mismatching the advertised `monotonicOn.direction`
|
|
26
|
+
* - any non-trivial intermediate node (Filter, Distinct, Aggregate, etc.)
|
|
27
|
+
* - leaf advertising `monotonicOn` but not `ordinalSeek`
|
|
28
|
+
* - multi-key `ORDER BY`
|
|
29
|
+
*/
|
|
30
|
+
import { createLogger } from '../../../common/logger.js';
|
|
31
|
+
import { isRelationalNode } from '../../nodes/plan-node.js';
|
|
32
|
+
import { LimitOffsetNode } from '../../nodes/limit-offset.js';
|
|
33
|
+
import { SortNode } from '../../nodes/sort.js';
|
|
34
|
+
import { AliasNode } from '../../nodes/alias-node.js';
|
|
35
|
+
import { ProjectNode } from '../../nodes/project-node.js';
|
|
36
|
+
import { SeqScanNode, IndexScanNode, IndexSeekNode } from '../../nodes/table-access-nodes.js';
|
|
37
|
+
import { ColumnReferenceNode } from '../../nodes/reference.js';
|
|
38
|
+
import { OrdinalSliceNode } from '../../nodes/ordinal-slice-node.js';
|
|
39
|
+
const log = createLogger('optimizer:rule:monotonic-limit-pushdown');
|
|
40
|
+
function isAccessLeaf(node) {
|
|
41
|
+
return node instanceof SeqScanNode || node instanceof IndexScanNode || node instanceof IndexSeekNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A Project is "trivial" iff every projection is a bare ColumnReferenceNode.
|
|
45
|
+
* Trivial projects preserve row count, order, and per-row identity, so an
|
|
46
|
+
* OrdinalSlice underneath them still computes the right slice indices.
|
|
47
|
+
*
|
|
48
|
+
* Computed/expression projections might mutate cardinality (impossible for
|
|
49
|
+
* pure scalars, but the conservative check keeps the rule simple) or change
|
|
50
|
+
* the meaning of "kth row" if combined with subqueries; we exclude them.
|
|
51
|
+
*/
|
|
52
|
+
function isTrivialProject(project) {
|
|
53
|
+
return project.projections.every(p => p.node instanceof ColumnReferenceNode);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Walk down from `chainRoot` toward the access leaf, descending only through
|
|
57
|
+
* trivial Project / Alias wrappers. Returns null if we hit a non-trivial node
|
|
58
|
+
* before reaching the leaf.
|
|
59
|
+
*/
|
|
60
|
+
function peelToLeaf(chainRoot) {
|
|
61
|
+
let cursor = chainRoot;
|
|
62
|
+
let sort;
|
|
63
|
+
if (cursor instanceof SortNode) {
|
|
64
|
+
sort = cursor;
|
|
65
|
+
cursor = cursor.source;
|
|
66
|
+
}
|
|
67
|
+
let safety = 16;
|
|
68
|
+
while (safety-- > 0) {
|
|
69
|
+
if (isAccessLeaf(cursor)) {
|
|
70
|
+
return { leaf: cursor, chainRoot, sort };
|
|
71
|
+
}
|
|
72
|
+
if (cursor instanceof AliasNode) {
|
|
73
|
+
cursor = cursor.source;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (cursor instanceof ProjectNode && isTrivialProject(cursor)) {
|
|
77
|
+
cursor = cursor.source;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Rebuild the chain `chainRoot → … → oldLeaf` with `oldLeaf` replaced by
|
|
86
|
+
* `newLeaf`. Each intermediate node is reconstructed via `withChildren`,
|
|
87
|
+
* preserving its other children (scalar inputs to Project / Sort).
|
|
88
|
+
*/
|
|
89
|
+
function rebuildChain(chainRoot, oldLeaf, newLeaf) {
|
|
90
|
+
if (chainRoot === oldLeaf) {
|
|
91
|
+
return newLeaf;
|
|
92
|
+
}
|
|
93
|
+
const originalChildren = chainRoot.getChildren();
|
|
94
|
+
const newChildren = originalChildren.map(child => {
|
|
95
|
+
if (isRelationalNode(child)) {
|
|
96
|
+
return rebuildChain(child, oldLeaf, newLeaf);
|
|
97
|
+
}
|
|
98
|
+
return child;
|
|
99
|
+
});
|
|
100
|
+
return chainRoot.withChildren(newChildren);
|
|
101
|
+
}
|
|
102
|
+
export function ruleMonotonicLimitPushdown(node, _context) {
|
|
103
|
+
if (!(node instanceof LimitOffsetNode))
|
|
104
|
+
return null;
|
|
105
|
+
// Degenerate LimitOffset (no bounds) — nothing to push down.
|
|
106
|
+
if (!node.limit && !node.offset)
|
|
107
|
+
return null;
|
|
108
|
+
const peeled = peelToLeaf(node.source);
|
|
109
|
+
if (!peeled) {
|
|
110
|
+
log('Could not peel down to a physical access leaf from %s', node.source.nodeType);
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const physical = peeled.leaf.physical;
|
|
114
|
+
if (!physical.accessCapabilities?.ordinalSeek) {
|
|
115
|
+
log('Leaf does not advertise ordinalSeek; skipping');
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const monotonicOn = physical.monotonicOn;
|
|
119
|
+
if (!monotonicOn || monotonicOn.length === 0) {
|
|
120
|
+
log('Leaf advertises ordinalSeek but no monotonicOn; skipping');
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
const leafMonotonic = monotonicOn[0];
|
|
124
|
+
// If a Sort is present, it must be a single trivial column ref whose
|
|
125
|
+
// attribute id and direction match the leaf's monotonicOn[0].
|
|
126
|
+
if (peeled.sort) {
|
|
127
|
+
if (peeled.sort.sortKeys.length !== 1) {
|
|
128
|
+
log('Sort has %d keys; multi-key ORDER BY not supported', peeled.sort.sortKeys.length);
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
const key = peeled.sort.sortKeys[0];
|
|
132
|
+
if (!(key.expression instanceof ColumnReferenceNode)) {
|
|
133
|
+
log('Sort key is not a trivial column reference');
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
if (key.expression.attributeId !== leafMonotonic.attrId) {
|
|
137
|
+
log('Sort key attr=%d does not match leaf monotonicOn attr=%d', key.expression.attributeId, leafMonotonic.attrId);
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
if (key.direction !== leafMonotonic.direction) {
|
|
141
|
+
log('Sort direction %s does not match leaf monotonicOn direction %s', key.direction, leafMonotonic.direction);
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Build OrdinalSlice over the leaf, then re-stitch the chain above it.
|
|
146
|
+
const slice = new OrdinalSliceNode(node.scope, peeled.leaf, leafMonotonic.attrId, node.offset, node.limit, leafMonotonic.direction);
|
|
147
|
+
// `chainRoot` is the original LimitOffset.source — could be Sort, Project,
|
|
148
|
+
// Alias, or the leaf itself. We replace the leaf in that chain with the
|
|
149
|
+
// slice and drop the Sort if present (the slice preserves emit order).
|
|
150
|
+
let rewrittenSource;
|
|
151
|
+
if (peeled.sort) {
|
|
152
|
+
// Drop the Sort entirely: the slice's source already emits in the
|
|
153
|
+
// requested order, so re-sorting would be wasteful.
|
|
154
|
+
rewrittenSource = rebuildChain(peeled.sort.source, peeled.leaf, slice);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
rewrittenSource = rebuildChain(peeled.chainRoot, peeled.leaf, slice);
|
|
158
|
+
}
|
|
159
|
+
log('Replaced LimitOffset[/Sort]/leaf with OrdinalSlice (attr=%d, %s)', leafMonotonic.attrId, leafMonotonic.direction);
|
|
160
|
+
return rewrittenSource;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=rule-monotonic-limit-pushdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-monotonic-limit-pushdown.js","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-monotonic-limit-pushdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAA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AAwE;IACxE,uEAAuE;IACvE,IAAI,eAAmC,CAAC;IACxC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACjB,kEAAkE;QAClE,oDAAoD;QACpD,eAAe,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACP,eAAe,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAED,GAAG,CAAC,kEAAkE,EACrE,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAChD,OAAO,eAAe,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: Monotonic range scan recognition
|
|
3
|
+
*
|
|
4
|
+
* Two responsibilities, gated by node type:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Annotation (leaf nodes — IndexScan / IndexSeek / SeqScan)**:
|
|
7
|
+
* When the leaf advertises `monotonicOn(x)` and its `FilterInfo.constraints`
|
|
8
|
+
* carries a handled range/equality on `x`, set `physical.rangeBoundedOn` so
|
|
9
|
+
* EXPLAIN and downstream rules can read off the symbolic bound. This is a
|
|
10
|
+
* pure annotation — it does not change the row stream.
|
|
11
|
+
*
|
|
12
|
+
* 2. **Defensive `monotonicOn` drop (Filter directly above a leaf)**:
|
|
13
|
+
* If a `FilterNode` sits directly above a leaf that advertises
|
|
14
|
+
* `monotonicOn(x)` and the filter's predicate contains a range or equality
|
|
15
|
+
* on `x` (i.e., the vtab declined to handle the bound), the row stream
|
|
16
|
+
* emerging from the *Filter* is no longer monotonic over the WHERE-restricted
|
|
17
|
+
* set. Drop `monotonicOn` (and the implied `accessCapabilities`) from the
|
|
18
|
+
* leaf so downstream rules (asof, merge-join) don't make false assumptions.
|
|
19
|
+
*
|
|
20
|
+
* The rule runs in the PostOptimization pass so it sees physical leaves with
|
|
21
|
+
* lifted advertisements + resolved FilterInfo. The annotation reads off the
|
|
22
|
+
* leaf's own `FilterInfo.constraints` (the canonical record of which bounds
|
|
23
|
+
* the access path is walking with). The defensive escalation reads the parent
|
|
24
|
+
* Filter's predicate.
|
|
25
|
+
*/
|
|
26
|
+
import type { PlanNode } from '../../nodes/plan-node.js';
|
|
27
|
+
import type { OptContext } from '../../framework/context.js';
|
|
28
|
+
export declare function ruleMonotonicRangeAccess(node: PlanNode, _ctx: OptContext): PlanNode | null;
|
|
29
|
+
//# sourceMappingURL=rule-monotonic-range-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-monotonic-range-access.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-monotonic-range-access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAuN7D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAQ1F"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: Monotonic range scan recognition
|
|
3
|
+
*
|
|
4
|
+
* Two responsibilities, gated by node type:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Annotation (leaf nodes — IndexScan / IndexSeek / SeqScan)**:
|
|
7
|
+
* When the leaf advertises `monotonicOn(x)` and its `FilterInfo.constraints`
|
|
8
|
+
* carries a handled range/equality on `x`, set `physical.rangeBoundedOn` so
|
|
9
|
+
* EXPLAIN and downstream rules can read off the symbolic bound. This is a
|
|
10
|
+
* pure annotation — it does not change the row stream.
|
|
11
|
+
*
|
|
12
|
+
* 2. **Defensive `monotonicOn` drop (Filter directly above a leaf)**:
|
|
13
|
+
* If a `FilterNode` sits directly above a leaf that advertises
|
|
14
|
+
* `monotonicOn(x)` and the filter's predicate contains a range or equality
|
|
15
|
+
* on `x` (i.e., the vtab declined to handle the bound), the row stream
|
|
16
|
+
* emerging from the *Filter* is no longer monotonic over the WHERE-restricted
|
|
17
|
+
* set. Drop `monotonicOn` (and the implied `accessCapabilities`) from the
|
|
18
|
+
* leaf so downstream rules (asof, merge-join) don't make false assumptions.
|
|
19
|
+
*
|
|
20
|
+
* The rule runs in the PostOptimization pass so it sees physical leaves with
|
|
21
|
+
* lifted advertisements + resolved FilterInfo. The annotation reads off the
|
|
22
|
+
* leaf's own `FilterInfo.constraints` (the canonical record of which bounds
|
|
23
|
+
* the access path is walking with). The defensive escalation reads the parent
|
|
24
|
+
* Filter's predicate.
|
|
25
|
+
*/
|
|
26
|
+
import { createLogger } from '../../../common/logger.js';
|
|
27
|
+
import { IndexConstraintOp } from '../../../common/constants.js';
|
|
28
|
+
import { SeqScanNode, IndexScanNode, IndexSeekNode } from '../../nodes/table-access-nodes.js';
|
|
29
|
+
import { FilterNode } from '../../nodes/filter.js';
|
|
30
|
+
import { LiteralNode } from '../../nodes/scalar.js';
|
|
31
|
+
import { extractConstraints, createTableInfoFromNode } from '../../analysis/constraint-extractor.js';
|
|
32
|
+
const log = createLogger('optimizer:rule:monotonic-range-access');
|
|
33
|
+
function isAccessLeaf(node) {
|
|
34
|
+
return node instanceof SeqScanNode || node instanceof IndexScanNode || node instanceof IndexSeekNode;
|
|
35
|
+
}
|
|
36
|
+
const GE_OR_GT = new Set([IndexConstraintOp.GE, IndexConstraintOp.GT]);
|
|
37
|
+
const LE_OR_LT = new Set([IndexConstraintOp.LE, IndexConstraintOp.LT]);
|
|
38
|
+
/**
|
|
39
|
+
* Walk the leaf's `FilterInfo.constraints` looking for handled bounds on the
|
|
40
|
+
* given column index. Returns the synthesized RangeBounds (literals included
|
|
41
|
+
* when the corresponding seek key is a LiteralNode); returns null when no
|
|
42
|
+
* range/equality bound exists.
|
|
43
|
+
*/
|
|
44
|
+
function extractRangeBounds(filterInfo, seekKeys, colIdx) {
|
|
45
|
+
const out = {};
|
|
46
|
+
let any = false;
|
|
47
|
+
for (const entry of filterInfo.constraints) {
|
|
48
|
+
const c = entry.constraint;
|
|
49
|
+
if (c.iColumn !== colIdx)
|
|
50
|
+
continue;
|
|
51
|
+
// argvIndex is 1-based into seekKeys (when seekKeys is the IndexSeekNode's seekKeys array).
|
|
52
|
+
const seekKey = seekKeys && entry.argvIndex >= 1 && entry.argvIndex <= seekKeys.length
|
|
53
|
+
? seekKeys[entry.argvIndex - 1]
|
|
54
|
+
: undefined;
|
|
55
|
+
const valueLiteral = seekKey instanceof LiteralNode ? seekKey.expression.value : undefined;
|
|
56
|
+
if (GE_OR_GT.has(c.op)) {
|
|
57
|
+
const op = c.op === IndexConstraintOp.GE ? '>=' : '>';
|
|
58
|
+
out.lower = valueLiteral !== undefined ? { op, valueLiteral } : { op };
|
|
59
|
+
any = true;
|
|
60
|
+
}
|
|
61
|
+
else if (LE_OR_LT.has(c.op)) {
|
|
62
|
+
const op = c.op === IndexConstraintOp.LE ? '<=' : '<';
|
|
63
|
+
out.upper = valueLiteral !== undefined ? { op, valueLiteral } : { op };
|
|
64
|
+
any = true;
|
|
65
|
+
}
|
|
66
|
+
else if (c.op === IndexConstraintOp.EQ) {
|
|
67
|
+
// Equality is a degenerate range [v, v]. Lift to both bounds.
|
|
68
|
+
const lo = valueLiteral !== undefined ? { op: '>=', valueLiteral } : { op: '>=' };
|
|
69
|
+
const hi = valueLiteral !== undefined ? { op: '<=', valueLiteral } : { op: '<=' };
|
|
70
|
+
out.lower = lo;
|
|
71
|
+
out.upper = hi;
|
|
72
|
+
any = true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return any ? out : null;
|
|
76
|
+
}
|
|
77
|
+
function findColIndexForAttr(leaf, attrId) {
|
|
78
|
+
const attrs = leaf.source.getAttributes();
|
|
79
|
+
for (let i = 0; i < attrs.length; i++) {
|
|
80
|
+
if (attrs[i].id === attrId)
|
|
81
|
+
return i;
|
|
82
|
+
}
|
|
83
|
+
return -1;
|
|
84
|
+
}
|
|
85
|
+
/** Clone a leaf, attaching `rangeBoundedOn` to its physical properties. */
|
|
86
|
+
function leafWithRangeBound(leaf, rb) {
|
|
87
|
+
if (leaf instanceof SeqScanNode) {
|
|
88
|
+
return new SeqScanNode(leaf.scope, leaf.source, leaf.filterInfo, undefined, rb, leaf.suppressMonotonic);
|
|
89
|
+
}
|
|
90
|
+
if (leaf instanceof IndexScanNode) {
|
|
91
|
+
return new IndexScanNode(leaf.scope, leaf.source, leaf.filterInfo, leaf.indexName, leaf.providesOrdering, undefined, leaf.advertisement, rb, leaf.suppressMonotonic);
|
|
92
|
+
}
|
|
93
|
+
// IndexSeekNode
|
|
94
|
+
return new IndexSeekNode(leaf.scope, leaf.source, leaf.filterInfo, leaf.indexName, leaf.seekKeys, leaf.isRange, leaf.providesOrdering, undefined, leaf.advertisement, rb, leaf.suppressMonotonic);
|
|
95
|
+
}
|
|
96
|
+
/** Clone a leaf, suppressing the lifted `monotonicOn` advertisement. */
|
|
97
|
+
function leafWithMonotonicSuppressed(leaf) {
|
|
98
|
+
if (leaf instanceof SeqScanNode) {
|
|
99
|
+
return new SeqScanNode(leaf.scope, leaf.source, leaf.filterInfo, undefined, leaf.rangeBoundedOn, true);
|
|
100
|
+
}
|
|
101
|
+
if (leaf instanceof IndexScanNode) {
|
|
102
|
+
return new IndexScanNode(leaf.scope, leaf.source, leaf.filterInfo, leaf.indexName, leaf.providesOrdering, undefined, leaf.advertisement, leaf.rangeBoundedOn, true);
|
|
103
|
+
}
|
|
104
|
+
return new IndexSeekNode(leaf.scope, leaf.source, leaf.filterInfo, leaf.indexName, leaf.seekKeys, leaf.isRange, leaf.providesOrdering, undefined, leaf.advertisement, leaf.rangeBoundedOn, true);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Annotation pass for a physical access leaf. Sets `rangeBoundedOn` when the
|
|
108
|
+
* leaf advertises `monotonicOn(x)` AND its FilterInfo carries a handled
|
|
109
|
+
* range/equality on `x`. No-op otherwise.
|
|
110
|
+
*/
|
|
111
|
+
function applyAnnotation(leaf) {
|
|
112
|
+
// Don't re-annotate if we've already set rangeBoundedOn.
|
|
113
|
+
if (leaf.rangeBoundedOn)
|
|
114
|
+
return null;
|
|
115
|
+
const monotonicOn = leaf.physical.monotonicOn;
|
|
116
|
+
if (!monotonicOn || monotonicOn.length === 0)
|
|
117
|
+
return null;
|
|
118
|
+
const attrId = monotonicOn[0].attrId;
|
|
119
|
+
const colIdx = findColIndexForAttr(leaf, attrId);
|
|
120
|
+
if (colIdx < 0)
|
|
121
|
+
return null;
|
|
122
|
+
const seekKeys = leaf instanceof IndexSeekNode ? leaf.seekKeys : undefined;
|
|
123
|
+
const bounds = extractRangeBounds(leaf.filterInfo, seekKeys, colIdx);
|
|
124
|
+
if (!bounds)
|
|
125
|
+
return null;
|
|
126
|
+
const rb = {
|
|
127
|
+
attrId,
|
|
128
|
+
...(bounds.lower ? { lower: bounds.lower } : {}),
|
|
129
|
+
...(bounds.upper ? { upper: bounds.upper } : {}),
|
|
130
|
+
};
|
|
131
|
+
log('Annotating %s with rangeBoundedOn (attrId=%d)', leaf.nodeType, attrId);
|
|
132
|
+
return leafWithRangeBound(leaf, rb);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Defensive escalation: when a Filter sits directly above a leaf that
|
|
136
|
+
* advertises monotonicOn(x), and the Filter's predicate contains a range or
|
|
137
|
+
* equality on x, drop monotonicOn from the leaf — the row stream emerging
|
|
138
|
+
* from the Filter is not monotonic over the WHERE-restricted tuple set.
|
|
139
|
+
*/
|
|
140
|
+
function applyDefensiveDrop(filter) {
|
|
141
|
+
if (!isAccessLeaf(filter.source))
|
|
142
|
+
return null;
|
|
143
|
+
const leaf = filter.source;
|
|
144
|
+
const monotonicOn = leaf.physical.monotonicOn;
|
|
145
|
+
if (!monotonicOn || monotonicOn.length === 0)
|
|
146
|
+
return null;
|
|
147
|
+
if (leaf.suppressMonotonic)
|
|
148
|
+
return null;
|
|
149
|
+
const attrId = monotonicOn[0].attrId;
|
|
150
|
+
const colIdx = findColIndexForAttr(leaf, attrId);
|
|
151
|
+
if (colIdx < 0)
|
|
152
|
+
return null;
|
|
153
|
+
// Walk the Filter predicate to see if it carries a range/equality on the
|
|
154
|
+
// monotonic column. We use the constraint extractor to canonicalize the
|
|
155
|
+
// predicate, then look for a constraint on the matching attribute id.
|
|
156
|
+
const tableInfo = createTableInfoFromNode(leaf.source);
|
|
157
|
+
const result = extractConstraints(filter.predicate, [tableInfo]);
|
|
158
|
+
const offending = result.allConstraints.some(c => c.attributeId === attrId &&
|
|
159
|
+
(c.op === '=' || c.op === '>' || c.op === '>=' || c.op === '<' || c.op === '<='));
|
|
160
|
+
if (!offending)
|
|
161
|
+
return null;
|
|
162
|
+
log('Filter directly above leaf carries unhandled range on monotonic attr %d; suppressing monotonicOn', attrId);
|
|
163
|
+
const newLeaf = leafWithMonotonicSuppressed(leaf);
|
|
164
|
+
return filter.withChildren([newLeaf, filter.predicate]);
|
|
165
|
+
}
|
|
166
|
+
export function ruleMonotonicRangeAccess(node, _ctx) {
|
|
167
|
+
if (node instanceof FilterNode) {
|
|
168
|
+
return applyDefensiveDrop(node);
|
|
169
|
+
}
|
|
170
|
+
if (isAccessLeaf(node)) {
|
|
171
|
+
return applyAnnotation(node);
|
|
172
|
+
}
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=rule-monotonic-range-access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-monotonic-range-access.js","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-monotonic-range-access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAIzD,OAA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C,CAAC;IACjC,CAAC;IACD,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-select-access-path.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-select-access-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"rule-select-access-path.d.ts","sourceRoot":"","sources":["../../../../../src/planner/rules/access/rule-select-access-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAoC7D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CA0DzF"}
|