spark-sql-language-server 0.0.1-beta.5 → 0.2.0-beta.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/out/sparksql-server-worker.js +1 -1
- package/out/sparksql-server-worker.js.map +1 -1
- package/out-tsc/assets/built-in-functions.d.ts +2 -0
- package/out-tsc/assets/built-in-functions.d.ts.map +1 -0
- package/out-tsc/assets/built-in-functions.js +4 -2
- package/out-tsc/assets/built-in-functions.js.map +1 -1
- package/out-tsc/completion-parser.d.ts +11 -0
- package/out-tsc/completion-parser.d.ts.map +1 -0
- package/out-tsc/completion-parser.js +148 -0
- package/out-tsc/completion-parser.js.map +1 -0
- package/out-tsc/constants.d.ts +9 -0
- package/out-tsc/constants.d.ts.map +1 -0
- package/out-tsc/constants.js +12 -0
- package/out-tsc/constants.js.map +1 -0
- package/out-tsc/cursor.d.ts +10 -0
- package/out-tsc/cursor.d.ts.map +1 -0
- package/out-tsc/cursor.js +3 -0
- package/out-tsc/cursor.js.map +1 -1
- package/out-tsc/execute-command.d.ts +7 -0
- package/out-tsc/execute-command.d.ts.map +1 -0
- package/out-tsc/execute-command.js +78 -0
- package/out-tsc/execute-command.js.map +1 -0
- package/out-tsc/execute-commands.d.ts +1 -0
- package/out-tsc/execute-commands.d.ts.map +1 -0
- package/out-tsc/execute-commands.js +3 -4
- package/out-tsc/execute-commands.js.map +1 -1
- package/out-tsc/formatter/boundary-writer.d.ts +30 -0
- package/out-tsc/formatter/boundary-writer.d.ts.map +1 -0
- package/out-tsc/formatter/boundary-writer.js +47 -0
- package/out-tsc/formatter/boundary-writer.js.map +1 -0
- package/out-tsc/formatter/core/comment-helper.d.ts +11 -0
- package/out-tsc/formatter/core/comment-helper.d.ts.map +1 -0
- package/out-tsc/formatter/core/comment-helper.js +139 -0
- package/out-tsc/formatter/core/comment-helper.js.map +1 -0
- package/out-tsc/formatter/core/edit-collector.d.ts +110 -0
- package/out-tsc/formatter/core/edit-collector.d.ts.map +1 -0
- package/out-tsc/formatter/core/edit-collector.js +159 -0
- package/out-tsc/formatter/core/edit-collector.js.map +1 -0
- package/out-tsc/formatter/core/formatting-context.d.ts +183 -0
- package/out-tsc/formatter/core/formatting-context.d.ts.map +1 -0
- package/out-tsc/formatter/core/formatting-context.js +294 -0
- package/out-tsc/formatter/core/formatting-context.js.map +1 -0
- package/out-tsc/formatter/core/index.d.ts +25 -0
- package/out-tsc/formatter/core/index.d.ts.map +1 -0
- package/out-tsc/formatter/core/index.js +57 -0
- package/out-tsc/formatter/core/index.js.map +1 -0
- package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts +116 -0
- package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts.map +1 -0
- package/out-tsc/formatter/core/pipeline/formatting-pipeline.js +237 -0
- package/out-tsc/formatter/core/pipeline/formatting-pipeline.js.map +1 -0
- package/out-tsc/formatter/core/pipeline/index.d.ts +12 -0
- package/out-tsc/formatter/core/pipeline/index.d.ts.map +1 -0
- package/out-tsc/formatter/core/pipeline/index.js +19 -0
- package/out-tsc/formatter/core/pipeline/index.js.map +1 -0
- package/out-tsc/formatter/core/pipeline/statement-separation.d.ts +5 -0
- package/out-tsc/formatter/core/pipeline/statement-separation.d.ts.map +1 -0
- package/out-tsc/formatter/core/pipeline/statement-separation.js +149 -0
- package/out-tsc/formatter/core/pipeline/statement-separation.js.map +1 -0
- package/out-tsc/formatter/core/rules/index.d.ts +11 -0
- package/out-tsc/formatter/core/rules/index.d.ts.map +1 -0
- package/out-tsc/formatter/core/rules/index.js +29 -0
- package/out-tsc/formatter/core/rules/index.js.map +1 -0
- package/out-tsc/formatter/core/rules/newline-rules.d.ts +169 -0
- package/out-tsc/formatter/core/rules/newline-rules.d.ts.map +1 -0
- package/out-tsc/formatter/core/rules/newline-rules.js +246 -0
- package/out-tsc/formatter/core/rules/newline-rules.js.map +1 -0
- package/out-tsc/formatter/core/rules/spacing-rules.d.ts +150 -0
- package/out-tsc/formatter/core/rules/spacing-rules.d.ts.map +1 -0
- package/out-tsc/formatter/core/rules/spacing-rules.js +219 -0
- package/out-tsc/formatter/core/rules/spacing-rules.js.map +1 -0
- package/out-tsc/formatter/core/strategy-bridge.d.ts +56 -0
- package/out-tsc/formatter/core/strategy-bridge.d.ts.map +1 -0
- package/out-tsc/formatter/core/strategy-bridge.js +159 -0
- package/out-tsc/formatter/core/strategy-bridge.js.map +1 -0
- package/out-tsc/formatter/core/strategy-interface.d.ts +123 -0
- package/out-tsc/formatter/core/strategy-interface.d.ts.map +1 -0
- package/out-tsc/formatter/core/strategy-interface.js +83 -0
- package/out-tsc/formatter/core/strategy-interface.js.map +1 -0
- package/out-tsc/formatter/core/token-helper.d.ts +12 -0
- package/out-tsc/formatter/core/token-helper.d.ts.map +1 -0
- package/out-tsc/formatter/core/token-helper.js +79 -0
- package/out-tsc/formatter/core/token-helper.js.map +1 -0
- package/out-tsc/formatter/core/unicode-utils.d.ts +107 -0
- package/out-tsc/formatter/core/unicode-utils.d.ts.map +1 -0
- package/out-tsc/formatter/core/unicode-utils.js +181 -0
- package/out-tsc/formatter/core/unicode-utils.js.map +1 -0
- package/out-tsc/formatter/core/whitespace-writer.d.ts +20 -0
- package/out-tsc/formatter/core/whitespace-writer.d.ts.map +1 -0
- package/out-tsc/formatter/core/whitespace-writer.js +86 -0
- package/out-tsc/formatter/core/whitespace-writer.js.map +1 -0
- package/out-tsc/formatter/formatter-adapter.d.ts +56 -0
- package/out-tsc/formatter/formatter-adapter.d.ts.map +1 -0
- package/out-tsc/formatter/formatter-adapter.js +719 -0
- package/out-tsc/formatter/formatter-adapter.js.map +1 -0
- package/out-tsc/formatter/index.d.ts +16 -0
- package/out-tsc/formatter/index.d.ts.map +1 -0
- package/out-tsc/formatter/index.js +43 -0
- package/out-tsc/formatter/index.js.map +1 -0
- package/out-tsc/formatter/pipe-step-classifier.d.ts +9 -0
- package/out-tsc/formatter/pipe-step-classifier.d.ts.map +1 -0
- package/out-tsc/formatter/pipe-step-classifier.js +49 -0
- package/out-tsc/formatter/pipe-step-classifier.js.map +1 -0
- package/out-tsc/formatter/state.d.ts +10 -0
- package/out-tsc/formatter/state.d.ts.map +1 -0
- package/out-tsc/formatter/state.js +12 -0
- package/out-tsc/formatter/state.js.map +1 -0
- package/out-tsc/formatter/strategies/block.strategy.d.ts +191 -0
- package/out-tsc/formatter/strategies/block.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/block.strategy.js +238 -0
- package/out-tsc/formatter/strategies/block.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts +17 -0
- package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/clause-head-body.strategy.js +13 -0
- package/out-tsc/formatter/strategies/clause-head-body.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts +68 -0
- package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js +242 -0
- package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts +146 -0
- package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js +578 -0
- package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts +103 -0
- package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/create-table.strategy.js +659 -0
- package/out-tsc/formatter/strategies/ddl/create-table.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts +64 -0
- package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js +402 -0
- package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts +119 -0
- package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js +863 -0
- package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/index.d.ts +17 -0
- package/out-tsc/formatter/strategies/ddl/index.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/index.js +57 -0
- package/out-tsc/formatter/strategies/ddl/index.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts +26 -0
- package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js +77 -0
- package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts +99 -0
- package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js +385 -0
- package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts +48 -0
- package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js +145 -0
- package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts +71 -0
- package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js +196 -0
- package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/dml/index.d.ts +10 -0
- package/out-tsc/formatter/strategies/dml/index.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/dml/index.js +35 -0
- package/out-tsc/formatter/strategies/dml/index.js.map +1 -0
- package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts +113 -0
- package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js +438 -0
- package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts +76 -0
- package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/dml/select-clause.strategy.js +480 -0
- package/out-tsc/formatter/strategies/dml/select-clause.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts +50 -0
- package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/expression/function-call.strategy.js +319 -0
- package/out-tsc/formatter/strategies/expression/function-call.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/expression/index.d.ts +18 -0
- package/out-tsc/formatter/strategies/expression/index.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/expression/index.js +51 -0
- package/out-tsc/formatter/strategies/expression/index.js.map +1 -0
- package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts +55 -0
- package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js +266 -0
- package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts +38 -0
- package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js +397 -0
- package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/function-call.strategy.d.ts +80 -0
- package/out-tsc/formatter/strategies/function-call.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/function-call.strategy.js +136 -0
- package/out-tsc/formatter/strategies/function-call.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/index.d.ts +87 -0
- package/out-tsc/formatter/strategies/index.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/index.js +121 -0
- package/out-tsc/formatter/strategies/index.js.map +1 -0
- package/out-tsc/formatter/strategies/join.strategy.d.ts +31 -0
- package/out-tsc/formatter/strategies/join.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/join.strategy.js +29 -0
- package/out-tsc/formatter/strategies/join.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/keyword.strategy.d.ts +82 -0
- package/out-tsc/formatter/strategies/keyword.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/keyword.strategy.js +129 -0
- package/out-tsc/formatter/strategies/keyword.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/list.strategy.d.ts +159 -0
- package/out-tsc/formatter/strategies/list.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/list.strategy.js +193 -0
- package/out-tsc/formatter/strategies/list.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts +24 -0
- package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js +47 -0
- package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts +21 -0
- package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-drop.strategy.js +52 -0
- package/out-tsc/formatter/strategies/pipe-drop.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts +21 -0
- package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-extend.strategy.js +45 -0
- package/out-tsc/formatter/strategies/pipe-extend.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts +22 -0
- package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-join.strategy.js +42 -0
- package/out-tsc/formatter/strategies/pipe-join.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts +7 -0
- package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-pivot.strategy.js +34 -0
- package/out-tsc/formatter/strategies/pipe-pivot.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts +7 -0
- package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js +14 -0
- package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts +7 -0
- package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-sample.strategy.js +18 -0
- package/out-tsc/formatter/strategies/pipe-sample.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts +22 -0
- package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-select.strategy.js +51 -0
- package/out-tsc/formatter/strategies/pipe-select.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts +7 -0
- package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js +30 -0
- package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts +21 -0
- package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-set.strategy.js +52 -0
- package/out-tsc/formatter/strategies/pipe-set.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts +25 -0
- package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts.map +1 -0
- package/out-tsc/{lib/SparkSqlParserVisitor.js → formatter/strategies/pipe-step.strategy.js} +1 -1
- package/out-tsc/formatter/strategies/pipe-step.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts +7 -0
- package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js +33 -0
- package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts +21 -0
- package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/pipe-where.strategy.js +44 -0
- package/out-tsc/formatter/strategies/pipe-where.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts +20 -0
- package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js +132 -0
- package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts +43 -0
- package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js +174 -0
- package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts +23 -0
- package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/handler.strategy.js +81 -0
- package/out-tsc/formatter/strategies/procedure/handler.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts +19 -0
- package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/if-else.strategy.js +80 -0
- package/out-tsc/formatter/strategies/procedure/if-else.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/index.d.ts +27 -0
- package/out-tsc/formatter/strategies/procedure/index.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/index.js +63 -0
- package/out-tsc/formatter/strategies/procedure/index.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts +19 -0
- package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js +54 -0
- package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js.map +1 -0
- package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts +71 -0
- package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts.map +1 -0
- package/out-tsc/formatter/strategies/procedure/loop.strategy.js +216 -0
- package/out-tsc/formatter/strategies/procedure/loop.strategy.js.map +1 -0
- package/out-tsc/formatter/strategy-based-formatter.d.ts +329 -0
- package/out-tsc/formatter/strategy-based-formatter.d.ts.map +1 -0
- package/out-tsc/formatter/strategy-based-formatter.js +3808 -0
- package/out-tsc/formatter/strategy-based-formatter.js.map +1 -0
- package/out-tsc/formatter/strategy-dispatcher.d.ts +24 -0
- package/out-tsc/formatter/strategy-dispatcher.d.ts.map +1 -0
- package/out-tsc/formatter/strategy-dispatcher.js +19 -0
- package/out-tsc/formatter/strategy-dispatcher.js.map +1 -0
- package/out-tsc/formatter/types.d.ts +2 -0
- package/out-tsc/formatter/types.d.ts.map +1 -0
- package/out-tsc/{lib/SparkSqlParserListener.js → formatter/types.js} +1 -1
- package/out-tsc/formatter/types.js.map +1 -0
- package/out-tsc/formatter/visitor/ddl/alter-table.d.ts +48 -0
- package/out-tsc/formatter/visitor/ddl/alter-table.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/ddl/alter-table.js +133 -0
- package/out-tsc/formatter/visitor/ddl/alter-table.js.map +1 -0
- package/out-tsc/formatter/visitor/ddl/create-table.d.ts +54 -0
- package/out-tsc/formatter/visitor/ddl/create-table.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/ddl/create-table.js +142 -0
- package/out-tsc/formatter/visitor/ddl/create-table.js.map +1 -0
- package/out-tsc/formatter/visitor/ddl/create-view.d.ts +27 -0
- package/out-tsc/formatter/visitor/ddl/create-view.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/ddl/create-view.js +61 -0
- package/out-tsc/formatter/visitor/ddl/create-view.js.map +1 -0
- package/out-tsc/formatter/visitor/ddl/drop.d.ts +30 -0
- package/out-tsc/formatter/visitor/ddl/drop.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/ddl/drop.js +69 -0
- package/out-tsc/formatter/visitor/ddl/drop.js.map +1 -0
- package/out-tsc/formatter/visitor/ddl/index.d.ts +10 -0
- package/out-tsc/formatter/visitor/ddl/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/ddl/index.js +26 -0
- package/out-tsc/formatter/visitor/ddl/index.js.map +1 -0
- package/out-tsc/formatter/visitor/dml/delete.d.ts +26 -0
- package/out-tsc/formatter/visitor/dml/delete.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/dml/delete.js +38 -0
- package/out-tsc/formatter/visitor/dml/delete.js.map +1 -0
- package/out-tsc/formatter/visitor/dml/index.d.ts +10 -0
- package/out-tsc/formatter/visitor/dml/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/dml/index.js +26 -0
- package/out-tsc/formatter/visitor/dml/index.js.map +1 -0
- package/out-tsc/formatter/visitor/dml/insert.d.ts +42 -0
- package/out-tsc/formatter/visitor/dml/insert.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/dml/insert.js +112 -0
- package/out-tsc/formatter/visitor/dml/insert.js.map +1 -0
- package/out-tsc/formatter/visitor/dml/merge.d.ts +40 -0
- package/out-tsc/formatter/visitor/dml/merge.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/dml/merge.js +67 -0
- package/out-tsc/formatter/visitor/dml/merge.js.map +1 -0
- package/out-tsc/formatter/visitor/dml/update.d.ts +33 -0
- package/out-tsc/formatter/visitor/dml/update.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/dml/update.js +49 -0
- package/out-tsc/formatter/visitor/dml/update.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/arithmetic.d.ts +20 -0
- package/out-tsc/formatter/visitor/expression/arithmetic.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/arithmetic.js +44 -0
- package/out-tsc/formatter/visitor/expression/arithmetic.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/case-when.d.ts +41 -0
- package/out-tsc/formatter/visitor/expression/case-when.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/case-when.js +94 -0
- package/out-tsc/formatter/visitor/expression/case-when.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/comparison.d.ts +20 -0
- package/out-tsc/formatter/visitor/expression/comparison.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/comparison.js +26 -0
- package/out-tsc/formatter/visitor/expression/comparison.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/function-call.d.ts +20 -0
- package/out-tsc/formatter/visitor/expression/function-call.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/function-call.js +33 -0
- package/out-tsc/formatter/visitor/expression/function-call.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/index.d.ts +11 -0
- package/out-tsc/formatter/visitor/expression/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/index.js +27 -0
- package/out-tsc/formatter/visitor/expression/index.js.map +1 -0
- package/out-tsc/formatter/visitor/expression/logical.d.ts +26 -0
- package/out-tsc/formatter/visitor/expression/logical.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/expression/logical.js +46 -0
- package/out-tsc/formatter/visitor/expression/logical.js.map +1 -0
- package/out-tsc/formatter/visitor/formatter-core.d.ts +79 -0
- package/out-tsc/formatter/visitor/formatter-core.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/formatter-core.js +211 -0
- package/out-tsc/formatter/visitor/formatter-core.js.map +1 -0
- package/out-tsc/formatter/visitor/index.d.ts +21 -0
- package/out-tsc/formatter/visitor/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/index.js +26 -0
- package/out-tsc/formatter/visitor/index.js.map +1 -0
- package/out-tsc/formatter/visitor/management/cache.d.ts +26 -0
- package/out-tsc/formatter/visitor/management/cache.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/management/cache.js +58 -0
- package/out-tsc/formatter/visitor/management/cache.js.map +1 -0
- package/out-tsc/formatter/visitor/management/index.d.ts +8 -0
- package/out-tsc/formatter/visitor/management/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/management/index.js +24 -0
- package/out-tsc/formatter/visitor/management/index.js.map +1 -0
- package/out-tsc/formatter/visitor/management/refresh.d.ts +26 -0
- package/out-tsc/formatter/visitor/management/refresh.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/management/refresh.js +55 -0
- package/out-tsc/formatter/visitor/management/refresh.js.map +1 -0
- package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts +31 -0
- package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js +46 -0
- package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js.map +1 -0
- package/out-tsc/formatter/visitor/pipeline/index.d.ts +7 -0
- package/out-tsc/formatter/visitor/pipeline/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/pipeline/index.js +23 -0
- package/out-tsc/formatter/visitor/pipeline/index.js.map +1 -0
- package/out-tsc/formatter/visitor/query/cte.d.ts +34 -0
- package/out-tsc/formatter/visitor/query/cte.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/cte.js +54 -0
- package/out-tsc/formatter/visitor/query/cte.js.map +1 -0
- package/out-tsc/formatter/visitor/query/index.d.ts +11 -0
- package/out-tsc/formatter/visitor/query/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/index.js +27 -0
- package/out-tsc/formatter/visitor/query/index.js.map +1 -0
- package/out-tsc/formatter/visitor/query/query-organization.d.ts +25 -0
- package/out-tsc/formatter/visitor/query/query-organization.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/query-organization.js +75 -0
- package/out-tsc/formatter/visitor/query/query-organization.js.map +1 -0
- package/out-tsc/formatter/visitor/query/query.d.ts +22 -0
- package/out-tsc/formatter/visitor/query/query.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/query.js +30 -0
- package/out-tsc/formatter/visitor/query/query.js.map +1 -0
- package/out-tsc/formatter/visitor/query/select-clause.d.ts +17 -0
- package/out-tsc/formatter/visitor/query/select-clause.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/select-clause.js +35 -0
- package/out-tsc/formatter/visitor/query/select-clause.js.map +1 -0
- package/out-tsc/formatter/visitor/query/set-operation.d.ts +25 -0
- package/out-tsc/formatter/visitor/query/set-operation.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/query/set-operation.js +52 -0
- package/out-tsc/formatter/visitor/query/set-operation.js.map +1 -0
- package/out-tsc/formatter/visitor/statements/index.d.ts +7 -0
- package/out-tsc/formatter/visitor/statements/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/statements/index.js +23 -0
- package/out-tsc/formatter/visitor/statements/index.js.map +1 -0
- package/out-tsc/formatter/visitor/statements/program.d.ts +33 -0
- package/out-tsc/formatter/visitor/statements/program.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/statements/program.js +69 -0
- package/out-tsc/formatter/visitor/statements/program.js.map +1 -0
- package/out-tsc/formatter/visitor/types/complex-types.d.ts +24 -0
- package/out-tsc/formatter/visitor/types/complex-types.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/types/complex-types.js +47 -0
- package/out-tsc/formatter/visitor/types/complex-types.js.map +1 -0
- package/out-tsc/formatter/visitor/types/index.d.ts +8 -0
- package/out-tsc/formatter/visitor/types/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/types/index.js +24 -0
- package/out-tsc/formatter/visitor/types/index.js.map +1 -0
- package/out-tsc/formatter/visitor/types/primitive-types.d.ts +22 -0
- package/out-tsc/formatter/visitor/types/primitive-types.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/types/primitive-types.js +37 -0
- package/out-tsc/formatter/visitor/types/primitive-types.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/context-helpers.d.ts +32 -0
- package/out-tsc/formatter/visitor/utils/context-helpers.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/context-helpers.js +98 -0
- package/out-tsc/formatter/visitor/utils/context-helpers.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/index.d.ts +11 -0
- package/out-tsc/formatter/visitor/utils/index.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/index.js +45 -0
- package/out-tsc/formatter/visitor/utils/index.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts +57 -0
- package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/keyword-formatting.js +87 -0
- package/out-tsc/formatter/visitor/utils/keyword-formatting.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts +53 -0
- package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js +88 -0
- package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/space-compression.d.ts +55 -0
- package/out-tsc/formatter/visitor/utils/space-compression.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/space-compression.js +71 -0
- package/out-tsc/formatter/visitor/utils/space-compression.js.map +1 -0
- package/out-tsc/formatter/visitor/utils/token-helpers.d.ts +64 -0
- package/out-tsc/formatter/visitor/utils/token-helpers.d.ts.map +1 -0
- package/out-tsc/formatter/visitor/utils/token-helpers.js +249 -0
- package/out-tsc/formatter/visitor/utils/token-helpers.js.map +1 -0
- package/out-tsc/index.d.ts +2 -1
- package/out-tsc/index.d.ts.map +1 -0
- package/out-tsc/index.js +3 -1
- package/out-tsc/index.js.map +1 -1
- package/out-tsc/lib/SparkSQLLexer.d.ts +557 -0
- package/out-tsc/lib/SparkSQLLexer.d.ts.map +1 -0
- package/out-tsc/lib/SparkSQLLexer.js +3676 -0
- package/out-tsc/lib/SparkSQLLexer.js.map +1 -0
- package/out-tsc/lib/SparkSQLParser.d.ts +7884 -0
- package/out-tsc/lib/SparkSQLParser.d.ts.map +1 -0
- package/out-tsc/lib/SparkSQLParser.js +45848 -0
- package/out-tsc/lib/SparkSQLParser.js.map +1 -0
- package/out-tsc/lib/SparkSQLParserListener.d.ts +5855 -0
- package/out-tsc/lib/SparkSQLParserListener.d.ts.map +1 -0
- package/out-tsc/lib/SparkSQLParserListener.js +4 -0
- package/out-tsc/lib/SparkSQLParserListener.js.map +1 -0
- package/out-tsc/lib/SparkSQLParserVisitor.d.ts +3674 -0
- package/out-tsc/lib/SparkSQLParserVisitor.d.ts.map +1 -0
- package/out-tsc/lib/SparkSQLParserVisitor.js +4 -0
- package/out-tsc/lib/SparkSQLParserVisitor.js.map +1 -0
- package/out-tsc/lineage.typing.d.ts +64 -0
- package/out-tsc/lineage.typing.d.ts.map +1 -0
- package/out-tsc/lineage.typing.js +3 -0
- package/out-tsc/lineage.typing.js.map +1 -0
- package/out-tsc/listeners/parse-error.listener.d.ts +3 -2
- package/out-tsc/listeners/parse-error.listener.d.ts.map +1 -0
- package/out-tsc/listeners/parse-error.listener.js +4 -4
- package/out-tsc/listeners/parse-error.listener.js.map +1 -1
- package/out-tsc/listeners/schema.listener.d.ts +32 -39
- package/out-tsc/listeners/schema.listener.d.ts.map +1 -0
- package/out-tsc/listeners/schema.listener.js +58 -100
- package/out-tsc/listeners/schema.listener.js.map +1 -1
- package/out-tsc/listeners/statement.listener.d.ts +263 -5
- package/out-tsc/listeners/statement.listener.d.ts.map +1 -0
- package/out-tsc/listeners/statement.listener.js +836 -11
- package/out-tsc/listeners/statement.listener.js.map +1 -1
- package/out-tsc/listeners/structure.listener.d.ts +70 -0
- package/out-tsc/listeners/structure.listener.d.ts.map +1 -0
- package/out-tsc/listeners/structure.listener.js +211 -0
- package/out-tsc/listeners/structure.listener.js.map +1 -0
- package/out-tsc/listeners/tokens-collector.listener.d.ts +27 -0
- package/out-tsc/listeners/tokens-collector.listener.d.ts.map +1 -0
- package/out-tsc/listeners/tokens-collector.listener.js +102 -0
- package/out-tsc/listeners/tokens-collector.listener.js.map +1 -0
- package/out-tsc/lsp-server.d.ts +79 -8
- package/out-tsc/lsp-server.d.ts.map +1 -0
- package/out-tsc/lsp-server.js +672 -237
- package/out-tsc/lsp-server.js.map +1 -1
- package/out-tsc/metadata.typing.d.ts +1 -0
- package/out-tsc/metadata.typing.d.ts.map +1 -0
- package/out-tsc/monaco-config.d.ts +219 -0
- package/out-tsc/monaco-config.d.ts.map +1 -0
- package/out-tsc/monaco-config.js +1032 -0
- package/out-tsc/monaco-config.js.map +1 -0
- package/out-tsc/parsing-warehouse.d.ts +8 -3
- package/out-tsc/parsing-warehouse.d.ts.map +1 -0
- package/out-tsc/parsing-warehouse.js +62 -6
- package/out-tsc/parsing-warehouse.js.map +1 -1
- package/out-tsc/protocol-translation.d.ts +12 -5
- package/out-tsc/protocol-translation.d.ts.map +1 -0
- package/out-tsc/protocol-translation.js +72 -19
- package/out-tsc/protocol-translation.js.map +1 -1
- package/out-tsc/public-apis.d.ts +1 -0
- package/out-tsc/public-apis.d.ts.map +1 -0
- package/out-tsc/schema-registry.d.ts +10 -7
- package/out-tsc/schema-registry.d.ts.map +1 -0
- package/out-tsc/schema-registry.js +87 -106
- package/out-tsc/schema-registry.js.map +1 -1
- package/out-tsc/server-worker.d.ts +1 -0
- package/out-tsc/server-worker.d.ts.map +1 -0
- package/out-tsc/server-worker.js +159 -44
- package/out-tsc/server-worker.js.map +1 -1
- package/out-tsc/tests/folding/block-comment-folding.test.d.ts +7 -0
- package/out-tsc/tests/folding/block-comment-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/block-comment-folding.test.js +268 -0
- package/out-tsc/tests/folding/block-comment-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/caching.test.d.ts +11 -0
- package/out-tsc/tests/folding/caching.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/caching.test.js +141 -0
- package/out-tsc/tests/folding/caching.test.js.map +1 -0
- package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts +15 -0
- package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/cte-dependency-chain.test.js +323 -0
- package/out-tsc/tests/folding/cte-dependency-chain.test.js.map +1 -0
- package/out-tsc/tests/folding/debug-format-flow.test.d.ts +2 -0
- package/out-tsc/tests/folding/debug-format-flow.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/debug-format-flow.test.js +114 -0
- package/out-tsc/tests/folding/debug-format-flow.test.js.map +1 -0
- package/out-tsc/tests/folding/debug-formatted.test.d.ts +2 -0
- package/out-tsc/tests/folding/debug-formatted.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/debug-formatted.test.js +175 -0
- package/out-tsc/tests/folding/debug-formatted.test.js.map +1 -0
- package/out-tsc/tests/folding/deduplication.test.d.ts +10 -0
- package/out-tsc/tests/folding/deduplication.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/deduplication.test.js +206 -0
- package/out-tsc/tests/folding/deduplication.test.js.map +1 -0
- package/out-tsc/tests/folding/edge-cases.test.d.ts +8 -0
- package/out-tsc/tests/folding/edge-cases.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/edge-cases.test.js +319 -0
- package/out-tsc/tests/folding/edge-cases.test.js.map +1 -0
- package/out-tsc/tests/folding/folding-level-config.test.d.ts +11 -0
- package/out-tsc/tests/folding/folding-level-config.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/folding-level-config.test.js +313 -0
- package/out-tsc/tests/folding/folding-level-config.test.js.map +1 -0
- package/out-tsc/tests/folding/folding-statistics.test.d.ts +13 -0
- package/out-tsc/tests/folding/folding-statistics.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/folding-statistics.test.js +144 -0
- package/out-tsc/tests/folding/folding-statistics.test.js.map +1 -0
- package/out-tsc/tests/folding/index.d.ts +8 -0
- package/out-tsc/tests/folding/index.d.ts.map +1 -0
- package/out-tsc/tests/folding/index.js +24 -0
- package/out-tsc/tests/folding/index.js.map +1 -0
- package/out-tsc/tests/folding/join-folding.test.d.ts +11 -0
- package/out-tsc/tests/folding/join-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/join-folding.test.js +167 -0
- package/out-tsc/tests/folding/join-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/kind-classification.test.d.ts +11 -0
- package/out-tsc/tests/folding/kind-classification.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/kind-classification.test.js +270 -0
- package/out-tsc/tests/folding/kind-classification.test.js.map +1 -0
- package/out-tsc/tests/folding/level1-statement.test.d.ts +8 -0
- package/out-tsc/tests/folding/level1-statement.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/level1-statement.test.js +278 -0
- package/out-tsc/tests/folding/level1-statement.test.js.map +1 -0
- package/out-tsc/tests/folding/level2-query-block.test.d.ts +8 -0
- package/out-tsc/tests/folding/level2-query-block.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/level2-query-block.test.js +374 -0
- package/out-tsc/tests/folding/level2-query-block.test.js.map +1 -0
- package/out-tsc/tests/folding/level3-expression.test.d.ts +8 -0
- package/out-tsc/tests/folding/level3-expression.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/level3-expression.test.js +361 -0
- package/out-tsc/tests/folding/level3-expression.test.js.map +1 -0
- package/out-tsc/tests/folding/level4-structure.test.d.ts +8 -0
- package/out-tsc/tests/folding/level4-structure.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/level4-structure.test.js +270 -0
- package/out-tsc/tests/folding/level4-structure.test.js.map +1 -0
- package/out-tsc/tests/folding/line-comment-folding.test.d.ts +13 -0
- package/out-tsc/tests/folding/line-comment-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/line-comment-folding.test.js +215 -0
- package/out-tsc/tests/folding/line-comment-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/nested-folding.test.d.ts +8 -0
- package/out-tsc/tests/folding/nested-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/nested-folding.test.js +386 -0
- package/out-tsc/tests/folding/nested-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/performance-benchmark.test.d.ts +11 -0
- package/out-tsc/tests/folding/performance-benchmark.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/performance-benchmark.test.js +256 -0
- package/out-tsc/tests/folding/performance-benchmark.test.js.map +1 -0
- package/out-tsc/tests/folding/region-marker-folding.test.d.ts +11 -0
- package/out-tsc/tests/folding/region-marker-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/region-marker-folding.test.js +245 -0
- package/out-tsc/tests/folding/region-marker-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/select-columns-folding.test.d.ts +10 -0
- package/out-tsc/tests/folding/select-columns-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/select-columns-folding.test.js +139 -0
- package/out-tsc/tests/folding/select-columns-folding.test.js.map +1 -0
- package/out-tsc/tests/folding/test-utils.d.ts +73 -0
- package/out-tsc/tests/folding/test-utils.d.ts.map +1 -0
- package/out-tsc/tests/folding/test-utils.js +98 -0
- package/out-tsc/tests/folding/test-utils.js.map +1 -0
- package/out-tsc/tests/folding/values-folding.test.d.ts +10 -0
- package/out-tsc/tests/folding/values-folding.test.d.ts.map +1 -0
- package/out-tsc/tests/folding/values-folding.test.js +102 -0
- package/out-tsc/tests/folding/values-folding.test.js.map +1 -0
- package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts +5 -0
- package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts.map +1 -0
- package/out-tsc/tests/format/ddl/datatype-constraint.test.js +132 -0
- package/out-tsc/tests/format/ddl/datatype-constraint.test.js.map +1 -0
- package/out-tsc/tests/format/ddl/index.test.d.ts +5 -0
- package/out-tsc/tests/format/ddl/index.test.d.ts.map +1 -0
- package/out-tsc/tests/format/ddl/index.test.js +74 -0
- package/out-tsc/tests/format/ddl/index.test.js.map +1 -0
- package/out-tsc/tests/format/ddl/materialized-view.test.d.ts +5 -0
- package/out-tsc/tests/format/ddl/materialized-view.test.d.ts.map +1 -0
- package/out-tsc/tests/format/ddl/materialized-view.test.js +92 -0
- package/out-tsc/tests/format/ddl/materialized-view.test.js.map +1 -0
- package/out-tsc/tests/format/ddl/partition.test.d.ts +5 -0
- package/out-tsc/tests/format/ddl/partition.test.d.ts.map +1 -0
- package/out-tsc/tests/format/ddl/partition.test.js +109 -0
- package/out-tsc/tests/format/ddl/partition.test.js.map +1 -0
- package/out-tsc/tests/format/ddl/variable.test.d.ts +5 -0
- package/out-tsc/tests/format/ddl/variable.test.d.ts.map +1 -0
- package/out-tsc/tests/format/ddl/variable.test.js +58 -0
- package/out-tsc/tests/format/ddl/variable.test.js.map +1 -0
- package/out-tsc/tests/format/dml/select.test.d.ts +5 -0
- package/out-tsc/tests/format/dml/select.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dml/select.test.js +114 -0
- package/out-tsc/tests/format/dml/select.test.js.map +1 -0
- package/out-tsc/tests/format/dml/subquery.test.d.ts +5 -0
- package/out-tsc/tests/format/dml/subquery.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dml/subquery.test.js +221 -0
- package/out-tsc/tests/format/dml/subquery.test.js.map +1 -0
- package/out-tsc/tests/format/dql/comment.test.d.ts +7 -0
- package/out-tsc/tests/format/dql/comment.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/comment.test.js +279 -0
- package/out-tsc/tests/format/dql/comment.test.js.map +1 -0
- package/out-tsc/tests/format/dql/cte.test.d.ts +7 -0
- package/out-tsc/tests/format/dql/cte.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/cte.test.js +31 -0
- package/out-tsc/tests/format/dql/cte.test.js.map +1 -0
- package/out-tsc/tests/format/dql/dql-detail.test.d.ts +5 -0
- package/out-tsc/tests/format/dql/dql-detail.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/dql-detail.test.js +191 -0
- package/out-tsc/tests/format/dql/dql-detail.test.js.map +1 -0
- package/out-tsc/tests/format/dql/lateral-view.test.d.ts +7 -0
- package/out-tsc/tests/format/dql/lateral-view.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/lateral-view.test.js +34 -0
- package/out-tsc/tests/format/dql/lateral-view.test.js.map +1 -0
- package/out-tsc/tests/format/dql/pivot.test.d.ts +7 -0
- package/out-tsc/tests/format/dql/pivot.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/pivot.test.js +56 -0
- package/out-tsc/tests/format/dql/pivot.test.js.map +1 -0
- package/out-tsc/tests/format/dql/window.test.d.ts +7 -0
- package/out-tsc/tests/format/dql/window.test.d.ts.map +1 -0
- package/out-tsc/tests/format/dql/window.test.js +89 -0
- package/out-tsc/tests/format/dql/window.test.js.map +1 -0
- package/out-tsc/tests/format/expression/expression.test.d.ts +5 -0
- package/out-tsc/tests/format/expression/expression.test.d.ts.map +1 -0
- package/out-tsc/tests/format/expression/expression.test.js +203 -0
- package/out-tsc/tests/format/expression/expression.test.js.map +1 -0
- package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts +5 -0
- package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts.map +1 -0
- package/out-tsc/tests/format/pipe/pipe-operator.test.js +290 -0
- package/out-tsc/tests/format/pipe/pipe-operator.test.js.map +1 -0
- package/out-tsc/tests/format/procedure/compound-statement.test.d.ts +16 -0
- package/out-tsc/tests/format/procedure/compound-statement.test.d.ts.map +1 -0
- package/out-tsc/tests/format/procedure/compound-statement.test.js +254 -0
- package/out-tsc/tests/format/procedure/compound-statement.test.js.map +1 -0
- package/out-tsc/tests/format/resource/resource.test.d.ts +5 -0
- package/out-tsc/tests/format/resource/resource.test.d.ts.map +1 -0
- package/out-tsc/tests/format/resource/resource.test.js +69 -0
- package/out-tsc/tests/format/resource/resource.test.js.map +1 -0
- package/out-tsc/tests/format/test-utils.d.ts +40 -0
- package/out-tsc/tests/format/test-utils.d.ts.map +1 -0
- package/out-tsc/tests/format/test-utils.js +53 -0
- package/out-tsc/tests/format/test-utils.js.map +1 -0
- package/out-tsc/tests/lsp-server.test.d.ts +2 -0
- package/out-tsc/tests/lsp-server.test.d.ts.map +1 -0
- package/out-tsc/tests/lsp-server.test.js +1525 -0
- package/out-tsc/tests/lsp-server.test.js.map +1 -0
- package/out-tsc/tests/spark-sql-inputs.test.d.ts +17 -0
- package/out-tsc/tests/spark-sql-inputs.test.d.ts.map +1 -0
- package/out-tsc/tests/spark-sql-inputs.test.js +570 -0
- package/out-tsc/tests/spark-sql-inputs.test.js.map +1 -0
- package/out-tsc/tests/validation.test.d.ts +2 -0
- package/out-tsc/tests/validation.test.d.ts.map +1 -0
- package/out-tsc/tests/validation.test.js +115 -0
- package/out-tsc/tests/validation.test.js.map +1 -0
- package/out-tsc/typings.d.ts +115 -1
- package/out-tsc/typings.d.ts.map +1 -0
- package/out-tsc/typings.js +28 -0
- package/out-tsc/typings.js.map +1 -1
- package/out-tsc/utils.d.ts +1 -0
- package/out-tsc/utils.d.ts.map +1 -0
- package/out-tsc/utils.js +4 -5
- package/out-tsc/utils.js.map +1 -1
- package/out-tsc/visitors/completion.visitor.d.ts +85 -0
- package/out-tsc/visitors/completion.visitor.d.ts.map +1 -0
- package/out-tsc/visitors/completion.visitor.js +379 -0
- package/out-tsc/visitors/completion.visitor.js.map +1 -0
- package/out-tsc/visitors/lineage.visitor.d.ts +34 -0
- package/out-tsc/visitors/lineage.visitor.d.ts.map +1 -0
- package/out-tsc/visitors/lineage.visitor.js +181 -0
- package/out-tsc/visitors/lineage.visitor.js.map +1 -0
- package/out-tsc/visitors/space-replacer-format.visitor.d.ts +1641 -0
- package/out-tsc/visitors/space-replacer-format.visitor.d.ts.map +1 -0
- package/out-tsc/visitors/space-replacer-format.visitor.js +7529 -0
- package/out-tsc/visitors/space-replacer-format.visitor.js.map +1 -0
- package/out-tsc/visitors/sparksql-relation.visitor.d.ts +154 -0
- package/out-tsc/visitors/sparksql-relation.visitor.d.ts.map +1 -0
- package/out-tsc/visitors/sparksql-relation.visitor.js +749 -0
- package/out-tsc/visitors/sparksql-relation.visitor.js.map +1 -0
- package/package.json +36 -9
- package/out-tsc/constant.d.ts +0 -3
- package/out-tsc/constant.js +0 -7
- package/out-tsc/constant.js.map +0 -1
- package/out-tsc/lib/SparkSqlLexer.d.ts +0 -421
- package/out-tsc/lib/SparkSqlLexer.js +0 -2750
- package/out-tsc/lib/SparkSqlLexer.js.map +0 -1
- package/out-tsc/lib/SparkSqlParser.d.ts +0 -6200
- package/out-tsc/lib/SparkSqlParser.js +0 -34707
- package/out-tsc/lib/SparkSqlParser.js.map +0 -1
- package/out-tsc/lib/SparkSqlParserListener.d.ts +0 -1158
- package/out-tsc/lib/SparkSqlParserListener.js.map +0 -1
- package/out-tsc/lib/SparkSqlParserVisitor.d.ts +0 -773
- package/out-tsc/lib/SparkSqlParserVisitor.js.map +0 -1
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompletionVisitor = void 0;
|
|
4
|
+
const sparksql_relation_visitor_1 = require("./sparksql-relation.visitor");
|
|
5
|
+
const cursor_1 = require("../cursor");
|
|
6
|
+
const SparkSQLParser_1 = require("../lib/SparkSQLParser");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
const getRelationName = (relationPrimaryString) => {
|
|
9
|
+
const splits = relationPrimaryString.split(sparksql_relation_visitor_1.RELATION_SEPARATOR);
|
|
10
|
+
return splits[splits.length - 1];
|
|
11
|
+
};
|
|
12
|
+
function availableColumns(relation) {
|
|
13
|
+
const columns = [];
|
|
14
|
+
if (relation instanceof sparksql_relation_visitor_1.QueryRelation) {
|
|
15
|
+
relation.relations.forEach((rel, name) => {
|
|
16
|
+
const relationName = name !== rel.id ? name : undefined;
|
|
17
|
+
rel.columns.forEach(col => {
|
|
18
|
+
if (col.label !== sparksql_relation_visitor_1.STAR_LABEL && !col.label.includes(cursor_1.defaultCursorPlaceholder)) {
|
|
19
|
+
columns.push({
|
|
20
|
+
relation: relationName !== undefined ? { category: 'table', label: relationName } : undefined,
|
|
21
|
+
name: col.label,
|
|
22
|
+
desc: col.data !== undefined ? col.data : undefined
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
if (relation.sinkTableRelation !== undefined) {
|
|
30
|
+
relation.sinkTableRelation.columns.forEach(col => {
|
|
31
|
+
if (col.label !== sparksql_relation_visitor_1.STAR_LABEL && !col.label.includes(cursor_1.defaultCursorPlaceholder)) {
|
|
32
|
+
columns.push({
|
|
33
|
+
relation: { category: 'table', label: relation.sinkTableRelation.tablePrimary.relationName },
|
|
34
|
+
name: col.label,
|
|
35
|
+
desc: col.data !== undefined ? col.data : undefined
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return columns;
|
|
42
|
+
}
|
|
43
|
+
function getTableMetadataFnFactory(getColumns) {
|
|
44
|
+
return (relationPrimary) => {
|
|
45
|
+
if (relationPrimary.type !== 'table') {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const columns = getColumns({
|
|
49
|
+
table: relationPrimary.relationName,
|
|
50
|
+
catalog: relationPrimary.catalogName,
|
|
51
|
+
database: relationPrimary.databaseName
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
columns: columns.map(c => {
|
|
55
|
+
return {
|
|
56
|
+
id: `${(0, sparksql_relation_visitor_1.relationPrimaryToString)(relationPrimary)}_${c.label}`,
|
|
57
|
+
label: c.label,
|
|
58
|
+
data: c
|
|
59
|
+
};
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const SQL_SNIPPETS = [
|
|
65
|
+
{
|
|
66
|
+
label: 'CREATE TABLE ?',
|
|
67
|
+
filterText: 'CREATE',
|
|
68
|
+
template: `CREATE TABLE \${1:table_name}
|
|
69
|
+
(
|
|
70
|
+
\${2:column_name} \${3:column_type}
|
|
71
|
+
)
|
|
72
|
+
USING \${4:parquet}
|
|
73
|
+
;`
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'CREATE VIEW ?',
|
|
77
|
+
filterText: 'CREATE',
|
|
78
|
+
template: `CREATE VIEW \${1:view_name}
|
|
79
|
+
AS SELECT \${2:columns} FROM \${3:table_name}
|
|
80
|
+
;`
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'INSERT INTO ?',
|
|
84
|
+
filterText: 'INSERT',
|
|
85
|
+
template: `INSERT INTO \${1:table_name}
|
|
86
|
+
SELECT \${2:columns} FROM \${3:source_table}
|
|
87
|
+
;`
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'SELECT ? FROM ?',
|
|
91
|
+
filterText: 'SELECT',
|
|
92
|
+
template: `SELECT \${1:columns} FROM \${2:table_name}`
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
/**
|
|
96
|
+
* An Antlr4ts visitor which builds beyond the query contextual analysis. It also
|
|
97
|
+
* captures contexts of any TEMPORARY VIEW/TABLE DDL statements if exists.
|
|
98
|
+
*/
|
|
99
|
+
class CompletionVisitor extends sparksql_relation_visitor_1.SparkSQLRelationVisitor {
|
|
100
|
+
constructor(cursor, getColumns) {
|
|
101
|
+
super(getColumns && getTableMetadataFnFactory(getColumns));
|
|
102
|
+
this.cursor = cursor;
|
|
103
|
+
this.getColumns = getColumns;
|
|
104
|
+
this.hasCompletions = false;
|
|
105
|
+
this.completions = { type: 'other', snippets: [] };
|
|
106
|
+
}
|
|
107
|
+
defaultResult() {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
aggregateResult() {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
onColumnReference() {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
updateQueryCompletionItems(relation) {
|
|
117
|
+
// Is this the innermost query with the cursor inside
|
|
118
|
+
if (!this.hasCompletions && this.caretScope !== undefined) {
|
|
119
|
+
this.hasCompletions = true;
|
|
120
|
+
switch (this.caretScope.type) {
|
|
121
|
+
case 'select-column':
|
|
122
|
+
case 'spec-column': {
|
|
123
|
+
const columns = availableColumns(relation);
|
|
124
|
+
// unique relations to avoid duplicated tables
|
|
125
|
+
const relationMap = new Map();
|
|
126
|
+
columns.forEach(c => {
|
|
127
|
+
if (c.relation) {
|
|
128
|
+
const key = `${c.relation.category}:${c.relation.label}`;
|
|
129
|
+
if (!relationMap.has(key)) {
|
|
130
|
+
relationMap.set(key, c.relation);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const uniqueRelations = [...relationMap.values()];
|
|
135
|
+
this.completions = {
|
|
136
|
+
type: 'column',
|
|
137
|
+
columns,
|
|
138
|
+
relations: uniqueRelations,
|
|
139
|
+
snippets: this.completions.snippets
|
|
140
|
+
};
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
case 'scoped-column': {
|
|
144
|
+
let newCompletions = [];
|
|
145
|
+
const relationName = this.caretScope.relation;
|
|
146
|
+
const relationFound = this.relationDDLColumns.get(relationName);
|
|
147
|
+
if (relationFound) {
|
|
148
|
+
newCompletions = relationFound.map(c => ({
|
|
149
|
+
relation: { category: 'table', label: getRelationName(relationName) },
|
|
150
|
+
name: c.label
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const cteFound = relation.findCTE(getRelationName(relationName));
|
|
155
|
+
if (cteFound) {
|
|
156
|
+
newCompletions = cteFound.columns.map(c => ({
|
|
157
|
+
relation: { category: 'CTE', label: getRelationName(relationName) },
|
|
158
|
+
name: c.label
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
newCompletions =
|
|
163
|
+
relation
|
|
164
|
+
.findLocalRelation(relationName)
|
|
165
|
+
?.columns.filter(c => c.label !== sparksql_relation_visitor_1.STAR_LABEL && !c.label.includes(cursor_1.defaultCursorPlaceholder))
|
|
166
|
+
.map(c => ({
|
|
167
|
+
relation: { category: 'table', label: getRelationName(relationName) },
|
|
168
|
+
name: c.label
|
|
169
|
+
})) ?? [];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
this.completions = {
|
|
173
|
+
type: 'column',
|
|
174
|
+
relations: [], // no need to suggest relation if already scoped
|
|
175
|
+
columns: newCompletions,
|
|
176
|
+
snippets: this.completions.snippets
|
|
177
|
+
};
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case 'relation': {
|
|
181
|
+
const ctes = relation.getCTENames().map(label => ({
|
|
182
|
+
label,
|
|
183
|
+
category: 'CTE'
|
|
184
|
+
}));
|
|
185
|
+
const tableDDLNames = [...this.tableDDLs.keys()].map(label => ({
|
|
186
|
+
label: getRelationName(label),
|
|
187
|
+
category: 'table'
|
|
188
|
+
}));
|
|
189
|
+
const viewDDLNames = [...this.viewDDLs.keys()].map(label => ({
|
|
190
|
+
label: getRelationName(label),
|
|
191
|
+
category: 'view'
|
|
192
|
+
}));
|
|
193
|
+
// 对 ctes / tableDDLNames / viewDDLNames 统一按 category+label 去重
|
|
194
|
+
const relationMap = new Map();
|
|
195
|
+
[...ctes, ...tableDDLNames, ...viewDDLNames].forEach(r => {
|
|
196
|
+
const key = `${r.category}:${r.label}`;
|
|
197
|
+
if (!relationMap.has(key)) {
|
|
198
|
+
relationMap.set(key, r);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
const uniqueRelations = [...relationMap.values()];
|
|
202
|
+
this.completions = {
|
|
203
|
+
type: 'relation',
|
|
204
|
+
relations: uniqueRelations,
|
|
205
|
+
snippets: this.completions.snippets,
|
|
206
|
+
incompleteReference: this.caretScope.prefix.length > 0 ? this.caretScope.prefix : undefined
|
|
207
|
+
};
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
default:
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
handleRelationContext(ctx) {
|
|
216
|
+
let multipartRelationName;
|
|
217
|
+
if (ctx instanceof SparkSQLParser_1.IdentifierReferenceContext) {
|
|
218
|
+
const multipartId = ctx.multipartIdentifier();
|
|
219
|
+
if (!multipartId)
|
|
220
|
+
return;
|
|
221
|
+
multipartRelationName = multipartId.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
multipartRelationName = ctx.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
|
|
225
|
+
}
|
|
226
|
+
const lastPart = multipartRelationName[multipartRelationName.length - 1];
|
|
227
|
+
const category = 'table';
|
|
228
|
+
this.relationInStatementContext = this.relationPrimaryFromMultipart(multipartRelationName, category);
|
|
229
|
+
if (!this.hasCompletions && this.cursor.isIn(lastPart)) {
|
|
230
|
+
this.hasCompletions = true;
|
|
231
|
+
this.caretScope = { type: 'relation', prefix: multipartRelationName.slice(0, -1) };
|
|
232
|
+
this.completions = {
|
|
233
|
+
type: 'relation',
|
|
234
|
+
relations: [...this.tableDDLs.keys()].map(label => ({
|
|
235
|
+
label: getRelationName(label),
|
|
236
|
+
category
|
|
237
|
+
})),
|
|
238
|
+
snippets: this.completions.snippets,
|
|
239
|
+
incompleteReference: this.caretScope.prefix.length > 0 ? this.caretScope.prefix : undefined
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
handleScopedColumn() {
|
|
244
|
+
if (!this.hasCompletions && this.relationInStatementContext) {
|
|
245
|
+
this.hasCompletions = true;
|
|
246
|
+
this.caretScope = {
|
|
247
|
+
type: 'scoped-column',
|
|
248
|
+
relation: (0, sparksql_relation_visitor_1.relationPrimaryToString)(this.relationInStatementContext)
|
|
249
|
+
};
|
|
250
|
+
let newCompletions = [];
|
|
251
|
+
const relationName = this.relationInStatementContext.relationName;
|
|
252
|
+
const relationDDL = this.relationDDLColumns.get(relationName);
|
|
253
|
+
if (relationDDL) {
|
|
254
|
+
newCompletions = relationDDL.map(c => ({
|
|
255
|
+
relation: { category: 'table', label: relationName },
|
|
256
|
+
name: c.label
|
|
257
|
+
}));
|
|
258
|
+
}
|
|
259
|
+
else if (this.getColumns) {
|
|
260
|
+
newCompletions = this.getColumns({
|
|
261
|
+
catalog: this.relationInStatementContext.catalogName,
|
|
262
|
+
database: this.relationInStatementContext.databaseName,
|
|
263
|
+
table: this.relationInStatementContext.relationName
|
|
264
|
+
}).map(c => ({
|
|
265
|
+
relation: { category: 'table', label: relationName },
|
|
266
|
+
name: c.label
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
269
|
+
this.completions = {
|
|
270
|
+
type: 'column',
|
|
271
|
+
relations: [], // no need to suggest relation if already scoped
|
|
272
|
+
columns: newCompletions,
|
|
273
|
+
snippets: this.completions.snippets
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
handleDatabaseContext(ctx) {
|
|
278
|
+
const multipartDatabaseName = ctx.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
|
|
279
|
+
const lastPart = multipartDatabaseName[multipartDatabaseName.length - 1];
|
|
280
|
+
if (this.cursor.isIn(lastPart)) {
|
|
281
|
+
this.hasCompletions = true;
|
|
282
|
+
const incompleteReference = multipartDatabaseName.length > 1 ? multipartDatabaseName[0] : undefined;
|
|
283
|
+
this.completions = { type: 'database', incompleteReference, snippets: [] };
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
getSuggestions() {
|
|
287
|
+
return this.completions;
|
|
288
|
+
}
|
|
289
|
+
onRelation(relation) {
|
|
290
|
+
if (relation instanceof sparksql_relation_visitor_1.TableRelation || relation instanceof sparksql_relation_visitor_1.InsertRelation || relation instanceof sparksql_relation_visitor_1.ViewRelation) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
this.updateQueryCompletionItems(relation);
|
|
294
|
+
}
|
|
295
|
+
visitErrorNode(node) {
|
|
296
|
+
super.visitErrorNode(node);
|
|
297
|
+
if (this.cursor.isIn(node.text)) {
|
|
298
|
+
if (node.parent instanceof SparkSQLParser_1.StatementContext || node.parent instanceof SparkSQLParser_1.ProgramContext) {
|
|
299
|
+
this.completions.snippets.push(...SQL_SNIPPETS.filter(s => s.filterText.toUpperCase().indexOf(this.cursor.revert(node.text).toUpperCase()) === 0) // must match snippet's filterText from the beginning
|
|
300
|
+
);
|
|
301
|
+
this.caretScope = { type: 'other' };
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
visitStatement(ctx) {
|
|
306
|
+
this.relationInStatementContext = undefined;
|
|
307
|
+
super.visitStatement(ctx);
|
|
308
|
+
}
|
|
309
|
+
visitUse(ctx) {
|
|
310
|
+
super.visitUse(ctx);
|
|
311
|
+
const identifierRef = ctx.identifierReference();
|
|
312
|
+
if (identifierRef) {
|
|
313
|
+
const multipartId = identifierRef.multipartIdentifier();
|
|
314
|
+
if (multipartId) {
|
|
315
|
+
this.handleDatabaseContext(multipartId);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
visitCreateTable(ctx) {
|
|
320
|
+
const tableHeader = ctx.createTableHeader();
|
|
321
|
+
if (tableHeader) {
|
|
322
|
+
const identifierRef = tableHeader.identifierReference();
|
|
323
|
+
if (identifierRef) {
|
|
324
|
+
this.handleRelationContext(identifierRef);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
super.visitCreateTable(ctx);
|
|
328
|
+
}
|
|
329
|
+
visitCreateView(ctx) {
|
|
330
|
+
const identifierRef = ctx.identifierReference();
|
|
331
|
+
if (identifierRef) {
|
|
332
|
+
this.handleRelationContext(identifierRef);
|
|
333
|
+
}
|
|
334
|
+
super.visitCreateView(ctx);
|
|
335
|
+
}
|
|
336
|
+
visitQuerySpecification(ctx) {
|
|
337
|
+
super.visitQuerySpecification(ctx);
|
|
338
|
+
if (this.currentQueryRelation !== undefined) {
|
|
339
|
+
this.updateQueryCompletionItems(this.currentQueryRelation);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
visitRelation(ctx) {
|
|
343
|
+
const relationPrimary = ctx.relationPrimary();
|
|
344
|
+
if (relationPrimary instanceof SparkSQLParser_1.TableNameContext) {
|
|
345
|
+
const identifierRef = relationPrimary.identifierReference();
|
|
346
|
+
const multipartId = identifierRef.multipartIdentifier();
|
|
347
|
+
if (multipartId) {
|
|
348
|
+
const multipartTableName = multipartId
|
|
349
|
+
.errorCapturingIdentifier()
|
|
350
|
+
.map((t) => (0, utils_1.sanitizeText)(t.text));
|
|
351
|
+
const lastPart = multipartTableName[multipartTableName.length - 1];
|
|
352
|
+
if (this.cursor.isIn(lastPart)) {
|
|
353
|
+
this.caretScope = { type: 'relation', prefix: multipartTableName.slice(0, -1) };
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
super.visitRelation(ctx);
|
|
358
|
+
}
|
|
359
|
+
visitColumnReference(ctx) {
|
|
360
|
+
super.visitColumnReference(ctx);
|
|
361
|
+
const identifier = ctx.identifier();
|
|
362
|
+
if (this.currentQueryRelation !== undefined && identifier && this.cursor.isIn(identifier.text)) {
|
|
363
|
+
if (this.currentQueryRelation.currentClause === 'select') {
|
|
364
|
+
this.caretScope = { type: 'select-column' };
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
this.caretScope = { type: 'spec-column' };
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
visitSelectClause(ctx) {
|
|
372
|
+
super.visitSelectClause(ctx);
|
|
373
|
+
}
|
|
374
|
+
visitFromClause(ctx) {
|
|
375
|
+
super.visitFromClause(ctx);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
exports.CompletionVisitor = CompletionVisitor;
|
|
379
|
+
//# sourceMappingURL=completion.visitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion.visitor.js","sourceRoot":"","sources":["../../src/visitors/completion.visitor.ts"],"names":[],"mappings":";;;AAEA,2EASqC;AACrC,sCAAkE;AAClE,0DAc+B;AAG/B,oCAAwC;AAsDxC,MAAM,eAAe,GAAG,CAAC,qBAA6B,EAAU,EAAE;IAChE,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,8CAAkB,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,SAAS,gBAAgB,CACvB,QAAwC;IAExC,MAAM,OAAO,GAAqE,EAAE,CAAC;IAErF,IAAI,QAAQ,YAAY,yCAAa,EAAE,CAAC;QACtC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACvC,MAAM,YAAY,GAAG,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAExD,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACxB,IAAI,GAAG,CAAC,KAAK,KAAK,sCAAU,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,iCAAwB,CAAC,EA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QAAQ,EAAE,CAAC;gBACzD,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YAC9C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,GAAwB;QACxC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,eAAe,CAAC,GAAsB;QACpC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACF;AAlTD,8CAkTC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AbstractParseTreeVisitor } from 'antlr4ts/tree';
|
|
2
|
+
import { CreateTableContext, CreateViewContext, FromClauseContext, InsertIntoTableContext, QueryContext, RelationContext, SelectClauseContext } from '../lib/SparkSQLParser';
|
|
3
|
+
import { SparkSQLParserVisitor } from '../lib/SparkSQLParserVisitor';
|
|
4
|
+
import { Lineage, LineageEdge, LineageOptions, Relation, RelationPrimary } from '../lineage.typing';
|
|
5
|
+
export declare const STAR_LABEL = "*";
|
|
6
|
+
export declare const COUNT_STAR_LABEL = "count(*)";
|
|
7
|
+
export declare class LineageVisitor extends AbstractParseTreeVisitor<void> implements SparkSQLParserVisitor<void> {
|
|
8
|
+
private options;
|
|
9
|
+
relations: Array<{
|
|
10
|
+
relationPrimary?: RelationPrimary;
|
|
11
|
+
relation: Relation;
|
|
12
|
+
}>;
|
|
13
|
+
edges: LineageEdge[];
|
|
14
|
+
private edgeIdSeq;
|
|
15
|
+
private queryIdSeq;
|
|
16
|
+
private tableIdSeq;
|
|
17
|
+
private viewIdSeq;
|
|
18
|
+
private insertIdSeq;
|
|
19
|
+
private columnIdSeq;
|
|
20
|
+
constructor(options: LineageOptions);
|
|
21
|
+
protected defaultResult(): void;
|
|
22
|
+
getLineage(): Lineage;
|
|
23
|
+
private generateId;
|
|
24
|
+
private extractTableName;
|
|
25
|
+
private extractNameFromIdentifierReference;
|
|
26
|
+
visitQuery(ctx: QueryContext): void;
|
|
27
|
+
visitRelation(ctx: RelationContext): void;
|
|
28
|
+
visitInsertIntoTable(ctx: InsertIntoTableContext): void;
|
|
29
|
+
visitCreateTable(ctx: CreateTableContext): void;
|
|
30
|
+
visitCreateView(ctx: CreateViewContext): void;
|
|
31
|
+
visitSelectClause(ctx: SelectClauseContext): void;
|
|
32
|
+
visitFromClause(ctx: FromClauseContext): void;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=lineage.visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.visitor.d.ts","sourceRoot":"","sources":["../../src/visitors/lineage.visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EAEjB,sBAAsB,EAEtB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpH,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,qBAAa,cAAe,SAAQ,wBAAwB,CAAC,IAAI,CAAE,YAAW,qBAAqB,CAAC,IAAI,CAAC;IAW3F,OAAO,CAAC,OAAO;IAV3B,SAAS,EAAE,KAAK,CAAC;QAAE,eAAe,CAAC,EAAE,eAAe,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAM;IACjF,KAAK,EAAE,WAAW,EAAE,CAAM;IAE1B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,WAAW,CAAK;gBAEJ,OAAO,EAAE,cAAc;IAI3C,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,UAAU,IAAI,OAAO;IAOrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kCAAkC;IAQ1C,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IAkBnC,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IA4BzC,oBAAoB,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI;IA4BvD,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAgC/C,eAAe,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IA4B7C,iBAAiB,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;IAYjD,eAAe,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;CAG9C"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LineageVisitor = exports.COUNT_STAR_LABEL = exports.STAR_LABEL = void 0;
|
|
4
|
+
const tree_1 = require("antlr4ts/tree");
|
|
5
|
+
exports.STAR_LABEL = '*';
|
|
6
|
+
exports.COUNT_STAR_LABEL = 'count(*)';
|
|
7
|
+
class LineageVisitor extends tree_1.AbstractParseTreeVisitor {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super();
|
|
10
|
+
this.options = options;
|
|
11
|
+
this.relations = [];
|
|
12
|
+
this.edges = [];
|
|
13
|
+
this.edgeIdSeq = 1;
|
|
14
|
+
this.queryIdSeq = 1;
|
|
15
|
+
this.tableIdSeq = 1;
|
|
16
|
+
this.viewIdSeq = 1;
|
|
17
|
+
this.insertIdSeq = 1;
|
|
18
|
+
this.columnIdSeq = 1;
|
|
19
|
+
}
|
|
20
|
+
defaultResult() {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
getLineage() {
|
|
24
|
+
return {
|
|
25
|
+
nodes: this.relations.map(r => r.relation),
|
|
26
|
+
edges: this.edges
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
generateId(prefix, seq) {
|
|
30
|
+
return `${prefix}_${seq}`;
|
|
31
|
+
}
|
|
32
|
+
extractTableName(ctx) {
|
|
33
|
+
const identifiers = ctx.errorCapturingIdentifier();
|
|
34
|
+
const relationName = identifiers[identifiers.length - 1].text;
|
|
35
|
+
const databaseName = identifiers.length > 1 ? identifiers[identifiers.length - 2].text : undefined;
|
|
36
|
+
const catalogName = identifiers.length > 2 ? identifiers[identifiers.length - 3].text : undefined;
|
|
37
|
+
return {
|
|
38
|
+
type: 'table',
|
|
39
|
+
relationName,
|
|
40
|
+
databaseName,
|
|
41
|
+
catalogName
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
extractNameFromIdentifierReference(ctx) {
|
|
45
|
+
const multipartId = ctx.multipartIdentifier();
|
|
46
|
+
if (multipartId) {
|
|
47
|
+
return multipartId.text;
|
|
48
|
+
}
|
|
49
|
+
return ctx.text;
|
|
50
|
+
}
|
|
51
|
+
visitQuery(ctx) {
|
|
52
|
+
const queryId = this.generateId('query', this.queryIdSeq++);
|
|
53
|
+
const columns = [];
|
|
54
|
+
this.visitChildren(ctx);
|
|
55
|
+
this.relations.push({
|
|
56
|
+
relation: {
|
|
57
|
+
type: 'query',
|
|
58
|
+
id: queryId,
|
|
59
|
+
label: `query_${this.queryIdSeq - 1}`,
|
|
60
|
+
columns,
|
|
61
|
+
isSourceOnly: false,
|
|
62
|
+
isTargetOnly: false
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
visitRelation(ctx) {
|
|
67
|
+
const tableId = this.generateId('table', this.tableIdSeq++);
|
|
68
|
+
const relationPrimary = ctx.relationPrimary();
|
|
69
|
+
if (relationPrimary) {
|
|
70
|
+
const text = relationPrimary.text;
|
|
71
|
+
const tablePrimary = {
|
|
72
|
+
type: 'table',
|
|
73
|
+
relationName: text
|
|
74
|
+
};
|
|
75
|
+
this.relations.push({
|
|
76
|
+
relationPrimary: tablePrimary,
|
|
77
|
+
relation: {
|
|
78
|
+
type: 'table',
|
|
79
|
+
id: tableId,
|
|
80
|
+
label: text,
|
|
81
|
+
columns: [],
|
|
82
|
+
data: tablePrimary,
|
|
83
|
+
isSourceOnly: true,
|
|
84
|
+
isTargetOnly: false
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
this.visitChildren(ctx);
|
|
89
|
+
}
|
|
90
|
+
visitInsertIntoTable(ctx) {
|
|
91
|
+
const insertId = this.generateId('insert', this.insertIdSeq++);
|
|
92
|
+
const identifierRef = ctx.identifierReference();
|
|
93
|
+
if (identifierRef) {
|
|
94
|
+
const tableName = this.extractNameFromIdentifierReference(identifierRef);
|
|
95
|
+
const tablePrimary = {
|
|
96
|
+
type: 'insert',
|
|
97
|
+
relationName: tableName
|
|
98
|
+
};
|
|
99
|
+
this.relations.push({
|
|
100
|
+
relationPrimary: tablePrimary,
|
|
101
|
+
relation: {
|
|
102
|
+
type: 'insert',
|
|
103
|
+
id: insertId,
|
|
104
|
+
label: tableName,
|
|
105
|
+
columns: [],
|
|
106
|
+
data: tablePrimary,
|
|
107
|
+
isSourceOnly: false,
|
|
108
|
+
isTargetOnly: true
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
this.visitChildren(ctx);
|
|
113
|
+
}
|
|
114
|
+
visitCreateTable(ctx) {
|
|
115
|
+
const tableId = this.generateId('table', this.tableIdSeq++);
|
|
116
|
+
// Get table name from createTableHeader
|
|
117
|
+
const tableHeader = ctx.createTableHeader();
|
|
118
|
+
if (tableHeader) {
|
|
119
|
+
const identifierRef = tableHeader.identifierReference();
|
|
120
|
+
if (identifierRef) {
|
|
121
|
+
const tableName = this.extractNameFromIdentifierReference(identifierRef);
|
|
122
|
+
const tablePrimary = {
|
|
123
|
+
type: 'table',
|
|
124
|
+
relationName: tableName
|
|
125
|
+
};
|
|
126
|
+
this.relations.push({
|
|
127
|
+
relationPrimary: tablePrimary,
|
|
128
|
+
relation: {
|
|
129
|
+
type: 'table',
|
|
130
|
+
id: tableId,
|
|
131
|
+
label: tableName,
|
|
132
|
+
columns: [],
|
|
133
|
+
data: tablePrimary,
|
|
134
|
+
isSourceOnly: false,
|
|
135
|
+
isTargetOnly: true
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
this.visitChildren(ctx);
|
|
141
|
+
}
|
|
142
|
+
visitCreateView(ctx) {
|
|
143
|
+
const viewId = this.generateId('view', this.viewIdSeq++);
|
|
144
|
+
const identifierRef = ctx.identifierReference();
|
|
145
|
+
if (identifierRef) {
|
|
146
|
+
const viewName = this.extractNameFromIdentifierReference(identifierRef);
|
|
147
|
+
const tablePrimary = {
|
|
148
|
+
type: 'view',
|
|
149
|
+
relationName: viewName
|
|
150
|
+
};
|
|
151
|
+
this.relations.push({
|
|
152
|
+
relationPrimary: tablePrimary,
|
|
153
|
+
relation: {
|
|
154
|
+
type: 'view',
|
|
155
|
+
id: viewId,
|
|
156
|
+
label: viewName,
|
|
157
|
+
columns: [],
|
|
158
|
+
data: tablePrimary,
|
|
159
|
+
isSourceOnly: false,
|
|
160
|
+
isTargetOnly: true
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
this.visitChildren(ctx);
|
|
165
|
+
}
|
|
166
|
+
visitSelectClause(ctx) {
|
|
167
|
+
const namedExprSeq = ctx.namedExpressionSeq();
|
|
168
|
+
if (namedExprSeq) {
|
|
169
|
+
const namedExprs = namedExprSeq.namedExpression();
|
|
170
|
+
namedExprs.forEach((_expr, _index) => {
|
|
171
|
+
// TODO: Implement column-level lineage tracking
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
this.visitChildren(ctx);
|
|
175
|
+
}
|
|
176
|
+
visitFromClause(ctx) {
|
|
177
|
+
this.visitChildren(ctx);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.LineageVisitor = LineageVisitor;
|
|
181
|
+
//# sourceMappingURL=lineage.visitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.visitor.js","sourceRoot":"","sources":["../../src/visitors/lineage.visitor.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;AAgB5C,QAAA,UAAU,GAAG,GAAG,CAAC;AACjB,QAAA,gBAAgB,GAAG,UAAU,CAAC;AAE3C,MAAa,cAAe,SAAQ,+BAA8B;IAWhE,YAAoB,OAAuB;QACzC,KAAK,EAAE,CAAC;QADU,YAAO,GAAP,OAAO,CAAgB;QAV3C,cAAS,GAAqE,EAAE,CAAC;QACjF,UAAK,GAAkB,EAAE,CAAC;QAElB,cAAS,GAAG,CAAC,CAAC;QACd,eAAU,GAAG,CAAC,CAAC;QACf,eAAU,GAAG,CAAC,CAAC;QACf,cAAS,GAAG,CAAC,CAAC;QACd,gBAAW,GAAG,CAAC,CAAC;QAChB,gBAAW,GAAG,CAAC,CAAC;IAIxB,CAAC;IAES,aAAa;QACrB,OAAO;IACT,CAAC;IAED,UAAU;QACR,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,MAAc,EAAE,GAAW;QAC5C,OAAO,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC;IAC5B,CAAC;IAEO,gBAAgB,CAAC,GAA+B;QACtD,MAAM,WAAW,GAAG,GAAG,CAAC,wBAAwB,EAAE,CAAC;QACnD,MAA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