spark-sql-language-server 0.0.1-beta.6 → 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 -6203
- package/out-tsc/lib/SparkSqlParser.js +0 -34733
- 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,438 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MergeStrategy = exports.UpdateStrategy = exports.DeleteStrategy = exports.InsertStrategy = void 0;
|
|
4
|
+
const SparkSQLParser_1 = require("../../../lib/SparkSQLParser");
|
|
5
|
+
const core_1 = require("../../core");
|
|
6
|
+
/**
|
|
7
|
+
* Add newline with indent before the node
|
|
8
|
+
* @deprecated Use bridge.updateAfterPreviousTokenByNode directly
|
|
9
|
+
*/
|
|
10
|
+
function _addNewlineIndentBeforeNode(node, bridge) {
|
|
11
|
+
bridge.updateAfterPreviousTokenByNode(node, bridge.newlineIndent);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Add newline before the node (no indent) - uses newlineIndent but removes indent
|
|
15
|
+
* @deprecated Use bridge.updateAfterPreviousTokenByNode directly
|
|
16
|
+
*/
|
|
17
|
+
function _addNewlineBeforeNode(node, bridge) {
|
|
18
|
+
bridge.updateAfterPreviousTokenByNode(node, '\n');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Add newline with indent before context
|
|
22
|
+
* @deprecated Use bridge.updateAfterPreviousTokenByContext directly
|
|
23
|
+
*/
|
|
24
|
+
function _addNewlineIndentBeforeContext(ctx, bridge) {
|
|
25
|
+
if (ctx && typeof ctx === 'object' && 'start' in ctx) {
|
|
26
|
+
bridge.updateAfterPreviousTokenByContext(ctx, bridge.newlineIndent);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Add newline before context (no indent)
|
|
31
|
+
*/
|
|
32
|
+
function addNewlineBeforeContext(ctx, bridge) {
|
|
33
|
+
if (ctx && typeof ctx === 'object' && 'start' in ctx) {
|
|
34
|
+
bridge.updateAfterPreviousTokenByContext(ctx, '\n');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Add space after node
|
|
39
|
+
*/
|
|
40
|
+
function addSpaceAfterNode(node, bridge) {
|
|
41
|
+
if (node) {
|
|
42
|
+
bridge.updateBeforeNextTokenByNode(node, ' ');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Add space after context
|
|
47
|
+
*/
|
|
48
|
+
function addSpaceAfterContext(ctx, bridge) {
|
|
49
|
+
if (ctx && typeof ctx === 'object' && 'start' in ctx) {
|
|
50
|
+
bridge.updateBeforeNextTokenByContext(ctx, ' ');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
class InsertStrategy extends core_1.BaseFormattingStrategy {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(...arguments);
|
|
56
|
+
this.id = 'dml.insert';
|
|
57
|
+
}
|
|
58
|
+
canHandle(ctx) {
|
|
59
|
+
return (ctx instanceof SparkSQLParser_1.SingleInsertQueryContext ||
|
|
60
|
+
ctx instanceof SparkSQLParser_1.InsertIntoTableContext ||
|
|
61
|
+
ctx instanceof SparkSQLParser_1.InsertOverwriteTableContext ||
|
|
62
|
+
ctx instanceof SparkSQLParser_1.InsertOverwriteHiveDirContext ||
|
|
63
|
+
ctx instanceof SparkSQLParser_1.InsertOverwriteDirContext);
|
|
64
|
+
}
|
|
65
|
+
format(ctx, bridge) {
|
|
66
|
+
if (ctx instanceof SparkSQLParser_1.SingleInsertQueryContext) {
|
|
67
|
+
this.formatSingleInsertQuery(ctx, bridge);
|
|
68
|
+
}
|
|
69
|
+
else if (ctx instanceof SparkSQLParser_1.InsertIntoTableContext) {
|
|
70
|
+
this.formatInsertIntoTable(ctx, bridge);
|
|
71
|
+
}
|
|
72
|
+
else if (ctx instanceof SparkSQLParser_1.InsertOverwriteTableContext) {
|
|
73
|
+
this.formatInsertOverwriteTable(ctx, bridge);
|
|
74
|
+
}
|
|
75
|
+
else if (ctx instanceof SparkSQLParser_1.InsertOverwriteHiveDirContext) {
|
|
76
|
+
this.formatInsertOverwriteHiveDir(ctx, bridge);
|
|
77
|
+
}
|
|
78
|
+
else if (ctx instanceof SparkSQLParser_1.InsertOverwriteDirContext) {
|
|
79
|
+
this.formatInsertOverwriteDir(ctx, bridge);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Format INSERT INTO ... SELECT
|
|
84
|
+
* Expected:
|
|
85
|
+
* INSERT INTO t
|
|
86
|
+
* SELECT
|
|
87
|
+
* a,
|
|
88
|
+
* b
|
|
89
|
+
* FROM
|
|
90
|
+
* source
|
|
91
|
+
*/
|
|
92
|
+
formatSingleInsertQuery(ctx, bridge) {
|
|
93
|
+
// Check if this is an INSERT OVERWRITE DIRECTORY case
|
|
94
|
+
// In that case, SELECT formatting is handled by formatInsertOverwriteDir
|
|
95
|
+
const insertInto = ctx.insertInto();
|
|
96
|
+
if (insertInto instanceof SparkSQLParser_1.InsertOverwriteDirContext) {
|
|
97
|
+
// SELECT should be on new line with indent (handled in formatInsertOverwriteDir)
|
|
98
|
+
const query = ctx.query();
|
|
99
|
+
if (query) {
|
|
100
|
+
bridge.updateAfterPreviousTokenByContext(query, '\n ');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// Standard INSERT INTO or INSERT OVERWRITE TABLE
|
|
105
|
+
const query = ctx.query();
|
|
106
|
+
if (query) {
|
|
107
|
+
const hasCTE = query.ctes() !== undefined;
|
|
108
|
+
if (hasCTE) {
|
|
109
|
+
// WITH should be on new line with indent after INSERT INTO table_name
|
|
110
|
+
bridge.updateBeforeNextTokenByContext(query.ctes(), '\n ');
|
|
111
|
+
bridge.visitChildren(ctx);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
// SELECT should be on new line with 2-space indent
|
|
115
|
+
bridge.updateAfterPreviousTokenByContext(query, '\n ');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Add indent for the query body (SELECT columns will have additional indent)
|
|
119
|
+
bridge.addIndent();
|
|
120
|
+
bridge.visitChildren(ctx);
|
|
121
|
+
bridge.minusIndent();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Format INSERT INTO keywords
|
|
125
|
+
* Expected:
|
|
126
|
+
* INSERT INTO t (a, b)
|
|
127
|
+
* VALUES (1, 2)
|
|
128
|
+
*
|
|
129
|
+
* With PARTITION:
|
|
130
|
+
* INSERT INTO t
|
|
131
|
+
* PARTITION (ds = '2024-01-01')
|
|
132
|
+
* VALUES (1, 2)
|
|
133
|
+
*/
|
|
134
|
+
formatInsertIntoTable(ctx, bridge) {
|
|
135
|
+
const insertNode = ctx.INSERT();
|
|
136
|
+
const intoNode = ctx.INTO();
|
|
137
|
+
addSpaceAfterNode(insertNode, bridge);
|
|
138
|
+
addSpaceAfterNode(intoNode, bridge);
|
|
139
|
+
const partitionSpec = ctx.partitionSpec();
|
|
140
|
+
if (partitionSpec) {
|
|
141
|
+
// PARTITION on new line with 2-space indent
|
|
142
|
+
bridge.updateAfterPreviousTokenByContext(partitionSpec, bridge.newlineIndent);
|
|
143
|
+
}
|
|
144
|
+
bridge.visitChildren(ctx);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Format INSERT OVERWRITE TABLE
|
|
148
|
+
* Expected:
|
|
149
|
+
* INSERT OVERWRITE TABLE t
|
|
150
|
+
* PARTITION (...)
|
|
151
|
+
* SELECT ...
|
|
152
|
+
*/
|
|
153
|
+
formatInsertOverwriteTable(ctx, bridge) {
|
|
154
|
+
const insertNode = ctx.INSERT();
|
|
155
|
+
const overwriteNode = ctx.OVERWRITE();
|
|
156
|
+
addSpaceAfterNode(insertNode, bridge);
|
|
157
|
+
addSpaceAfterNode(overwriteNode, bridge);
|
|
158
|
+
// PARTITION on new line with 2-space indent
|
|
159
|
+
const partitionSpec = ctx.partitionSpec();
|
|
160
|
+
if (partitionSpec) {
|
|
161
|
+
bridge.updateAfterPreviousTokenByContext(partitionSpec, bridge.newlineIndent);
|
|
162
|
+
}
|
|
163
|
+
bridge.visitChildren(ctx);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Format INSERT OVERWRITE DIRECTORY (Hive format)
|
|
167
|
+
* Expected:
|
|
168
|
+
* INSERT OVERWRITE DIRECTORY '/path'
|
|
169
|
+
* SELECT ...
|
|
170
|
+
*/
|
|
171
|
+
formatInsertOverwriteHiveDir(ctx, bridge) {
|
|
172
|
+
const insertNode = ctx.INSERT();
|
|
173
|
+
const overwriteNode = ctx.OVERWRITE();
|
|
174
|
+
addSpaceAfterNode(insertNode, bridge);
|
|
175
|
+
addSpaceAfterNode(overwriteNode, bridge);
|
|
176
|
+
bridge.visitChildren(ctx);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Format INSERT OVERWRITE DIRECTORY (with USING)
|
|
180
|
+
* Expected:
|
|
181
|
+
* INSERT OVERWRITE DIRECTORY '/path'
|
|
182
|
+
* USING PARQUET
|
|
183
|
+
* OPTIONS (...)
|
|
184
|
+
* SELECT ...
|
|
185
|
+
*/
|
|
186
|
+
formatInsertOverwriteDir(ctx, bridge) {
|
|
187
|
+
const insertNode = ctx.INSERT();
|
|
188
|
+
const overwriteNode = ctx.OVERWRITE();
|
|
189
|
+
addSpaceAfterNode(insertNode, bridge);
|
|
190
|
+
addSpaceAfterNode(overwriteNode, bridge);
|
|
191
|
+
// tableProvider (USING PARQUET) on new line with 2-space indent
|
|
192
|
+
const tableProvider = ctx.tableProvider();
|
|
193
|
+
if (tableProvider) {
|
|
194
|
+
bridge.updateAfterPreviousTokenByContext(tableProvider, bridge.newlineIndent);
|
|
195
|
+
}
|
|
196
|
+
// OPTIONS on new line with 2-space indent
|
|
197
|
+
const optionsNode = ctx.OPTIONS();
|
|
198
|
+
if (optionsNode) {
|
|
199
|
+
bridge.updateAfterPreviousTokenByNode(optionsNode, bridge.newlineIndent);
|
|
200
|
+
}
|
|
201
|
+
bridge.visitChildren(ctx);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
exports.InsertStrategy = InsertStrategy;
|
|
205
|
+
/**
|
|
206
|
+
* DELETE Statement Strategy
|
|
207
|
+
*
|
|
208
|
+
* Expected:
|
|
209
|
+
* DELETE FROM
|
|
210
|
+
* t
|
|
211
|
+
* WHERE
|
|
212
|
+
* a = 1
|
|
213
|
+
*/
|
|
214
|
+
class DeleteStrategy extends core_1.BaseFormattingStrategy {
|
|
215
|
+
constructor() {
|
|
216
|
+
super(...arguments);
|
|
217
|
+
this.id = 'dml.delete';
|
|
218
|
+
}
|
|
219
|
+
canHandle(ctx) {
|
|
220
|
+
return ctx instanceof SparkSQLParser_1.DeleteFromTableContext;
|
|
221
|
+
}
|
|
222
|
+
format(ctx, bridge) {
|
|
223
|
+
if (ctx instanceof SparkSQLParser_1.DeleteFromTableContext) {
|
|
224
|
+
this.formatDeleteFromTable(ctx, bridge);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
formatDeleteFromTable(ctx, bridge) {
|
|
228
|
+
const deleteNode = ctx.DELETE();
|
|
229
|
+
const fromNode = ctx.FROM();
|
|
230
|
+
// DELETE FROM should be on same line
|
|
231
|
+
addSpaceAfterNode(deleteNode, bridge);
|
|
232
|
+
// Table name on new line with indent after FROM
|
|
233
|
+
bridge.updateBeforeNextTokenByNode(fromNode, '\n ');
|
|
234
|
+
bridge.visitChildren(ctx);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.DeleteStrategy = DeleteStrategy;
|
|
238
|
+
/**
|
|
239
|
+
* UPDATE Statement Strategy
|
|
240
|
+
*
|
|
241
|
+
* Expected:
|
|
242
|
+
* UPDATE
|
|
243
|
+
* t
|
|
244
|
+
* SET
|
|
245
|
+
* a = 1, b = 2
|
|
246
|
+
* WHERE
|
|
247
|
+
* c = 3
|
|
248
|
+
*/
|
|
249
|
+
class UpdateStrategy extends core_1.BaseFormattingStrategy {
|
|
250
|
+
constructor() {
|
|
251
|
+
super(...arguments);
|
|
252
|
+
this.id = 'dml.update';
|
|
253
|
+
}
|
|
254
|
+
canHandle(ctx) {
|
|
255
|
+
return ctx instanceof SparkSQLParser_1.UpdateTableContext || ctx instanceof SparkSQLParser_1.SetClauseContext;
|
|
256
|
+
}
|
|
257
|
+
format(ctx, bridge) {
|
|
258
|
+
if (ctx instanceof SparkSQLParser_1.UpdateTableContext) {
|
|
259
|
+
this.formatUpdateTable(ctx, bridge);
|
|
260
|
+
}
|
|
261
|
+
else if (ctx instanceof SparkSQLParser_1.SetClauseContext) {
|
|
262
|
+
this.formatSetClause(ctx, bridge);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
formatUpdateTable(ctx, bridge) {
|
|
266
|
+
const updateNode = ctx.UPDATE();
|
|
267
|
+
// Table name should be indented on next line
|
|
268
|
+
// UPDATE\n t
|
|
269
|
+
bridge.updateBeforeNextTokenByNode(updateNode, '\n ');
|
|
270
|
+
bridge.visitChildren(ctx);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Format SET clause
|
|
274
|
+
* SET keyword on new line, each assignment on separate line with indent
|
|
275
|
+
*/
|
|
276
|
+
formatSetClause(ctx, bridge) {
|
|
277
|
+
const setNode = ctx.SET();
|
|
278
|
+
// SET on new line (no indent, same level as UPDATE)
|
|
279
|
+
bridge.updateAfterPreviousTokenByNode(setNode, '\n');
|
|
280
|
+
// Assignments on new line with indent
|
|
281
|
+
bridge.updateBeforeNextTokenByNode(setNode, '\n ');
|
|
282
|
+
// Format assignment list - each assignment on separate line
|
|
283
|
+
const assignmentList = ctx.assignmentList();
|
|
284
|
+
if (assignmentList) {
|
|
285
|
+
// First assignment already has indent from SET
|
|
286
|
+
// Format commas: each subsequent assignment on new line
|
|
287
|
+
const commas = assignmentList.COMMA();
|
|
288
|
+
for (let i = 0; i < commas.length; i++) {
|
|
289
|
+
bridge.updateAfterPreviousTokenByNode(commas[i], '');
|
|
290
|
+
bridge.updateBeforeNextTokenByNode(commas[i], '\n ');
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
bridge.visitChildren(ctx);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
exports.UpdateStrategy = UpdateStrategy;
|
|
297
|
+
/**
|
|
298
|
+
* MERGE INTO Statement Strategy
|
|
299
|
+
*
|
|
300
|
+
* Expected:
|
|
301
|
+
* MERGE INTO
|
|
302
|
+
* target t
|
|
303
|
+
* USING
|
|
304
|
+
* source s
|
|
305
|
+
* ON
|
|
306
|
+
* t.id = s.id
|
|
307
|
+
* WHEN MATCHED THEN UPDATE SET t.value = s.value
|
|
308
|
+
* WHEN NOT MATCHED THEN INSERT (id, value) VALUES (s.id, s.value)
|
|
309
|
+
*/
|
|
310
|
+
class MergeStrategy extends core_1.BaseFormattingStrategy {
|
|
311
|
+
constructor() {
|
|
312
|
+
super(...arguments);
|
|
313
|
+
this.id = 'dml.merge';
|
|
314
|
+
}
|
|
315
|
+
canHandle(ctx) {
|
|
316
|
+
return (ctx instanceof SparkSQLParser_1.MergeIntoTableContext ||
|
|
317
|
+
ctx instanceof SparkSQLParser_1.MatchedClauseContext ||
|
|
318
|
+
ctx instanceof SparkSQLParser_1.NotMatchedClauseContext ||
|
|
319
|
+
ctx instanceof SparkSQLParser_1.NotMatchedBySourceClauseContext);
|
|
320
|
+
}
|
|
321
|
+
format(ctx, bridge) {
|
|
322
|
+
if (ctx instanceof SparkSQLParser_1.MergeIntoTableContext) {
|
|
323
|
+
this.formatMergeIntoTable(ctx, bridge);
|
|
324
|
+
}
|
|
325
|
+
else if (ctx instanceof SparkSQLParser_1.MatchedClauseContext) {
|
|
326
|
+
this.formatMatchedClause(ctx, bridge);
|
|
327
|
+
}
|
|
328
|
+
else if (ctx instanceof SparkSQLParser_1.NotMatchedClauseContext) {
|
|
329
|
+
this.formatNotMatchedClause(ctx, bridge);
|
|
330
|
+
}
|
|
331
|
+
else if (ctx instanceof SparkSQLParser_1.NotMatchedBySourceClauseContext) {
|
|
332
|
+
this.formatNotMatchedBySourceClause(ctx, bridge);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
formatMergeIntoTable(ctx, bridge) {
|
|
336
|
+
const mergeNode = ctx.MERGE();
|
|
337
|
+
const intoNode = ctx.INTO();
|
|
338
|
+
const usingNode = ctx.USING();
|
|
339
|
+
const onNode = ctx.ON();
|
|
340
|
+
// Handle WITH SCHEMA EVOLUTION
|
|
341
|
+
const withNode = ctx.WITH();
|
|
342
|
+
const schemaNode = ctx.SCHEMA();
|
|
343
|
+
const evolutionNode = ctx.EVOLUTION();
|
|
344
|
+
if (withNode && schemaNode && evolutionNode) {
|
|
345
|
+
addSpaceAfterNode(mergeNode, bridge);
|
|
346
|
+
addSpaceAfterNode(withNode, bridge);
|
|
347
|
+
addSpaceAfterNode(schemaNode, bridge);
|
|
348
|
+
addSpaceAfterNode(evolutionNode, bridge);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
addSpaceAfterNode(mergeNode, bridge);
|
|
352
|
+
}
|
|
353
|
+
// MERGE INTO on same line, target table on new line with indent
|
|
354
|
+
addSpaceAfterNode(intoNode, bridge);
|
|
355
|
+
bridge.updateBeforeNextTokenByNode(intoNode, '\n ');
|
|
356
|
+
// USING on new line
|
|
357
|
+
bridge.updateAfterPreviousTokenByNode(usingNode, '\n');
|
|
358
|
+
// Source table on new line with indent
|
|
359
|
+
bridge.updateBeforeNextTokenByNode(usingNode, '\n ');
|
|
360
|
+
// ON on new line
|
|
361
|
+
bridge.updateAfterPreviousTokenByNode(onNode, '\n');
|
|
362
|
+
// ON condition on new line with indent
|
|
363
|
+
bridge.updateBeforeNextTokenByNode(onNode, '\n ');
|
|
364
|
+
// WHEN clauses on new line
|
|
365
|
+
const matchedClauses = ctx.matchedClause();
|
|
366
|
+
const notMatchedClauses = ctx.notMatchedClause();
|
|
367
|
+
const notMatchedBySourceClauses = ctx.notMatchedBySourceClause();
|
|
368
|
+
for (const clause of matchedClauses) {
|
|
369
|
+
addNewlineBeforeContext(clause, bridge);
|
|
370
|
+
}
|
|
371
|
+
for (const clause of notMatchedClauses) {
|
|
372
|
+
addNewlineBeforeContext(clause, bridge);
|
|
373
|
+
}
|
|
374
|
+
for (const clause of notMatchedBySourceClauses) {
|
|
375
|
+
addNewlineBeforeContext(clause, bridge);
|
|
376
|
+
}
|
|
377
|
+
bridge.visitChildren(ctx);
|
|
378
|
+
}
|
|
379
|
+
formatMatchedClause(ctx, bridge) {
|
|
380
|
+
const whenNode = ctx.WHEN();
|
|
381
|
+
const matchedNode = ctx.MATCHED();
|
|
382
|
+
const thenNode = ctx.THEN();
|
|
383
|
+
const andNode = ctx.AND();
|
|
384
|
+
addSpaceAfterNode(whenNode, bridge);
|
|
385
|
+
addSpaceAfterNode(matchedNode, bridge);
|
|
386
|
+
if (andNode) {
|
|
387
|
+
addSpaceAfterNode(andNode, bridge);
|
|
388
|
+
}
|
|
389
|
+
addSpaceAfterNode(thenNode, bridge);
|
|
390
|
+
bridge.visitChildren(ctx);
|
|
391
|
+
}
|
|
392
|
+
formatNotMatchedClause(ctx, bridge) {
|
|
393
|
+
const whenNode = ctx.WHEN();
|
|
394
|
+
const matchedNode = ctx.MATCHED();
|
|
395
|
+
const thenNode = ctx.THEN();
|
|
396
|
+
const andNode = ctx.AND();
|
|
397
|
+
const byNode = ctx.BY();
|
|
398
|
+
const targetNode = ctx.TARGET();
|
|
399
|
+
const notContext = ctx.errorCapturingNot();
|
|
400
|
+
addSpaceAfterNode(whenNode, bridge);
|
|
401
|
+
if (notContext) {
|
|
402
|
+
addSpaceAfterContext(notContext, bridge);
|
|
403
|
+
}
|
|
404
|
+
addSpaceAfterNode(matchedNode, bridge);
|
|
405
|
+
if (byNode && targetNode) {
|
|
406
|
+
addSpaceAfterNode(byNode, bridge);
|
|
407
|
+
addSpaceAfterNode(targetNode, bridge);
|
|
408
|
+
}
|
|
409
|
+
if (andNode) {
|
|
410
|
+
addSpaceAfterNode(andNode, bridge);
|
|
411
|
+
}
|
|
412
|
+
addSpaceAfterNode(thenNode, bridge);
|
|
413
|
+
bridge.visitChildren(ctx);
|
|
414
|
+
}
|
|
415
|
+
formatNotMatchedBySourceClause(ctx, bridge) {
|
|
416
|
+
const whenNode = ctx.WHEN();
|
|
417
|
+
const matchedNode = ctx.MATCHED();
|
|
418
|
+
const byNode = ctx.BY();
|
|
419
|
+
const sourceNode = ctx.SOURCE();
|
|
420
|
+
const thenNode = ctx.THEN();
|
|
421
|
+
const andNode = ctx.AND();
|
|
422
|
+
const notContext = ctx.errorCapturingNot();
|
|
423
|
+
addSpaceAfterNode(whenNode, bridge);
|
|
424
|
+
if (notContext) {
|
|
425
|
+
addSpaceAfterContext(notContext, bridge);
|
|
426
|
+
}
|
|
427
|
+
addSpaceAfterNode(matchedNode, bridge);
|
|
428
|
+
addSpaceAfterNode(byNode, bridge);
|
|
429
|
+
addSpaceAfterNode(sourceNode, bridge);
|
|
430
|
+
if (andNode) {
|
|
431
|
+
addSpaceAfterNode(andNode, bridge);
|
|
432
|
+
}
|
|
433
|
+
addSpaceAfterNode(thenNode, bridge);
|
|
434
|
+
bridge.visitChildren(ctx);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
exports.MergeStrategy = MergeStrategy;
|
|
438
|
+
//# sourceMappingURL=insert-update-delete.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert-update-delete.strategy.js","sourceRoot":"","sources":["../../../../src/formatter/strategies/dml/insert-update-delete.strategy.ts"],"names":[],"mappings":";;;AAYA,gEAaqC;AACrC,qCAAsE;AAEtE;;;GAGG;AACH,SAAS,2BAA2B,CAAC,IAAkB,EAAE,MAAwB;IAC/E,MAAM,CAAC,8BAA8B,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,IAAkB,EAAE,MAAwB;IACzE,MAAM,CAAC,8BAA8B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,SAAS,8BAA8B,CAAC,GAAY,EAAE,MAAwB;IAC5E,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QACrD,MAAM,CAAC,iCAAiC,CAAC,GAAU,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAAC,GAAY,EAAE,MAAwB;IACrE,IAAI,GAAG,IAAI,OAAO,GAAG,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Q,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,GAAG,CAAC,EAAE,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;QAE1B,MAAM,UAAU,GAAG,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAE3C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEpC,IAAI,UAAU,EAAE,CAAC;YACf,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;QAED,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACvC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAEtC,IAAI,OAAO,EAAE,CAAC;YACZ,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC;QAED,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEpC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;CACF;AA9JD,sCA8JC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BaseFormattingStrategy, FormattingBridge } from '../../core';
|
|
2
|
+
export declare class SelectClauseStrategy extends BaseFormattingStrategy {
|
|
3
|
+
readonly id = "dml.selectClause";
|
|
4
|
+
canHandle(ctx: unknown): boolean;
|
|
5
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
6
|
+
/**
|
|
7
|
+
* Format SELECT clause
|
|
8
|
+
* Ensure DISTINCT/ALL stays on same line as SELECT
|
|
9
|
+
*/
|
|
10
|
+
private formatSelectClause;
|
|
11
|
+
/**
|
|
12
|
+
* Format set quantifier (DISTINCT/ALL)
|
|
13
|
+
*/
|
|
14
|
+
private formatSetQuantifier;
|
|
15
|
+
/**
|
|
16
|
+
* Format named expression sequence (column list)
|
|
17
|
+
*/
|
|
18
|
+
private formatNamedExpressionSeq;
|
|
19
|
+
/**
|
|
20
|
+
* Format named expression (column with optional alias)
|
|
21
|
+
*/
|
|
22
|
+
private formatNamedExpression;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* FROM Clause Strategy
|
|
26
|
+
*/
|
|
27
|
+
export declare class FromClauseStrategy extends BaseFormattingStrategy {
|
|
28
|
+
readonly id = "dml.fromClause";
|
|
29
|
+
canHandle(ctx: unknown): boolean;
|
|
30
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
31
|
+
private formatFromClause;
|
|
32
|
+
private getPreviousToken;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* WHERE Clause Strategy
|
|
36
|
+
*/
|
|
37
|
+
export declare class WhereClauseStrategy extends BaseFormattingStrategy {
|
|
38
|
+
readonly id = "dml.whereClause";
|
|
39
|
+
canHandle(ctx: unknown): boolean;
|
|
40
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
41
|
+
private formatWhereClause;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* GROUP BY / HAVING Clause Strategy
|
|
45
|
+
*/
|
|
46
|
+
export declare class GroupByClauseStrategy extends BaseFormattingStrategy {
|
|
47
|
+
readonly id = "dml.groupBy";
|
|
48
|
+
canHandle(ctx: unknown): boolean;
|
|
49
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
50
|
+
private formatAggregationClause;
|
|
51
|
+
private formatHavingClause;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* ORDER BY / LIMIT Strategy
|
|
55
|
+
*/
|
|
56
|
+
export declare class QueryOrganizationStrategy extends BaseFormattingStrategy {
|
|
57
|
+
readonly id = "dml.queryOrganization";
|
|
58
|
+
canHandle(ctx: unknown): boolean;
|
|
59
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
60
|
+
private formatQueryOrganization;
|
|
61
|
+
private formatPipeSubqueryOrganization;
|
|
62
|
+
private formatPipeOperatorOrganization;
|
|
63
|
+
private formatSortItems;
|
|
64
|
+
private formatSortItemsFixed;
|
|
65
|
+
private formatSortItemsInternal;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Set Operations Strategy (UNION, INTERSECT, EXCEPT)
|
|
69
|
+
*/
|
|
70
|
+
export declare class SetOperationStrategy extends BaseFormattingStrategy {
|
|
71
|
+
readonly id = "dml.setOperation";
|
|
72
|
+
canHandle(ctx: unknown): boolean;
|
|
73
|
+
format(ctx: unknown, bridge: FormattingBridge): void;
|
|
74
|
+
private formatSetOperation;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=select-clause.strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-clause.strategy.d.ts","sourceRoot":"","sources":["../../../../src/formatter/strategies/dml/select-clause.strategy.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAmEtE,qBAAa,oBAAqB,SAAQ,sBAAsB;IAC9D,QAAQ,CAAC,EAAE,sBAAsB;IAEjC,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;IAShC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAYpD;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAsChC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAO9B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,sBAAsB;IAC5D,QAAQ,CAAC,EAAE,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