@quereus/quereus 2.9.0 → 3.0.1
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 +224 -222
- package/dist/src/core/database-assertions.d.ts +36 -16
- package/dist/src/core/database-assertions.d.ts.map +1 -1
- package/dist/src/core/database-assertions.js +222 -118
- package/dist/src/core/database-assertions.js.map +1 -1
- package/dist/src/core/database-transaction.d.ts +96 -13
- package/dist/src/core/database-transaction.d.ts.map +1 -1
- package/dist/src/core/database-transaction.js +294 -35
- package/dist/src/core/database-transaction.js.map +1 -1
- package/dist/src/core/database-watchers.d.ts +58 -0
- package/dist/src/core/database-watchers.d.ts.map +1 -0
- package/dist/src/core/database-watchers.js +206 -0
- package/dist/src/core/database-watchers.js.map +1 -0
- package/dist/src/core/database.d.ts +78 -5
- package/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +120 -20
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/core/statement.d.ts +9 -0
- package/dist/src/core/statement.d.ts.map +1 -1
- package/dist/src/core/statement.js +29 -0
- package/dist/src/core/statement.js.map +1 -1
- package/dist/src/core/table-handle.d.ts +45 -0
- package/dist/src/core/table-handle.d.ts.map +1 -0
- package/dist/src/core/table-handle.js +54 -0
- package/dist/src/core/table-handle.js.map +1 -0
- package/dist/src/func/builtins/conversion.d.ts.map +1 -1
- package/dist/src/func/builtins/conversion.js +12 -1
- package/dist/src/func/builtins/conversion.js.map +1 -1
- package/dist/src/func/builtins/explain.d.ts.map +1 -1
- package/dist/src/func/builtins/explain.js +22 -8
- package/dist/src/func/builtins/explain.js.map +1 -1
- package/dist/src/func/builtins/generation.d.ts.map +1 -1
- package/dist/src/func/builtins/generation.js +26 -1
- package/dist/src/func/builtins/generation.js.map +1 -1
- package/dist/src/func/builtins/index.d.ts.map +1 -1
- package/dist/src/func/builtins/index.js +5 -1
- package/dist/src/func/builtins/index.js.map +1 -1
- package/dist/src/func/builtins/json-tvf.d.ts.map +1 -1
- package/dist/src/func/builtins/json-tvf.js +16 -2
- package/dist/src/func/builtins/json-tvf.js.map +1 -1
- package/dist/src/func/builtins/schema.d.ts +4 -0
- package/dist/src/func/builtins/schema.d.ts.map +1 -1
- package/dist/src/func/builtins/schema.js +270 -11
- package/dist/src/func/builtins/schema.js.map +1 -1
- package/dist/src/func/registration.d.ts +19 -1
- package/dist/src/func/registration.d.ts.map +1 -1
- package/dist/src/func/registration.js +8 -3
- package/dist/src/func/registration.js.map +1 -1
- package/dist/src/index.d.ts +7 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/parser/parser.d.ts.map +1 -1
- package/dist/src/parser/parser.js +12 -4
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/planner/analysis/assertion-classifier.d.ts +71 -0
- package/dist/src/planner/analysis/assertion-classifier.d.ts.map +1 -0
- package/dist/src/planner/analysis/assertion-classifier.js +286 -0
- package/dist/src/planner/analysis/assertion-classifier.js.map +1 -0
- package/dist/src/planner/analysis/assertion-hoist-cache.d.ts +34 -0
- package/dist/src/planner/analysis/assertion-hoist-cache.d.ts.map +1 -0
- package/dist/src/planner/analysis/assertion-hoist-cache.js +119 -0
- package/dist/src/planner/analysis/assertion-hoist-cache.js.map +1 -0
- package/dist/src/planner/analysis/binding-extractor.d.ts +58 -0
- package/dist/src/planner/analysis/binding-extractor.d.ts.map +1 -0
- package/dist/src/planner/analysis/binding-extractor.js +110 -0
- package/dist/src/planner/analysis/binding-extractor.js.map +1 -0
- package/dist/src/planner/analysis/change-scope.d.ts +184 -0
- package/dist/src/planner/analysis/change-scope.d.ts.map +1 -0
- package/dist/src/planner/analysis/change-scope.js +825 -0
- package/dist/src/planner/analysis/change-scope.js.map +1 -0
- package/dist/src/planner/analysis/check-extraction.d.ts +29 -0
- package/dist/src/planner/analysis/check-extraction.d.ts.map +1 -0
- package/dist/src/planner/analysis/check-extraction.js +420 -0
- package/dist/src/planner/analysis/check-extraction.js.map +1 -0
- package/dist/src/planner/analysis/constraint-extractor.d.ts +47 -7
- package/dist/src/planner/analysis/constraint-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.js +186 -93
- package/dist/src/planner/analysis/constraint-extractor.js.map +1 -1
- package/dist/src/planner/analysis/partial-unique-extraction.d.ts +68 -0
- package/dist/src/planner/analysis/partial-unique-extraction.d.ts.map +1 -0
- package/dist/src/planner/analysis/partial-unique-extraction.js +347 -0
- package/dist/src/planner/analysis/partial-unique-extraction.js.map +1 -0
- package/dist/src/planner/analysis/predicate-conjuncts.d.ts +14 -0
- package/dist/src/planner/analysis/predicate-conjuncts.d.ts.map +1 -0
- package/dist/src/planner/analysis/predicate-conjuncts.js +31 -0
- package/dist/src/planner/analysis/predicate-conjuncts.js.map +1 -0
- package/dist/src/planner/analysis/predicate-shape.d.ts +52 -0
- package/dist/src/planner/analysis/predicate-shape.d.ts.map +1 -0
- package/dist/src/planner/analysis/predicate-shape.js +119 -0
- package/dist/src/planner/analysis/predicate-shape.js.map +1 -0
- package/dist/src/planner/analysis/sat-checker.d.ts +43 -0
- package/dist/src/planner/analysis/sat-checker.d.ts.map +1 -0
- package/dist/src/planner/analysis/sat-checker.js +393 -0
- package/dist/src/planner/analysis/sat-checker.js.map +1 -0
- package/dist/src/planner/building/table.d.ts.map +1 -1
- package/dist/src/planner/building/table.js +1 -1
- package/dist/src/planner/building/table.js.map +1 -1
- package/dist/src/planner/framework/characteristics.d.ts +10 -1
- package/dist/src/planner/framework/characteristics.d.ts.map +1 -1
- package/dist/src/planner/framework/characteristics.js +24 -5
- package/dist/src/planner/framework/characteristics.js.map +1 -1
- package/dist/src/planner/framework/context.d.ts +1 -8
- package/dist/src/planner/framework/context.d.ts.map +1 -1
- package/dist/src/planner/framework/context.js +4 -21
- package/dist/src/planner/framework/context.js.map +1 -1
- package/dist/src/planner/framework/pass.d.ts +18 -2
- package/dist/src/planner/framework/pass.d.ts.map +1 -1
- package/dist/src/planner/framework/pass.js +145 -46
- package/dist/src/planner/framework/pass.js.map +1 -1
- package/dist/src/planner/framework/physical-utils.d.ts +0 -9
- package/dist/src/planner/framework/physical-utils.d.ts.map +1 -1
- package/dist/src/planner/framework/physical-utils.js +0 -31
- package/dist/src/planner/framework/physical-utils.js.map +1 -1
- package/dist/src/planner/nodes/aggregate-node.d.ts +25 -0
- package/dist/src/planner/nodes/aggregate-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/aggregate-node.js +75 -8
- 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 +6 -1
- package/dist/src/planner/nodes/alias-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 +17 -3
- package/dist/src/planner/nodes/asof-scan-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 +19 -9
- package/dist/src/planner/nodes/bloom-join-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 +10 -6
- package/dist/src/planner/nodes/distinct-node.js.map +1 -1
- package/dist/src/planner/nodes/empty-relation-node.d.ts +27 -0
- package/dist/src/planner/nodes/empty-relation-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/empty-relation-node.js +61 -0
- package/dist/src/planner/nodes/empty-relation-node.js.map +1 -0
- package/dist/src/planner/nodes/filter.d.ts.map +1 -1
- package/dist/src/planner/nodes/filter.js +65 -5
- package/dist/src/planner/nodes/filter.js.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.d.ts +1 -1
- package/dist/src/planner/nodes/hash-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.js +8 -6
- 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 +12 -9
- package/dist/src/planner/nodes/join-node.js.map +1 -1
- package/dist/src/planner/nodes/join-utils.d.ts +24 -1
- package/dist/src/planner/nodes/join-utils.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-utils.js +86 -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 +6 -1
- 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 +19 -9
- package/dist/src/planner/nodes/merge-join-node.js.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.js +5 -2
- package/dist/src/planner/nodes/ordinal-slice-node.js.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.d.ts +1 -0
- package/dist/src/planner/nodes/plan-node-type.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.js +1 -0
- package/dist/src/planner/nodes/plan-node-type.js.map +1 -1
- package/dist/src/planner/nodes/plan-node.d.ts +186 -4
- 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 +75 -30
- package/dist/src/planner/nodes/project-node.js.map +1 -1
- package/dist/src/planner/nodes/reference.d.ts +24 -2
- package/dist/src/planner/nodes/reference.d.ts.map +1 -1
- package/dist/src/planner/nodes/reference.js +101 -1
- package/dist/src/planner/nodes/reference.js.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.d.ts +9 -1
- package/dist/src/planner/nodes/retrieve-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.js +21 -0
- package/dist/src/planner/nodes/retrieve-node.js.map +1 -1
- package/dist/src/planner/nodes/returning-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/returning-node.js +64 -28
- package/dist/src/planner/nodes/returning-node.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts +1 -0
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +12 -0
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/planner/nodes/set-operation-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/set-operation-node.js +15 -0
- package/dist/src/planner/nodes/set-operation-node.js.map +1 -1
- package/dist/src/planner/nodes/single-row.d.ts.map +1 -1
- package/dist/src/planner/nodes/single-row.js +3 -1
- package/dist/src/planner/nodes/single-row.js.map +1 -1
- package/dist/src/planner/nodes/sort.d.ts.map +1 -1
- package/dist/src/planner/nodes/sort.js +10 -3
- package/dist/src/planner/nodes/sort.js.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.d.ts +1 -1
- package/dist/src/planner/nodes/stream-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.js +8 -8
- package/dist/src/planner/nodes/stream-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.d.ts +3 -3
- package/dist/src/planner/nodes/table-access-nodes.d.ts.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.js +26 -8
- package/dist/src/planner/nodes/table-access-nodes.js.map +1 -1
- package/dist/src/planner/nodes/table-function-call.d.ts +4 -1
- package/dist/src/planner/nodes/table-function-call.d.ts.map +1 -1
- package/dist/src/planner/nodes/table-function-call.js +224 -14
- package/dist/src/planner/nodes/table-function-call.js.map +1 -1
- package/dist/src/planner/nodes/window-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-node.js +9 -2
- package/dist/src/planner/nodes/window-node.js.map +1 -1
- package/dist/src/planner/optimizer-tuning.d.ts +29 -1
- 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 +187 -0
- package/dist/src/planner/optimizer.js.map +1 -1
- 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 +22 -7
- package/dist/src/planner/rules/access/rule-select-access-path.js.map +1 -1
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.d.ts +30 -0
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.d.ts.map +1 -0
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.js +116 -0
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.js.map +1 -0
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.d.ts +7 -7
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.d.ts.map +1 -1
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.js +18 -16
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.js.map +1 -1
- package/dist/src/planner/rules/join/rule-join-elimination.d.ts +56 -0
- package/dist/src/planner/rules/join/rule-join-elimination.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-join-elimination.js +326 -0
- package/dist/src/planner/rules/join/rule-join-elimination.js.map +1 -0
- package/dist/src/planner/rules/join/rule-join-greedy-commute.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-join-greedy-commute.js +10 -2
- package/dist/src/planner/rules/join/rule-join-greedy-commute.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.d.ts +20 -0
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.js +181 -0
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.js.map +1 -0
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.d.ts +46 -0
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.js +156 -0
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.js.map +1 -0
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.d.ts +30 -0
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.js +60 -0
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.js.map +1 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.d.ts +45 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js +210 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js.map +1 -0
- package/dist/src/planner/rules/predicate/rule-sargable-range-rewrite.d.ts +29 -0
- package/dist/src/planner/rules/predicate/rule-sargable-range-rewrite.d.ts.map +1 -0
- package/dist/src/planner/rules/predicate/rule-sargable-range-rewrite.js +161 -0
- package/dist/src/planner/rules/predicate/rule-sargable-range-rewrite.js.map +1 -0
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.d.ts +39 -0
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.d.ts.map +1 -0
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.js +91 -0
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.js.map +1 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.d.ts +35 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.d.ts.map +1 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js +74 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js.map +1 -0
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.d.ts +27 -0
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.d.ts.map +1 -0
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js +103 -0
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js.map +1 -0
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js +1 -25
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js.map +1 -1
- package/dist/src/planner/scopes/global.js +2 -2
- package/dist/src/planner/scopes/global.js.map +1 -1
- package/dist/src/planner/type-utils.d.ts.map +1 -1
- package/dist/src/planner/type-utils.js +11 -0
- package/dist/src/planner/type-utils.js.map +1 -1
- package/dist/src/planner/util/fd-utils.d.ts +245 -0
- package/dist/src/planner/util/fd-utils.d.ts.map +1 -0
- package/dist/src/planner/util/fd-utils.js +1416 -0
- package/dist/src/planner/util/fd-utils.js.map +1 -0
- package/dist/src/planner/util/ind-utils.d.ts +79 -0
- package/dist/src/planner/util/ind-utils.d.ts.map +1 -0
- package/dist/src/planner/util/ind-utils.js +146 -0
- package/dist/src/planner/util/ind-utils.js.map +1 -0
- package/dist/src/planner/util/key-utils.d.ts +75 -14
- package/dist/src/planner/util/key-utils.d.ts.map +1 -1
- package/dist/src/planner/util/key-utils.js +234 -57
- package/dist/src/planner/util/key-utils.js.map +1 -1
- package/dist/src/runtime/delta-executor.d.ts +134 -0
- package/dist/src/runtime/delta-executor.d.ts.map +1 -0
- package/dist/src/runtime/delta-executor.js +382 -0
- package/dist/src/runtime/delta-executor.js.map +1 -0
- package/dist/src/runtime/emit/alter-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-table.js +70 -24
- package/dist/src/runtime/emit/alter-table.js.map +1 -1
- package/dist/src/runtime/emit/create-assertion.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-assertion.js +3 -2
- 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 +121 -41
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/drop-assertion.js +1 -1
- package/dist/src/runtime/emit/drop-assertion.js.map +1 -1
- package/dist/src/runtime/emit/empty-relation.d.ts +5 -0
- package/dist/src/runtime/emit/empty-relation.d.ts.map +1 -0
- package/dist/src/runtime/emit/empty-relation.js +11 -0
- package/dist/src/runtime/emit/empty-relation.js.map +1 -0
- package/dist/src/runtime/foreign-key-actions.d.ts +39 -0
- package/dist/src/runtime/foreign-key-actions.d.ts.map +1 -1
- package/dist/src/runtime/foreign-key-actions.js +219 -1
- 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 +2 -0
- package/dist/src/runtime/register.js.map +1 -1
- package/dist/src/schema/assertion.d.ts +8 -0
- package/dist/src/schema/assertion.d.ts.map +1 -1
- package/dist/src/schema/change-events.d.ts +5 -1
- package/dist/src/schema/change-events.d.ts.map +1 -1
- package/dist/src/schema/change-events.js.map +1 -1
- package/dist/src/schema/function.d.ts +65 -1
- package/dist/src/schema/function.d.ts.map +1 -1
- package/dist/src/schema/function.js +31 -0
- package/dist/src/schema/function.js.map +1 -1
- package/dist/src/schema/manager.d.ts +33 -0
- package/dist/src/schema/manager.d.ts.map +1 -1
- package/dist/src/schema/manager.js +95 -4
- package/dist/src/schema/manager.js.map +1 -1
- package/dist/src/schema/rename-rewriter.d.ts +32 -0
- package/dist/src/schema/rename-rewriter.d.ts.map +1 -1
- package/dist/src/schema/rename-rewriter.js +392 -105
- package/dist/src/schema/rename-rewriter.js.map +1 -1
- package/dist/src/schema/table.d.ts +21 -2
- package/dist/src/schema/table.d.ts.map +1 -1
- package/dist/src/schema/table.js +17 -8
- package/dist/src/schema/table.js.map +1 -1
- package/dist/src/types/temporal-types.d.ts.map +1 -1
- package/dist/src/types/temporal-types.js +32 -0
- package/dist/src/types/temporal-types.js.map +1 -1
- package/dist/src/vtab/events.d.ts +9 -0
- package/dist/src/vtab/events.d.ts.map +1 -1
- package/dist/src/vtab/events.js +19 -0
- package/dist/src/vtab/events.js.map +1 -1
- package/dist/src/vtab/memory/layer/connection.d.ts +20 -8
- package/dist/src/vtab/memory/layer/connection.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/connection.js +95 -73
- package/dist/src/vtab/memory/layer/connection.js.map +1 -1
- package/dist/src/vtab/memory/layer/manager.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.js +91 -10
- package/dist/src/vtab/memory/layer/manager.js.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.d.ts +0 -8
- package/dist/src/vtab/memory/layer/transaction.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.js +0 -15
- package/dist/src/vtab/memory/layer/transaction.js.map +1 -1
- package/dist/src/vtab/memory/table.d.ts.map +1 -1
- package/dist/src/vtab/memory/table.js +13 -2
- package/dist/src/vtab/memory/table.js.map +1 -1
- package/dist/src/vtab/memory/utils/predicate.d.ts +2 -1
- package/dist/src/vtab/memory/utils/predicate.d.ts.map +1 -1
- package/dist/src/vtab/memory/utils/predicate.js +32 -1
- package/dist/src/vtab/memory/utils/predicate.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract *guarded* FDs from partial UNIQUE constraints — those synthesized
|
|
3
|
+
* from `CREATE UNIQUE INDEX (K) WHERE P`. Inside the partial scope `P`, the
|
|
4
|
+
* columns `K` form a key, so `K → all_other_cols` holds; outside the scope
|
|
5
|
+
* the FD does not hold. We encode this as a guarded FD whose guard is the
|
|
6
|
+
* AND-conjunctive decomposition of `P` into clauses the FD-machinery can
|
|
7
|
+
* activate (see `GuardClause` in plan-node.ts).
|
|
8
|
+
*
|
|
9
|
+
* `TableReferenceNode.computePhysical` calls this alongside CHECK-derived
|
|
10
|
+
* FDs; Filter activation in `FilterNode` discharges the guard when a
|
|
11
|
+
* surrounding predicate entails every clause.
|
|
12
|
+
*
|
|
13
|
+
* Soundness rule: every conjunct of `P` must map to a recognized clause. A
|
|
14
|
+
* predicate with any unrecognized conjunct produces *no* FD — discharging on
|
|
15
|
+
* a weaker partial predicate would falsely activate the FD for rows the
|
|
16
|
+
* unrecognized conjunct excludes.
|
|
17
|
+
*
|
|
18
|
+
* Recognized conjunct shapes:
|
|
19
|
+
* col = literal ⇒ eq-literal
|
|
20
|
+
* literal = col ⇒ eq-literal (normalized)
|
|
21
|
+
* col1 = col2 ⇒ eq-column
|
|
22
|
+
* col IS NULL ⇒ is-null (negated:false)
|
|
23
|
+
* col IS NOT NULL ⇒ is-null (negated:true)
|
|
24
|
+
* NOT col (NOT-NULL numeric col) ⇒ eq-literal { col, value: 0 } (SQL false)
|
|
25
|
+
* col IN (lit, lit, …) ⇒ or-of [eq-literal …] (singleton collapses)
|
|
26
|
+
* a OR b OR … ⇒ or-of [recognize(a), recognize(b), …]
|
|
27
|
+
* col > literal ⇒ range { col, min: lit, minInc: false, maxInc: false }
|
|
28
|
+
* col >= literal ⇒ range { col, min: lit, minInc: true, maxInc: false }
|
|
29
|
+
* col < literal ⇒ range { col, max: lit, maxInc: false, minInc: false }
|
|
30
|
+
* col <= literal ⇒ range { col, max: lit, maxInc: true, minInc: false }
|
|
31
|
+
* literal op col ⇒ flipped to col op' literal, then as above
|
|
32
|
+
* col BETWEEN lo AND hi ⇒ range { col, min: lo, max: hi, minInc: true, maxInc: true }
|
|
33
|
+
*
|
|
34
|
+
* `NOT col` is rewritten to `col = 0` (SQLite encodes boolean FALSE as 0).
|
|
35
|
+
* This excludes NULL rows semantically — but the NOT-NULL gate below is
|
|
36
|
+
* syntactic, so `NOT col` on a nominally-nullable UC column is rejected to
|
|
37
|
+
* avoid double-counting that exclusion across producer and consumer. The
|
|
38
|
+
* rewrite is additionally gated on the column's logical type being numeric:
|
|
39
|
+
* for TEXT/BLOB/BOOLEAN columns `col = 0` is not equivalent to `NOT col`
|
|
40
|
+
* (TEXT `''` is falsy but is not equal-to-integer-0 under the strict
|
|
41
|
+
* `sqlValueEquals` comparison used by the consumer), so the rewrite would
|
|
42
|
+
* falsely activate a `col = 0` guard for rows the runtime UC never excluded.
|
|
43
|
+
*
|
|
44
|
+
* NOT-NULL gate: every UC column must be effectively non-NULL inside the
|
|
45
|
+
* partial scope. A column qualifies if either (a) it is declared NOT NULL on
|
|
46
|
+
* the table, or (b) the partial predicate has a matching `col IS NOT NULL`
|
|
47
|
+
* conjunct. Case (b) is sound because the FD only activates when a
|
|
48
|
+
* surrounding predicate entails every guard clause, including that
|
|
49
|
+
* `IS NOT NULL` clause — so discharge cannot falsely activate the FD over
|
|
50
|
+
* rows where the UC column could be NULL. A nullable UC column whose
|
|
51
|
+
* `IS NOT NULL` is not in the predicate would allow multiple NULLs inside
|
|
52
|
+
* scope, so `K → others` would not hold; those are rejected. Mirrors the
|
|
53
|
+
* relation-level rule in `relationTypeFromTableSchema` (type-utils.ts),
|
|
54
|
+
* relaxed for partial scopes that establish non-nullness themselves.
|
|
55
|
+
*
|
|
56
|
+
* Out-of-scope shapes (filed as backlog tickets in the implement ticket):
|
|
57
|
+
* - function-call / cast-wrapped column references in IN / NOT shapes
|
|
58
|
+
* - standalone `col` (truthy test) — only `NOT col` is recognized
|
|
59
|
+
* - IN / NOT / OR inside CHECK implication disjuncts
|
|
60
|
+
* - NOT BETWEEN (decomposes to a disjunction of two ranges)
|
|
61
|
+
* - symbolic/parameter range bounds (`age >= ?`)
|
|
62
|
+
* - per-column collation-aware text bound comparison
|
|
63
|
+
*/
|
|
64
|
+
import { columnIndexFromExpr, flattenDisjunction, flipComparison, literalValue } from './predicate-shape.js';
|
|
65
|
+
const cache = new WeakMap();
|
|
66
|
+
export function getPartialUniqueGuardedFds(tableSchema) {
|
|
67
|
+
let cached = cache.get(tableSchema);
|
|
68
|
+
if (!cached) {
|
|
69
|
+
cached = extractPartialUniqueGuardedFds(tableSchema);
|
|
70
|
+
cache.set(tableSchema, cached);
|
|
71
|
+
}
|
|
72
|
+
return cached;
|
|
73
|
+
}
|
|
74
|
+
export function extractPartialUniqueGuardedFds(tableSchema) {
|
|
75
|
+
const out = [];
|
|
76
|
+
const ucs = tableSchema.uniqueConstraints;
|
|
77
|
+
if (!ucs)
|
|
78
|
+
return out;
|
|
79
|
+
const colCount = tableSchema.columns.length;
|
|
80
|
+
const isColumnNotNullDeclared = (col) => tableSchema.columns[col]?.notNull === true;
|
|
81
|
+
const isColumnNumericDeclared = (col) => tableSchema.columns[col]?.logicalType?.isNumeric === true;
|
|
82
|
+
for (const uc of ucs) {
|
|
83
|
+
if (uc.predicate === undefined)
|
|
84
|
+
continue;
|
|
85
|
+
const clauses = recognizeGuardClauses(uc.predicate, tableSchema.columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared);
|
|
86
|
+
if (!clauses)
|
|
87
|
+
continue;
|
|
88
|
+
if (clauses.length === 0)
|
|
89
|
+
continue;
|
|
90
|
+
// NOT-NULL gate: each UC column must be effectively non-NULL inside the
|
|
91
|
+
// partial scope — either declared NOT NULL, or forced so by an
|
|
92
|
+
// `IS NOT NULL` conjunct of the partial predicate (which is one of the
|
|
93
|
+
// guard clauses, so discharge will require it).
|
|
94
|
+
const nonNullByPredicate = new Set();
|
|
95
|
+
for (const c of clauses) {
|
|
96
|
+
if (c.kind === 'is-null' && c.negated === true)
|
|
97
|
+
nonNullByPredicate.add(c.column);
|
|
98
|
+
}
|
|
99
|
+
const allUcColumnsNonNullable = uc.columns.every(idx => tableSchema.columns[idx]?.notNull === true || nonNullByPredicate.has(idx));
|
|
100
|
+
if (!allUcColumnsNonNullable)
|
|
101
|
+
continue;
|
|
102
|
+
const det = Array.from(uc.columns);
|
|
103
|
+
const detSet = new Set(det);
|
|
104
|
+
const dep = [];
|
|
105
|
+
for (let i = 0; i < colCount; i++) {
|
|
106
|
+
if (!detSet.has(i))
|
|
107
|
+
dep.push(i);
|
|
108
|
+
}
|
|
109
|
+
if (dep.length === 0)
|
|
110
|
+
continue;
|
|
111
|
+
const guard = { clauses };
|
|
112
|
+
out.push({ determinants: det, dependents: dep, guard });
|
|
113
|
+
}
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Decompose a partial-index predicate into AND-conjunctive guard clauses.
|
|
118
|
+
*
|
|
119
|
+
* Returns `undefined` (NOT `[]`) if any conjunct fails to map to a recognized
|
|
120
|
+
* `GuardClause` — the entire FD must be skipped in that case. Returns `[]`
|
|
121
|
+
* only for trivially empty inputs (which the caller treats as "no FD").
|
|
122
|
+
*/
|
|
123
|
+
function recognizeGuardClauses(expr, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared) {
|
|
124
|
+
const conjuncts = [];
|
|
125
|
+
const stack = [expr];
|
|
126
|
+
while (stack.length > 0) {
|
|
127
|
+
const cur = stack.pop();
|
|
128
|
+
if (cur.type === 'binary' && cur.operator === 'AND') {
|
|
129
|
+
const b = cur;
|
|
130
|
+
// Preserve textual order: push right then left so left is processed first.
|
|
131
|
+
stack.push(b.right, b.left);
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
conjuncts.push(cur);
|
|
135
|
+
}
|
|
136
|
+
const clauses = [];
|
|
137
|
+
for (const conjunct of conjuncts) {
|
|
138
|
+
const clause = recognizeClause(conjunct, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared);
|
|
139
|
+
if (!clause)
|
|
140
|
+
return undefined;
|
|
141
|
+
clauses.push(clause);
|
|
142
|
+
}
|
|
143
|
+
return clauses;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Recognize one conjunct (or disjunct, when called recursively from
|
|
147
|
+
* `recognizeOr`) as a guard clause.
|
|
148
|
+
*
|
|
149
|
+
* Accepted shapes:
|
|
150
|
+
* col = literal ⇒ eq-literal { column, value }
|
|
151
|
+
* literal = col ⇒ eq-literal { column, value } (normalized)
|
|
152
|
+
* col1 = col2 ⇒ eq-column { left, right }
|
|
153
|
+
* col IS NULL ⇒ is-null { column, negated:false }
|
|
154
|
+
* col IS NOT NULL ⇒ is-null { column, negated:true }
|
|
155
|
+
* NOT col ⇒ eq-literal { column, value: 0 } (declared NOT NULL + numeric only)
|
|
156
|
+
* col IN (lit, …) ⇒ or-of [eq-literal { col, lit_i } …]
|
|
157
|
+
* a OR b OR … ⇒ or-of [recognize(a), recognize(b), …]
|
|
158
|
+
* col > literal ⇒ range { col, min: lit, minInc: false, maxInc: false }
|
|
159
|
+
* col >= literal ⇒ range { col, min: lit, minInc: true, maxInc: false }
|
|
160
|
+
* col < literal ⇒ range { col, max: lit, maxInc: false, minInc: false }
|
|
161
|
+
* col <= literal ⇒ range { col, max: lit, maxInc: true, minInc: false }
|
|
162
|
+
* literal op col ⇒ flipped to col op' literal, then as above
|
|
163
|
+
* col BETWEEN lo AND hi ⇒ range { col, min: lo, max: hi, minInc: true, maxInc: true }
|
|
164
|
+
*
|
|
165
|
+
* `=` and `==` are interchangeable. NULL-literal bounds are rejected. Anything
|
|
166
|
+
* else returns undefined — the whole predicate is then dropped on the floor
|
|
167
|
+
* by the caller.
|
|
168
|
+
*
|
|
169
|
+
* For `NOT col`, only declared-NOT-NULL **and** declared-numeric columns are
|
|
170
|
+
* accepted: the rewrite to `col = 0` implicitly excludes NULL rows, but the
|
|
171
|
+
* NOT-NULL gate for the UC is syntactic. Rather than teach the gate about
|
|
172
|
+
* `NOT col`, the simpler/sound choice is to reject `NOT col` on
|
|
173
|
+
* nominally-nullable columns at the producer. The numeric gate is required
|
|
174
|
+
* because `col = 0` (under strict `sqlValueEquals`) only matches numeric
|
|
175
|
+
* zero — TEXT `''` and BOOLEAN `false` are falsy but compare unequal to
|
|
176
|
+
* integer 0, so the rewrite would falsely activate the FD for rows the
|
|
177
|
+
* runtime UC never excluded.
|
|
178
|
+
*/
|
|
179
|
+
function recognizeClause(expr, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared) {
|
|
180
|
+
if (expr.type === 'unary') {
|
|
181
|
+
const u = expr;
|
|
182
|
+
if (u.operator === 'IS NULL' || u.operator === 'IS NOT NULL') {
|
|
183
|
+
const col = columnIndexFromExpr(u.expr, columnIndexMap);
|
|
184
|
+
if (col === undefined)
|
|
185
|
+
return undefined;
|
|
186
|
+
return { kind: 'is-null', column: col, negated: u.operator === 'IS NOT NULL' };
|
|
187
|
+
}
|
|
188
|
+
if (u.operator === 'NOT') {
|
|
189
|
+
const col = columnIndexFromExpr(u.expr, columnIndexMap);
|
|
190
|
+
if (col === undefined)
|
|
191
|
+
return undefined;
|
|
192
|
+
if (!isColumnNotNullDeclared(col))
|
|
193
|
+
return undefined;
|
|
194
|
+
if (!isColumnNumericDeclared(col))
|
|
195
|
+
return undefined;
|
|
196
|
+
return { kind: 'eq-literal', column: col, value: 0 };
|
|
197
|
+
}
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
if (expr.type === 'in') {
|
|
201
|
+
return recognizeIn(expr, columnIndexMap);
|
|
202
|
+
}
|
|
203
|
+
if (expr.type === 'between') {
|
|
204
|
+
return recognizeBetween(expr, columnIndexMap);
|
|
205
|
+
}
|
|
206
|
+
if (expr.type === 'binary') {
|
|
207
|
+
const b = expr;
|
|
208
|
+
if (b.operator === 'OR') {
|
|
209
|
+
return recognizeOr(b, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared);
|
|
210
|
+
}
|
|
211
|
+
if (b.operator === '=' || b.operator === '==') {
|
|
212
|
+
const lIdx = columnIndexFromExpr(b.left, columnIndexMap);
|
|
213
|
+
const rIdx = columnIndexFromExpr(b.right, columnIndexMap);
|
|
214
|
+
if (lIdx !== undefined && rIdx !== undefined) {
|
|
215
|
+
if (lIdx === rIdx)
|
|
216
|
+
return undefined;
|
|
217
|
+
return { kind: 'eq-column', left: lIdx, right: rIdx };
|
|
218
|
+
}
|
|
219
|
+
if (lIdx !== undefined) {
|
|
220
|
+
const lit = literalValue(b.right);
|
|
221
|
+
if (lit === undefined)
|
|
222
|
+
return undefined;
|
|
223
|
+
return { kind: 'eq-literal', column: lIdx, value: lit };
|
|
224
|
+
}
|
|
225
|
+
if (rIdx !== undefined) {
|
|
226
|
+
const lit = literalValue(b.left);
|
|
227
|
+
if (lit === undefined)
|
|
228
|
+
return undefined;
|
|
229
|
+
return { kind: 'eq-literal', column: rIdx, value: lit };
|
|
230
|
+
}
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
if (b.operator === '<' || b.operator === '<=' || b.operator === '>' || b.operator === '>=') {
|
|
234
|
+
return recognizeRange(b, columnIndexMap);
|
|
235
|
+
}
|
|
236
|
+
return undefined;
|
|
237
|
+
}
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Recognize `col op literal` (or operand-flipped `literal op col`) as a range
|
|
242
|
+
* guard. NULL literal bounds are rejected.
|
|
243
|
+
*/
|
|
244
|
+
function recognizeRange(b, columnIndexMap) {
|
|
245
|
+
const lIdx = columnIndexFromExpr(b.left, columnIndexMap);
|
|
246
|
+
const rIdx = columnIndexFromExpr(b.right, columnIndexMap);
|
|
247
|
+
let colIdx;
|
|
248
|
+
let lit;
|
|
249
|
+
let op;
|
|
250
|
+
if (lIdx !== undefined) {
|
|
251
|
+
lit = literalValue(b.right);
|
|
252
|
+
colIdx = lIdx;
|
|
253
|
+
op = b.operator;
|
|
254
|
+
}
|
|
255
|
+
else if (rIdx !== undefined) {
|
|
256
|
+
lit = literalValue(b.left);
|
|
257
|
+
colIdx = rIdx;
|
|
258
|
+
op = flipComparison(b.operator);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
if (lit === undefined || lit === null || colIdx === undefined)
|
|
264
|
+
return undefined;
|
|
265
|
+
switch (op) {
|
|
266
|
+
case '>':
|
|
267
|
+
return { kind: 'range', column: colIdx, min: lit, minInclusive: false, maxInclusive: false };
|
|
268
|
+
case '>=':
|
|
269
|
+
return { kind: 'range', column: colIdx, min: lit, minInclusive: true, maxInclusive: false };
|
|
270
|
+
case '<':
|
|
271
|
+
return { kind: 'range', column: colIdx, max: lit, minInclusive: false, maxInclusive: false };
|
|
272
|
+
case '<=':
|
|
273
|
+
return { kind: 'range', column: colIdx, max: lit, minInclusive: false, maxInclusive: true };
|
|
274
|
+
}
|
|
275
|
+
return undefined;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Recognize `col BETWEEN literal AND literal` as a closed-interval range
|
|
279
|
+
* guard. `NOT BETWEEN` is rejected (decomposes to a disjunction of two range
|
|
280
|
+
* halves which doesn't fit a single range clause).
|
|
281
|
+
*/
|
|
282
|
+
function recognizeBetween(expr, columnIndexMap) {
|
|
283
|
+
if (expr.not === true)
|
|
284
|
+
return undefined;
|
|
285
|
+
const colIdx = columnIndexFromExpr(expr.expr, columnIndexMap);
|
|
286
|
+
if (colIdx === undefined)
|
|
287
|
+
return undefined;
|
|
288
|
+
const lo = literalValue(expr.lower);
|
|
289
|
+
const hi = literalValue(expr.upper);
|
|
290
|
+
if (lo === undefined || lo === null)
|
|
291
|
+
return undefined;
|
|
292
|
+
if (hi === undefined || hi === null)
|
|
293
|
+
return undefined;
|
|
294
|
+
return { kind: 'range', column: colIdx, min: lo, max: hi, minInclusive: true, maxInclusive: true };
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Recognize `col IN (lit, lit, …)` as an `or-of` of `eq-literal` clauses.
|
|
298
|
+
* IN-with-subquery, non-literal values, or any other shape returns undefined.
|
|
299
|
+
* A singleton list collapses to a bare `eq-literal`.
|
|
300
|
+
*/
|
|
301
|
+
function recognizeIn(expr, columnIndexMap) {
|
|
302
|
+
if (expr.subquery !== undefined)
|
|
303
|
+
return undefined;
|
|
304
|
+
if (!expr.values || expr.values.length === 0)
|
|
305
|
+
return undefined;
|
|
306
|
+
const col = columnIndexFromExpr(expr.expr, columnIndexMap);
|
|
307
|
+
if (col === undefined)
|
|
308
|
+
return undefined;
|
|
309
|
+
const subs = [];
|
|
310
|
+
for (const v of expr.values) {
|
|
311
|
+
const lit = literalValue(v);
|
|
312
|
+
if (lit === undefined)
|
|
313
|
+
return undefined;
|
|
314
|
+
subs.push({ kind: 'eq-literal', column: col, value: lit });
|
|
315
|
+
}
|
|
316
|
+
if (subs.length === 1)
|
|
317
|
+
return subs[0];
|
|
318
|
+
return { kind: 'or-of', clauses: subs };
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Recognize a top-level `OR` chain as a flat `or-of`. Each disjunct must
|
|
322
|
+
* itself be a recognized clause. Nested `or-of` clauses are inlined so the
|
|
323
|
+
* result is single-level. A singleton (degenerate) collapses to the
|
|
324
|
+
* underlying clause.
|
|
325
|
+
*/
|
|
326
|
+
function recognizeOr(expr, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared) {
|
|
327
|
+
const disjuncts = flattenDisjunction(expr);
|
|
328
|
+
if (disjuncts.length === 0)
|
|
329
|
+
return undefined;
|
|
330
|
+
const subs = [];
|
|
331
|
+
for (const d of disjuncts) {
|
|
332
|
+
const sub = recognizeClause(d, columnIndexMap, isColumnNotNullDeclared, isColumnNumericDeclared);
|
|
333
|
+
if (!sub)
|
|
334
|
+
return undefined;
|
|
335
|
+
if (sub.kind === 'or-of') {
|
|
336
|
+
for (const s of sub.clauses)
|
|
337
|
+
subs.push(s);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
subs.push(sub);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (subs.length === 1)
|
|
344
|
+
return subs[0];
|
|
345
|
+
return { kind: 'or-of', clauses: subs };
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=partial-unique-extraction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-unique-extraction.js","sourceRoot":"","sources":["../../../../src/planner/analysis/partial-unique-extraction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAKH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,YA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SAAS,CAAC;QAC3B,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC1B,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,OAAO;gBAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;IACF,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACtC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conjunct helpers for predicate rewriting.
|
|
3
|
+
*
|
|
4
|
+
* `splitConjuncts` flattens an AND-tree into its individual conjuncts;
|
|
5
|
+
* `combineConjuncts` rebuilds an AND-tree from a list. Operators that need to
|
|
6
|
+
* partition / push / inspect predicates conjunct-by-conjunct (subquery
|
|
7
|
+
* decorrelation, aggregate predicate pushdown, etc.) share these.
|
|
8
|
+
*/
|
|
9
|
+
import type { ScalarPlanNode } from '../nodes/plan-node.js';
|
|
10
|
+
/** Split an AND-tree into its conjuncts. Non-AND predicates yield a single-element list. */
|
|
11
|
+
export declare function splitConjuncts(pred: ScalarPlanNode): ScalarPlanNode[];
|
|
12
|
+
/** Combine conjuncts back into a left-associative AND-tree; returns null when empty. */
|
|
13
|
+
export declare function combineConjuncts(conjuncts: ScalarPlanNode[]): ScalarPlanNode | null;
|
|
14
|
+
//# sourceMappingURL=predicate-conjuncts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-conjuncts.d.ts","sourceRoot":"","sources":["../../../../src/planner/analysis/predicate-conjuncts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,EAAE,CAYrE;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,cAAc,GAAG,IAAI,CAUnF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conjunct helpers for predicate rewriting.
|
|
3
|
+
*
|
|
4
|
+
* `splitConjuncts` flattens an AND-tree into its individual conjuncts;
|
|
5
|
+
* `combineConjuncts` rebuilds an AND-tree from a list. Operators that need to
|
|
6
|
+
* partition / push / inspect predicates conjunct-by-conjunct (subquery
|
|
7
|
+
* decorrelation, aggregate predicate pushdown, etc.) share these.
|
|
8
|
+
*/
|
|
9
|
+
import { BinaryOpNode } from '../nodes/scalar.js';
|
|
10
|
+
/** Split an AND-tree into its conjuncts. Non-AND predicates yield a single-element list. */
|
|
11
|
+
export function splitConjuncts(pred) {
|
|
12
|
+
const result = [];
|
|
13
|
+
const stack = [pred];
|
|
14
|
+
while (stack.length) {
|
|
15
|
+
const n = stack.pop();
|
|
16
|
+
if (n instanceof BinaryOpNode && n.expression.operator === 'AND') {
|
|
17
|
+
stack.push(n.left, n.right);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
result.push(n);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
/** Combine conjuncts back into a left-associative AND-tree; returns null when empty. */
|
|
26
|
+
export function combineConjuncts(conjuncts) {
|
|
27
|
+
if (conjuncts.length === 0)
|
|
28
|
+
return null;
|
|
29
|
+
return conjuncts.reduce((acc, cur) => new BinaryOpNode(cur.scope, { type: 'binary', operator: 'AND', left: acc.expression, right: cur.expression }, acc, cur));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=predicate-conjuncts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-conjuncts.js","sourceRoot":"","sources":["../../../../src/planner/analysis/predicate-conjuncts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,4FAA4F;AAC5F,MAAM,UAAU,cAAc,CAAC,IAAoB;IAClD,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,KAAK,GAAqB,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QACvB,IAAI,CAAC,YAAY,YAAY,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;YAClE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,gBAAgB,CAAC,SAA2B;IAC3D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACpC,IAAI,YAAY,CACf,GAAG,CAAC,KAAK,EACT,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,UAAU,EAAE,EAChF,GAAG,EACH,GAAG,CACH,CACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape recognizers for declared-predicate AST trees (CHECK constraints,
|
|
3
|
+
* partial-index WHERE clauses). Shared by `check-extraction.ts` and
|
|
4
|
+
* `partial-unique-extraction.ts`; both pull `col`-style references, literal
|
|
5
|
+
* values, and "which columns are mentioned anywhere" out of small AST shapes.
|
|
6
|
+
*
|
|
7
|
+
* These helpers are intentionally syntactic — they do not interpret types,
|
|
8
|
+
* collations, or coercions. Callers wanting semantic equivalence should layer
|
|
9
|
+
* that on top.
|
|
10
|
+
*/
|
|
11
|
+
import type * as AST from '../../parser/ast.js';
|
|
12
|
+
import type { SqlValue } from '../../common/types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Return the column index for an `AST.ColumnExpr` or unqualified
|
|
15
|
+
* `AST.IdentifierExpr` that names a column in `columnIndexMap`; undefined
|
|
16
|
+
* otherwise. Schema-qualified identifiers (`other.foo`) are rejected.
|
|
17
|
+
*/
|
|
18
|
+
export declare function columnIndexFromExpr(expr: AST.Expression, columnIndexMap: ReadonlyMap<string, number>): number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Return the literal `SqlValue` for an `AST.LiteralExpr`, or undefined for any
|
|
21
|
+
* other expression shape (functions, casts, casts-of-literals, etc.). Only
|
|
22
|
+
* compile-time literals count for binding/domain purposes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function literalValue(expr: AST.Expression): SqlValue | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Flip a comparison operator across its operands: if you rewrite `b op a` as
|
|
27
|
+
* `a flipComparison(op) b`, the truth value is preserved. Unrecognized
|
|
28
|
+
* operators (including `=`/`==`) round-trip unchanged.
|
|
29
|
+
*
|
|
30
|
+
* Used by `partial-unique-extraction.ts`, `check-extraction.ts`, and
|
|
31
|
+
* `fd-utils.ts` to normalize `lit op col` into `col flipped lit`. Distinct
|
|
32
|
+
* from predicate negation (the same-named `flipComparison` in
|
|
33
|
+
* `predicate-normalizer.ts` returns `NOT op` instead of `swap-operands op`).
|
|
34
|
+
*/
|
|
35
|
+
export declare function flipComparison(op: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Flatten a top-level `OR` chain into an array of disjunct expressions.
|
|
38
|
+
* Non-OR roots return as a single-element array. Textual order is preserved.
|
|
39
|
+
*
|
|
40
|
+
* Shared by `check-extraction.ts` (implication-form CHECK recognition) and
|
|
41
|
+
* `partial-unique-extraction.ts` (top-level OR guard recognition).
|
|
42
|
+
*/
|
|
43
|
+
export declare function flattenDisjunction(expr: AST.Expression): AST.Expression[];
|
|
44
|
+
/**
|
|
45
|
+
* Collect the set of column indices referenced by `expr`. Only column /
|
|
46
|
+
* identifier nodes naming columns in `columnIndexMap` count. Returns an empty
|
|
47
|
+
* set when the expression references zero recognized columns; the caller can
|
|
48
|
+
* distinguish "no columns" (constant expression) from "exactly one column"
|
|
49
|
+
* by inspecting the size.
|
|
50
|
+
*/
|
|
51
|
+
export declare function collectColumnNames(expr: AST.Expression, columnIndexMap: ReadonlyMap<string, number>): Set<number>;
|
|
52
|
+
//# sourceMappingURL=predicate-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-shape.d.ts","sourceRoot":"","sources":["../../../../src/planner/analysis/predicate-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,GAAG,CAAC,UAAU,EACpB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,MAAM,GAAG,SAAS,CAWpB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,GAAG,QAAQ,GAAG,SAAS,CAMvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAczE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,GAAG,CAAC,UAAU,EACpB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,GAAG,CAAC,MAAM,CAAC,CAwBb"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape recognizers for declared-predicate AST trees (CHECK constraints,
|
|
3
|
+
* partial-index WHERE clauses). Shared by `check-extraction.ts` and
|
|
4
|
+
* `partial-unique-extraction.ts`; both pull `col`-style references, literal
|
|
5
|
+
* values, and "which columns are mentioned anywhere" out of small AST shapes.
|
|
6
|
+
*
|
|
7
|
+
* These helpers are intentionally syntactic — they do not interpret types,
|
|
8
|
+
* collations, or coercions. Callers wanting semantic equivalence should layer
|
|
9
|
+
* that on top.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Return the column index for an `AST.ColumnExpr` or unqualified
|
|
13
|
+
* `AST.IdentifierExpr` that names a column in `columnIndexMap`; undefined
|
|
14
|
+
* otherwise. Schema-qualified identifiers (`other.foo`) are rejected.
|
|
15
|
+
*/
|
|
16
|
+
export function columnIndexFromExpr(expr, columnIndexMap) {
|
|
17
|
+
if (expr.type === 'column') {
|
|
18
|
+
const ref = expr;
|
|
19
|
+
return columnIndexMap.get(ref.name.toLowerCase());
|
|
20
|
+
}
|
|
21
|
+
if (expr.type === 'identifier') {
|
|
22
|
+
const ref = expr;
|
|
23
|
+
if (ref.schema)
|
|
24
|
+
return undefined;
|
|
25
|
+
return columnIndexMap.get(ref.name.toLowerCase());
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Return the literal `SqlValue` for an `AST.LiteralExpr`, or undefined for any
|
|
31
|
+
* other expression shape (functions, casts, casts-of-literals, etc.). Only
|
|
32
|
+
* compile-time literals count for binding/domain purposes.
|
|
33
|
+
*/
|
|
34
|
+
export function literalValue(expr) {
|
|
35
|
+
if (expr.type !== 'literal')
|
|
36
|
+
return undefined;
|
|
37
|
+
const lit = expr;
|
|
38
|
+
const v = lit.value;
|
|
39
|
+
if (v instanceof Promise)
|
|
40
|
+
return undefined;
|
|
41
|
+
return v;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Flip a comparison operator across its operands: if you rewrite `b op a` as
|
|
45
|
+
* `a flipComparison(op) b`, the truth value is preserved. Unrecognized
|
|
46
|
+
* operators (including `=`/`==`) round-trip unchanged.
|
|
47
|
+
*
|
|
48
|
+
* Used by `partial-unique-extraction.ts`, `check-extraction.ts`, and
|
|
49
|
+
* `fd-utils.ts` to normalize `lit op col` into `col flipped lit`. Distinct
|
|
50
|
+
* from predicate negation (the same-named `flipComparison` in
|
|
51
|
+
* `predicate-normalizer.ts` returns `NOT op` instead of `swap-operands op`).
|
|
52
|
+
*/
|
|
53
|
+
export function flipComparison(op) {
|
|
54
|
+
switch (op) {
|
|
55
|
+
case '<': return '>';
|
|
56
|
+
case '<=': return '>=';
|
|
57
|
+
case '>': return '<';
|
|
58
|
+
case '>=': return '<=';
|
|
59
|
+
default: return op;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Flatten a top-level `OR` chain into an array of disjunct expressions.
|
|
64
|
+
* Non-OR roots return as a single-element array. Textual order is preserved.
|
|
65
|
+
*
|
|
66
|
+
* Shared by `check-extraction.ts` (implication-form CHECK recognition) and
|
|
67
|
+
* `partial-unique-extraction.ts` (top-level OR guard recognition).
|
|
68
|
+
*/
|
|
69
|
+
export function flattenDisjunction(expr) {
|
|
70
|
+
const out = [];
|
|
71
|
+
const stack = [expr];
|
|
72
|
+
while (stack.length > 0) {
|
|
73
|
+
const cur = stack.pop();
|
|
74
|
+
if (cur.type === 'binary' && cur.operator === 'OR') {
|
|
75
|
+
const b = cur;
|
|
76
|
+
// Preserve textual order: push right then left so left is popped first.
|
|
77
|
+
stack.push(b.right, b.left);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
out.push(cur);
|
|
81
|
+
}
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Collect the set of column indices referenced by `expr`. Only column /
|
|
86
|
+
* identifier nodes naming columns in `columnIndexMap` count. Returns an empty
|
|
87
|
+
* set when the expression references zero recognized columns; the caller can
|
|
88
|
+
* distinguish "no columns" (constant expression) from "exactly one column"
|
|
89
|
+
* by inspecting the size.
|
|
90
|
+
*/
|
|
91
|
+
export function collectColumnNames(expr, columnIndexMap) {
|
|
92
|
+
const out = new Set();
|
|
93
|
+
const stack = [expr];
|
|
94
|
+
while (stack.length > 0) {
|
|
95
|
+
const node = stack.pop();
|
|
96
|
+
const idx = node.type === 'column' || node.type === 'identifier'
|
|
97
|
+
? columnIndexFromExpr(node, columnIndexMap)
|
|
98
|
+
: undefined;
|
|
99
|
+
if (idx !== undefined)
|
|
100
|
+
out.add(idx);
|
|
101
|
+
for (const key of Object.keys(node)) {
|
|
102
|
+
const v = node[key];
|
|
103
|
+
if (!v)
|
|
104
|
+
continue;
|
|
105
|
+
if (Array.isArray(v)) {
|
|
106
|
+
for (const item of v) {
|
|
107
|
+
if (item && typeof item === 'object' && 'type' in item) {
|
|
108
|
+
stack.push(item);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else if (typeof v === 'object' && 'type' in v) {
|
|
113
|
+
stack.push(v);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=predicate-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-shape.js","sourceRoot":"","sources":["../../../../src/planner/analysis/predicate-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,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O,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtB,KAAK,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC;oBACtB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;wBACxD,KAAK,CAAC,IAAI,CAAC,IAAmB,CAAC,CAAC;oBACjC,CAAC;gBACF,CAAC;YACF,CAAC;iBAAM,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,IAAK,CAAY,EAAE,CAAC;gBAC7D,KAAK,CAAC,IAAI,CAAC,CAAgB,CAAC,CAAC;YAC9B,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-column constraint-satisfiability checker.
|
|
3
|
+
*
|
|
4
|
+
* Folds the conjunction of (predicate conjuncts ∧ source domain constraints ∧
|
|
5
|
+
* literal constant bindings) into per-column accumulators, then asks:
|
|
6
|
+
* "is there any value of every mentioned column that satisfies every fact?"
|
|
7
|
+
*
|
|
8
|
+
* The fragment is intentionally narrow:
|
|
9
|
+
* - Single-column comparisons against literals (= / == / != / < / <= / > / >=).
|
|
10
|
+
* - Single-column BETWEEN literal AND literal (positive form).
|
|
11
|
+
* - Single-column IN (lit, lit, ...) and intersection across IN-lists.
|
|
12
|
+
* The empty form `x IN ()` is also recognized as trivially `unsat`.
|
|
13
|
+
* - Range from `DomainConstraint { kind: 'range' }`.
|
|
14
|
+
* - Enum from `DomainConstraint { kind: 'enum' }`.
|
|
15
|
+
* - Literal `ConstantBinding`.
|
|
16
|
+
*
|
|
17
|
+
* Everything else (LIKE, function calls, cross-column comparisons, OR-trees,
|
|
18
|
+
* CASE, IS NULL, NOT IN with non-literal RHS, …) marks the touched columns as
|
|
19
|
+
* `sawUnknown`. The checker only ever returns `unsat` when an in-scope subset
|
|
20
|
+
* proves a contradiction — false positives are never emitted.
|
|
21
|
+
*
|
|
22
|
+
* Used by `rule-filter-contradiction` to recognize `Filter(child, false)` cases
|
|
23
|
+
* that const-folding can then collapse to `EmptyRelationNode`.
|
|
24
|
+
*/
|
|
25
|
+
import type { ScalarPlanNode, DomainConstraint, ConstantBinding } from '../nodes/plan-node.js';
|
|
26
|
+
export type SatResult = 'sat' | 'unsat' | 'unknown';
|
|
27
|
+
/**
|
|
28
|
+
* Returns `'unsat'` iff the conjunction is provably contradictory within the
|
|
29
|
+
* supported fragment; `'sat'` when no contradiction is found and every
|
|
30
|
+
* mentioned clause was in scope; `'unknown'` otherwise. Never returns false
|
|
31
|
+
* `'unsat'`.
|
|
32
|
+
*
|
|
33
|
+
* `attrIndex(attrId)` maps an attribute id visible to the predicate's
|
|
34
|
+
* `ColumnReferenceNode`s back to the physical column index used by
|
|
35
|
+
* `domains` / `bindings`. Pass an identity-style mapper if the caller has
|
|
36
|
+
* already aligned them.
|
|
37
|
+
*
|
|
38
|
+
* `getCollation(col)` is optional; when supplied, equality / range comparisons
|
|
39
|
+
* for that column use the named collation (TEXT only — numeric comparisons are
|
|
40
|
+
* collation-independent). Defaults to BINARY.
|
|
41
|
+
*/
|
|
42
|
+
export declare function checkSatisfiability(conjuncts: ReadonlyArray<ScalarPlanNode>, domains: ReadonlyArray<DomainConstraint>, bindings: ReadonlyArray<ConstantBinding>, attrIndex: (attrId: number) => number | undefined, getCollation?: (col: number) => string | undefined): SatResult;
|
|
43
|
+
//# sourceMappingURL=sat-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sat-checker.d.ts","sourceRoot":"","sources":["../../../../src/planner/analysis/sat-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,MAAM,uBAAuB,CAAC;AAe/B,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAyBpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,EACxC,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,EACxC,QAAQ,EAAE,aAAa,CAAC,eAAe,CAAC,EACxC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EACjD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAChD,SAAS,CA6EX"}
|