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.
Files changed (740) hide show
  1. package/out/sparksql-server-worker.js +1 -1
  2. package/out/sparksql-server-worker.js.map +1 -1
  3. package/out-tsc/assets/built-in-functions.d.ts +2 -0
  4. package/out-tsc/assets/built-in-functions.d.ts.map +1 -0
  5. package/out-tsc/assets/built-in-functions.js +4 -2
  6. package/out-tsc/assets/built-in-functions.js.map +1 -1
  7. package/out-tsc/completion-parser.d.ts +11 -0
  8. package/out-tsc/completion-parser.d.ts.map +1 -0
  9. package/out-tsc/completion-parser.js +148 -0
  10. package/out-tsc/completion-parser.js.map +1 -0
  11. package/out-tsc/constants.d.ts +9 -0
  12. package/out-tsc/constants.d.ts.map +1 -0
  13. package/out-tsc/constants.js +12 -0
  14. package/out-tsc/constants.js.map +1 -0
  15. package/out-tsc/cursor.d.ts +10 -0
  16. package/out-tsc/cursor.d.ts.map +1 -0
  17. package/out-tsc/cursor.js +3 -0
  18. package/out-tsc/cursor.js.map +1 -1
  19. package/out-tsc/execute-command.d.ts +7 -0
  20. package/out-tsc/execute-command.d.ts.map +1 -0
  21. package/out-tsc/execute-command.js +78 -0
  22. package/out-tsc/execute-command.js.map +1 -0
  23. package/out-tsc/execute-commands.d.ts +1 -0
  24. package/out-tsc/execute-commands.d.ts.map +1 -0
  25. package/out-tsc/execute-commands.js +3 -4
  26. package/out-tsc/execute-commands.js.map +1 -1
  27. package/out-tsc/formatter/boundary-writer.d.ts +30 -0
  28. package/out-tsc/formatter/boundary-writer.d.ts.map +1 -0
  29. package/out-tsc/formatter/boundary-writer.js +47 -0
  30. package/out-tsc/formatter/boundary-writer.js.map +1 -0
  31. package/out-tsc/formatter/core/comment-helper.d.ts +11 -0
  32. package/out-tsc/formatter/core/comment-helper.d.ts.map +1 -0
  33. package/out-tsc/formatter/core/comment-helper.js +139 -0
  34. package/out-tsc/formatter/core/comment-helper.js.map +1 -0
  35. package/out-tsc/formatter/core/edit-collector.d.ts +110 -0
  36. package/out-tsc/formatter/core/edit-collector.d.ts.map +1 -0
  37. package/out-tsc/formatter/core/edit-collector.js +159 -0
  38. package/out-tsc/formatter/core/edit-collector.js.map +1 -0
  39. package/out-tsc/formatter/core/formatting-context.d.ts +183 -0
  40. package/out-tsc/formatter/core/formatting-context.d.ts.map +1 -0
  41. package/out-tsc/formatter/core/formatting-context.js +294 -0
  42. package/out-tsc/formatter/core/formatting-context.js.map +1 -0
  43. package/out-tsc/formatter/core/index.d.ts +25 -0
  44. package/out-tsc/formatter/core/index.d.ts.map +1 -0
  45. package/out-tsc/formatter/core/index.js +57 -0
  46. package/out-tsc/formatter/core/index.js.map +1 -0
  47. package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts +116 -0
  48. package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts.map +1 -0
  49. package/out-tsc/formatter/core/pipeline/formatting-pipeline.js +237 -0
  50. package/out-tsc/formatter/core/pipeline/formatting-pipeline.js.map +1 -0
  51. package/out-tsc/formatter/core/pipeline/index.d.ts +12 -0
  52. package/out-tsc/formatter/core/pipeline/index.d.ts.map +1 -0
  53. package/out-tsc/formatter/core/pipeline/index.js +19 -0
  54. package/out-tsc/formatter/core/pipeline/index.js.map +1 -0
  55. package/out-tsc/formatter/core/pipeline/statement-separation.d.ts +5 -0
  56. package/out-tsc/formatter/core/pipeline/statement-separation.d.ts.map +1 -0
  57. package/out-tsc/formatter/core/pipeline/statement-separation.js +149 -0
  58. package/out-tsc/formatter/core/pipeline/statement-separation.js.map +1 -0
  59. package/out-tsc/formatter/core/rules/index.d.ts +11 -0
  60. package/out-tsc/formatter/core/rules/index.d.ts.map +1 -0
  61. package/out-tsc/formatter/core/rules/index.js +29 -0
  62. package/out-tsc/formatter/core/rules/index.js.map +1 -0
  63. package/out-tsc/formatter/core/rules/newline-rules.d.ts +169 -0
  64. package/out-tsc/formatter/core/rules/newline-rules.d.ts.map +1 -0
  65. package/out-tsc/formatter/core/rules/newline-rules.js +246 -0
  66. package/out-tsc/formatter/core/rules/newline-rules.js.map +1 -0
  67. package/out-tsc/formatter/core/rules/spacing-rules.d.ts +150 -0
  68. package/out-tsc/formatter/core/rules/spacing-rules.d.ts.map +1 -0
  69. package/out-tsc/formatter/core/rules/spacing-rules.js +219 -0
  70. package/out-tsc/formatter/core/rules/spacing-rules.js.map +1 -0
  71. package/out-tsc/formatter/core/strategy-bridge.d.ts +56 -0
  72. package/out-tsc/formatter/core/strategy-bridge.d.ts.map +1 -0
  73. package/out-tsc/formatter/core/strategy-bridge.js +159 -0
  74. package/out-tsc/formatter/core/strategy-bridge.js.map +1 -0
  75. package/out-tsc/formatter/core/strategy-interface.d.ts +123 -0
  76. package/out-tsc/formatter/core/strategy-interface.d.ts.map +1 -0
  77. package/out-tsc/formatter/core/strategy-interface.js +83 -0
  78. package/out-tsc/formatter/core/strategy-interface.js.map +1 -0
  79. package/out-tsc/formatter/core/token-helper.d.ts +12 -0
  80. package/out-tsc/formatter/core/token-helper.d.ts.map +1 -0
  81. package/out-tsc/formatter/core/token-helper.js +79 -0
  82. package/out-tsc/formatter/core/token-helper.js.map +1 -0
  83. package/out-tsc/formatter/core/unicode-utils.d.ts +107 -0
  84. package/out-tsc/formatter/core/unicode-utils.d.ts.map +1 -0
  85. package/out-tsc/formatter/core/unicode-utils.js +181 -0
  86. package/out-tsc/formatter/core/unicode-utils.js.map +1 -0
  87. package/out-tsc/formatter/core/whitespace-writer.d.ts +20 -0
  88. package/out-tsc/formatter/core/whitespace-writer.d.ts.map +1 -0
  89. package/out-tsc/formatter/core/whitespace-writer.js +86 -0
  90. package/out-tsc/formatter/core/whitespace-writer.js.map +1 -0
  91. package/out-tsc/formatter/formatter-adapter.d.ts +56 -0
  92. package/out-tsc/formatter/formatter-adapter.d.ts.map +1 -0
  93. package/out-tsc/formatter/formatter-adapter.js +719 -0
  94. package/out-tsc/formatter/formatter-adapter.js.map +1 -0
  95. package/out-tsc/formatter/index.d.ts +16 -0
  96. package/out-tsc/formatter/index.d.ts.map +1 -0
  97. package/out-tsc/formatter/index.js +43 -0
  98. package/out-tsc/formatter/index.js.map +1 -0
  99. package/out-tsc/formatter/pipe-step-classifier.d.ts +9 -0
  100. package/out-tsc/formatter/pipe-step-classifier.d.ts.map +1 -0
  101. package/out-tsc/formatter/pipe-step-classifier.js +49 -0
  102. package/out-tsc/formatter/pipe-step-classifier.js.map +1 -0
  103. package/out-tsc/formatter/state.d.ts +10 -0
  104. package/out-tsc/formatter/state.d.ts.map +1 -0
  105. package/out-tsc/formatter/state.js +12 -0
  106. package/out-tsc/formatter/state.js.map +1 -0
  107. package/out-tsc/formatter/strategies/block.strategy.d.ts +191 -0
  108. package/out-tsc/formatter/strategies/block.strategy.d.ts.map +1 -0
  109. package/out-tsc/formatter/strategies/block.strategy.js +238 -0
  110. package/out-tsc/formatter/strategies/block.strategy.js.map +1 -0
  111. package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts +17 -0
  112. package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts.map +1 -0
  113. package/out-tsc/formatter/strategies/clause-head-body.strategy.js +13 -0
  114. package/out-tsc/formatter/strategies/clause-head-body.strategy.js.map +1 -0
  115. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts +68 -0
  116. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts.map +1 -0
  117. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js +242 -0
  118. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js.map +1 -0
  119. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts +146 -0
  120. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts.map +1 -0
  121. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js +578 -0
  122. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js.map +1 -0
  123. package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts +103 -0
  124. package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts.map +1 -0
  125. package/out-tsc/formatter/strategies/ddl/create-table.strategy.js +659 -0
  126. package/out-tsc/formatter/strategies/ddl/create-table.strategy.js.map +1 -0
  127. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts +64 -0
  128. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts.map +1 -0
  129. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js +402 -0
  130. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js.map +1 -0
  131. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts +119 -0
  132. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts.map +1 -0
  133. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js +863 -0
  134. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js.map +1 -0
  135. package/out-tsc/formatter/strategies/ddl/index.d.ts +17 -0
  136. package/out-tsc/formatter/strategies/ddl/index.d.ts.map +1 -0
  137. package/out-tsc/formatter/strategies/ddl/index.js +57 -0
  138. package/out-tsc/formatter/strategies/ddl/index.js.map +1 -0
  139. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts +26 -0
  140. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts.map +1 -0
  141. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js +77 -0
  142. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js.map +1 -0
  143. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts +99 -0
  144. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts.map +1 -0
  145. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js +385 -0
  146. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js.map +1 -0
  147. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts +48 -0
  148. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts.map +1 -0
  149. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js +145 -0
  150. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js.map +1 -0
  151. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts +71 -0
  152. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts.map +1 -0
  153. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js +196 -0
  154. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js.map +1 -0
  155. package/out-tsc/formatter/strategies/dml/index.d.ts +10 -0
  156. package/out-tsc/formatter/strategies/dml/index.d.ts.map +1 -0
  157. package/out-tsc/formatter/strategies/dml/index.js +35 -0
  158. package/out-tsc/formatter/strategies/dml/index.js.map +1 -0
  159. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts +113 -0
  160. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts.map +1 -0
  161. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js +438 -0
  162. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js.map +1 -0
  163. package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts +76 -0
  164. package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts.map +1 -0
  165. package/out-tsc/formatter/strategies/dml/select-clause.strategy.js +480 -0
  166. package/out-tsc/formatter/strategies/dml/select-clause.strategy.js.map +1 -0
  167. package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts +50 -0
  168. package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts.map +1 -0
  169. package/out-tsc/formatter/strategies/expression/function-call.strategy.js +319 -0
  170. package/out-tsc/formatter/strategies/expression/function-call.strategy.js.map +1 -0
  171. package/out-tsc/formatter/strategies/expression/index.d.ts +18 -0
  172. package/out-tsc/formatter/strategies/expression/index.d.ts.map +1 -0
  173. package/out-tsc/formatter/strategies/expression/index.js +51 -0
  174. package/out-tsc/formatter/strategies/expression/index.js.map +1 -0
  175. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts +55 -0
  176. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts.map +1 -0
  177. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js +266 -0
  178. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js.map +1 -0
  179. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts +38 -0
  180. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts.map +1 -0
  181. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js +397 -0
  182. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js.map +1 -0
  183. package/out-tsc/formatter/strategies/function-call.strategy.d.ts +80 -0
  184. package/out-tsc/formatter/strategies/function-call.strategy.d.ts.map +1 -0
  185. package/out-tsc/formatter/strategies/function-call.strategy.js +136 -0
  186. package/out-tsc/formatter/strategies/function-call.strategy.js.map +1 -0
  187. package/out-tsc/formatter/strategies/index.d.ts +87 -0
  188. package/out-tsc/formatter/strategies/index.d.ts.map +1 -0
  189. package/out-tsc/formatter/strategies/index.js +121 -0
  190. package/out-tsc/formatter/strategies/index.js.map +1 -0
  191. package/out-tsc/formatter/strategies/join.strategy.d.ts +31 -0
  192. package/out-tsc/formatter/strategies/join.strategy.d.ts.map +1 -0
  193. package/out-tsc/formatter/strategies/join.strategy.js +29 -0
  194. package/out-tsc/formatter/strategies/join.strategy.js.map +1 -0
  195. package/out-tsc/formatter/strategies/keyword.strategy.d.ts +82 -0
  196. package/out-tsc/formatter/strategies/keyword.strategy.d.ts.map +1 -0
  197. package/out-tsc/formatter/strategies/keyword.strategy.js +129 -0
  198. package/out-tsc/formatter/strategies/keyword.strategy.js.map +1 -0
  199. package/out-tsc/formatter/strategies/list.strategy.d.ts +159 -0
  200. package/out-tsc/formatter/strategies/list.strategy.d.ts.map +1 -0
  201. package/out-tsc/formatter/strategies/list.strategy.js +193 -0
  202. package/out-tsc/formatter/strategies/list.strategy.js.map +1 -0
  203. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts +24 -0
  204. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts.map +1 -0
  205. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js +47 -0
  206. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js.map +1 -0
  207. package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts +21 -0
  208. package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts.map +1 -0
  209. package/out-tsc/formatter/strategies/pipe-drop.strategy.js +52 -0
  210. package/out-tsc/formatter/strategies/pipe-drop.strategy.js.map +1 -0
  211. package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts +21 -0
  212. package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts.map +1 -0
  213. package/out-tsc/formatter/strategies/pipe-extend.strategy.js +45 -0
  214. package/out-tsc/formatter/strategies/pipe-extend.strategy.js.map +1 -0
  215. package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts +22 -0
  216. package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts.map +1 -0
  217. package/out-tsc/formatter/strategies/pipe-join.strategy.js +42 -0
  218. package/out-tsc/formatter/strategies/pipe-join.strategy.js.map +1 -0
  219. package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts +7 -0
  220. package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts.map +1 -0
  221. package/out-tsc/formatter/strategies/pipe-pivot.strategy.js +34 -0
  222. package/out-tsc/formatter/strategies/pipe-pivot.strategy.js.map +1 -0
  223. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts +7 -0
  224. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts.map +1 -0
  225. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js +14 -0
  226. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js.map +1 -0
  227. package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts +7 -0
  228. package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts.map +1 -0
  229. package/out-tsc/formatter/strategies/pipe-sample.strategy.js +18 -0
  230. package/out-tsc/formatter/strategies/pipe-sample.strategy.js.map +1 -0
  231. package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts +22 -0
  232. package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts.map +1 -0
  233. package/out-tsc/formatter/strategies/pipe-select.strategy.js +51 -0
  234. package/out-tsc/formatter/strategies/pipe-select.strategy.js.map +1 -0
  235. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts +7 -0
  236. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts.map +1 -0
  237. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js +30 -0
  238. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js.map +1 -0
  239. package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts +21 -0
  240. package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts.map +1 -0
  241. package/out-tsc/formatter/strategies/pipe-set.strategy.js +52 -0
  242. package/out-tsc/formatter/strategies/pipe-set.strategy.js.map +1 -0
  243. package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts +25 -0
  244. package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts.map +1 -0
  245. package/out-tsc/{lib/SparkSqlParserVisitor.js → formatter/strategies/pipe-step.strategy.js} +1 -1
  246. package/out-tsc/formatter/strategies/pipe-step.strategy.js.map +1 -0
  247. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts +7 -0
  248. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts.map +1 -0
  249. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js +33 -0
  250. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js.map +1 -0
  251. package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts +21 -0
  252. package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts.map +1 -0
  253. package/out-tsc/formatter/strategies/pipe-where.strategy.js +44 -0
  254. package/out-tsc/formatter/strategies/pipe-where.strategy.js.map +1 -0
  255. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts +20 -0
  256. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts.map +1 -0
  257. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js +132 -0
  258. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js.map +1 -0
  259. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts +43 -0
  260. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts.map +1 -0
  261. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js +174 -0
  262. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js.map +1 -0
  263. package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts +23 -0
  264. package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts.map +1 -0
  265. package/out-tsc/formatter/strategies/procedure/handler.strategy.js +81 -0
  266. package/out-tsc/formatter/strategies/procedure/handler.strategy.js.map +1 -0
  267. package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts +19 -0
  268. package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts.map +1 -0
  269. package/out-tsc/formatter/strategies/procedure/if-else.strategy.js +80 -0
  270. package/out-tsc/formatter/strategies/procedure/if-else.strategy.js.map +1 -0
  271. package/out-tsc/formatter/strategies/procedure/index.d.ts +27 -0
  272. package/out-tsc/formatter/strategies/procedure/index.d.ts.map +1 -0
  273. package/out-tsc/formatter/strategies/procedure/index.js +63 -0
  274. package/out-tsc/formatter/strategies/procedure/index.js.map +1 -0
  275. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts +19 -0
  276. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts.map +1 -0
  277. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js +54 -0
  278. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js.map +1 -0
  279. package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts +71 -0
  280. package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts.map +1 -0
  281. package/out-tsc/formatter/strategies/procedure/loop.strategy.js +216 -0
  282. package/out-tsc/formatter/strategies/procedure/loop.strategy.js.map +1 -0
  283. package/out-tsc/formatter/strategy-based-formatter.d.ts +329 -0
  284. package/out-tsc/formatter/strategy-based-formatter.d.ts.map +1 -0
  285. package/out-tsc/formatter/strategy-based-formatter.js +3808 -0
  286. package/out-tsc/formatter/strategy-based-formatter.js.map +1 -0
  287. package/out-tsc/formatter/strategy-dispatcher.d.ts +24 -0
  288. package/out-tsc/formatter/strategy-dispatcher.d.ts.map +1 -0
  289. package/out-tsc/formatter/strategy-dispatcher.js +19 -0
  290. package/out-tsc/formatter/strategy-dispatcher.js.map +1 -0
  291. package/out-tsc/formatter/types.d.ts +2 -0
  292. package/out-tsc/formatter/types.d.ts.map +1 -0
  293. package/out-tsc/{lib/SparkSqlParserListener.js → formatter/types.js} +1 -1
  294. package/out-tsc/formatter/types.js.map +1 -0
  295. package/out-tsc/formatter/visitor/ddl/alter-table.d.ts +48 -0
  296. package/out-tsc/formatter/visitor/ddl/alter-table.d.ts.map +1 -0
  297. package/out-tsc/formatter/visitor/ddl/alter-table.js +133 -0
  298. package/out-tsc/formatter/visitor/ddl/alter-table.js.map +1 -0
  299. package/out-tsc/formatter/visitor/ddl/create-table.d.ts +54 -0
  300. package/out-tsc/formatter/visitor/ddl/create-table.d.ts.map +1 -0
  301. package/out-tsc/formatter/visitor/ddl/create-table.js +142 -0
  302. package/out-tsc/formatter/visitor/ddl/create-table.js.map +1 -0
  303. package/out-tsc/formatter/visitor/ddl/create-view.d.ts +27 -0
  304. package/out-tsc/formatter/visitor/ddl/create-view.d.ts.map +1 -0
  305. package/out-tsc/formatter/visitor/ddl/create-view.js +61 -0
  306. package/out-tsc/formatter/visitor/ddl/create-view.js.map +1 -0
  307. package/out-tsc/formatter/visitor/ddl/drop.d.ts +30 -0
  308. package/out-tsc/formatter/visitor/ddl/drop.d.ts.map +1 -0
  309. package/out-tsc/formatter/visitor/ddl/drop.js +69 -0
  310. package/out-tsc/formatter/visitor/ddl/drop.js.map +1 -0
  311. package/out-tsc/formatter/visitor/ddl/index.d.ts +10 -0
  312. package/out-tsc/formatter/visitor/ddl/index.d.ts.map +1 -0
  313. package/out-tsc/formatter/visitor/ddl/index.js +26 -0
  314. package/out-tsc/formatter/visitor/ddl/index.js.map +1 -0
  315. package/out-tsc/formatter/visitor/dml/delete.d.ts +26 -0
  316. package/out-tsc/formatter/visitor/dml/delete.d.ts.map +1 -0
  317. package/out-tsc/formatter/visitor/dml/delete.js +38 -0
  318. package/out-tsc/formatter/visitor/dml/delete.js.map +1 -0
  319. package/out-tsc/formatter/visitor/dml/index.d.ts +10 -0
  320. package/out-tsc/formatter/visitor/dml/index.d.ts.map +1 -0
  321. package/out-tsc/formatter/visitor/dml/index.js +26 -0
  322. package/out-tsc/formatter/visitor/dml/index.js.map +1 -0
  323. package/out-tsc/formatter/visitor/dml/insert.d.ts +42 -0
  324. package/out-tsc/formatter/visitor/dml/insert.d.ts.map +1 -0
  325. package/out-tsc/formatter/visitor/dml/insert.js +112 -0
  326. package/out-tsc/formatter/visitor/dml/insert.js.map +1 -0
  327. package/out-tsc/formatter/visitor/dml/merge.d.ts +40 -0
  328. package/out-tsc/formatter/visitor/dml/merge.d.ts.map +1 -0
  329. package/out-tsc/formatter/visitor/dml/merge.js +67 -0
  330. package/out-tsc/formatter/visitor/dml/merge.js.map +1 -0
  331. package/out-tsc/formatter/visitor/dml/update.d.ts +33 -0
  332. package/out-tsc/formatter/visitor/dml/update.d.ts.map +1 -0
  333. package/out-tsc/formatter/visitor/dml/update.js +49 -0
  334. package/out-tsc/formatter/visitor/dml/update.js.map +1 -0
  335. package/out-tsc/formatter/visitor/expression/arithmetic.d.ts +20 -0
  336. package/out-tsc/formatter/visitor/expression/arithmetic.d.ts.map +1 -0
  337. package/out-tsc/formatter/visitor/expression/arithmetic.js +44 -0
  338. package/out-tsc/formatter/visitor/expression/arithmetic.js.map +1 -0
  339. package/out-tsc/formatter/visitor/expression/case-when.d.ts +41 -0
  340. package/out-tsc/formatter/visitor/expression/case-when.d.ts.map +1 -0
  341. package/out-tsc/formatter/visitor/expression/case-when.js +94 -0
  342. package/out-tsc/formatter/visitor/expression/case-when.js.map +1 -0
  343. package/out-tsc/formatter/visitor/expression/comparison.d.ts +20 -0
  344. package/out-tsc/formatter/visitor/expression/comparison.d.ts.map +1 -0
  345. package/out-tsc/formatter/visitor/expression/comparison.js +26 -0
  346. package/out-tsc/formatter/visitor/expression/comparison.js.map +1 -0
  347. package/out-tsc/formatter/visitor/expression/function-call.d.ts +20 -0
  348. package/out-tsc/formatter/visitor/expression/function-call.d.ts.map +1 -0
  349. package/out-tsc/formatter/visitor/expression/function-call.js +33 -0
  350. package/out-tsc/formatter/visitor/expression/function-call.js.map +1 -0
  351. package/out-tsc/formatter/visitor/expression/index.d.ts +11 -0
  352. package/out-tsc/formatter/visitor/expression/index.d.ts.map +1 -0
  353. package/out-tsc/formatter/visitor/expression/index.js +27 -0
  354. package/out-tsc/formatter/visitor/expression/index.js.map +1 -0
  355. package/out-tsc/formatter/visitor/expression/logical.d.ts +26 -0
  356. package/out-tsc/formatter/visitor/expression/logical.d.ts.map +1 -0
  357. package/out-tsc/formatter/visitor/expression/logical.js +46 -0
  358. package/out-tsc/formatter/visitor/expression/logical.js.map +1 -0
  359. package/out-tsc/formatter/visitor/formatter-core.d.ts +79 -0
  360. package/out-tsc/formatter/visitor/formatter-core.d.ts.map +1 -0
  361. package/out-tsc/formatter/visitor/formatter-core.js +211 -0
  362. package/out-tsc/formatter/visitor/formatter-core.js.map +1 -0
  363. package/out-tsc/formatter/visitor/index.d.ts +21 -0
  364. package/out-tsc/formatter/visitor/index.d.ts.map +1 -0
  365. package/out-tsc/formatter/visitor/index.js +26 -0
  366. package/out-tsc/formatter/visitor/index.js.map +1 -0
  367. package/out-tsc/formatter/visitor/management/cache.d.ts +26 -0
  368. package/out-tsc/formatter/visitor/management/cache.d.ts.map +1 -0
  369. package/out-tsc/formatter/visitor/management/cache.js +58 -0
  370. package/out-tsc/formatter/visitor/management/cache.js.map +1 -0
  371. package/out-tsc/formatter/visitor/management/index.d.ts +8 -0
  372. package/out-tsc/formatter/visitor/management/index.d.ts.map +1 -0
  373. package/out-tsc/formatter/visitor/management/index.js +24 -0
  374. package/out-tsc/formatter/visitor/management/index.js.map +1 -0
  375. package/out-tsc/formatter/visitor/management/refresh.d.ts +26 -0
  376. package/out-tsc/formatter/visitor/management/refresh.d.ts.map +1 -0
  377. package/out-tsc/formatter/visitor/management/refresh.js +55 -0
  378. package/out-tsc/formatter/visitor/management/refresh.js.map +1 -0
  379. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts +31 -0
  380. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts.map +1 -0
  381. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js +46 -0
  382. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js.map +1 -0
  383. package/out-tsc/formatter/visitor/pipeline/index.d.ts +7 -0
  384. package/out-tsc/formatter/visitor/pipeline/index.d.ts.map +1 -0
  385. package/out-tsc/formatter/visitor/pipeline/index.js +23 -0
  386. package/out-tsc/formatter/visitor/pipeline/index.js.map +1 -0
  387. package/out-tsc/formatter/visitor/query/cte.d.ts +34 -0
  388. package/out-tsc/formatter/visitor/query/cte.d.ts.map +1 -0
  389. package/out-tsc/formatter/visitor/query/cte.js +54 -0
  390. package/out-tsc/formatter/visitor/query/cte.js.map +1 -0
  391. package/out-tsc/formatter/visitor/query/index.d.ts +11 -0
  392. package/out-tsc/formatter/visitor/query/index.d.ts.map +1 -0
  393. package/out-tsc/formatter/visitor/query/index.js +27 -0
  394. package/out-tsc/formatter/visitor/query/index.js.map +1 -0
  395. package/out-tsc/formatter/visitor/query/query-organization.d.ts +25 -0
  396. package/out-tsc/formatter/visitor/query/query-organization.d.ts.map +1 -0
  397. package/out-tsc/formatter/visitor/query/query-organization.js +75 -0
  398. package/out-tsc/formatter/visitor/query/query-organization.js.map +1 -0
  399. package/out-tsc/formatter/visitor/query/query.d.ts +22 -0
  400. package/out-tsc/formatter/visitor/query/query.d.ts.map +1 -0
  401. package/out-tsc/formatter/visitor/query/query.js +30 -0
  402. package/out-tsc/formatter/visitor/query/query.js.map +1 -0
  403. package/out-tsc/formatter/visitor/query/select-clause.d.ts +17 -0
  404. package/out-tsc/formatter/visitor/query/select-clause.d.ts.map +1 -0
  405. package/out-tsc/formatter/visitor/query/select-clause.js +35 -0
  406. package/out-tsc/formatter/visitor/query/select-clause.js.map +1 -0
  407. package/out-tsc/formatter/visitor/query/set-operation.d.ts +25 -0
  408. package/out-tsc/formatter/visitor/query/set-operation.d.ts.map +1 -0
  409. package/out-tsc/formatter/visitor/query/set-operation.js +52 -0
  410. package/out-tsc/formatter/visitor/query/set-operation.js.map +1 -0
  411. package/out-tsc/formatter/visitor/statements/index.d.ts +7 -0
  412. package/out-tsc/formatter/visitor/statements/index.d.ts.map +1 -0
  413. package/out-tsc/formatter/visitor/statements/index.js +23 -0
  414. package/out-tsc/formatter/visitor/statements/index.js.map +1 -0
  415. package/out-tsc/formatter/visitor/statements/program.d.ts +33 -0
  416. package/out-tsc/formatter/visitor/statements/program.d.ts.map +1 -0
  417. package/out-tsc/formatter/visitor/statements/program.js +69 -0
  418. package/out-tsc/formatter/visitor/statements/program.js.map +1 -0
  419. package/out-tsc/formatter/visitor/types/complex-types.d.ts +24 -0
  420. package/out-tsc/formatter/visitor/types/complex-types.d.ts.map +1 -0
  421. package/out-tsc/formatter/visitor/types/complex-types.js +47 -0
  422. package/out-tsc/formatter/visitor/types/complex-types.js.map +1 -0
  423. package/out-tsc/formatter/visitor/types/index.d.ts +8 -0
  424. package/out-tsc/formatter/visitor/types/index.d.ts.map +1 -0
  425. package/out-tsc/formatter/visitor/types/index.js +24 -0
  426. package/out-tsc/formatter/visitor/types/index.js.map +1 -0
  427. package/out-tsc/formatter/visitor/types/primitive-types.d.ts +22 -0
  428. package/out-tsc/formatter/visitor/types/primitive-types.d.ts.map +1 -0
  429. package/out-tsc/formatter/visitor/types/primitive-types.js +37 -0
  430. package/out-tsc/formatter/visitor/types/primitive-types.js.map +1 -0
  431. package/out-tsc/formatter/visitor/utils/context-helpers.d.ts +32 -0
  432. package/out-tsc/formatter/visitor/utils/context-helpers.d.ts.map +1 -0
  433. package/out-tsc/formatter/visitor/utils/context-helpers.js +98 -0
  434. package/out-tsc/formatter/visitor/utils/context-helpers.js.map +1 -0
  435. package/out-tsc/formatter/visitor/utils/index.d.ts +11 -0
  436. package/out-tsc/formatter/visitor/utils/index.d.ts.map +1 -0
  437. package/out-tsc/formatter/visitor/utils/index.js +45 -0
  438. package/out-tsc/formatter/visitor/utils/index.js.map +1 -0
  439. package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts +57 -0
  440. package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts.map +1 -0
  441. package/out-tsc/formatter/visitor/utils/keyword-formatting.js +87 -0
  442. package/out-tsc/formatter/visitor/utils/keyword-formatting.js.map +1 -0
  443. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts +53 -0
  444. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts.map +1 -0
  445. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js +88 -0
  446. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js.map +1 -0
  447. package/out-tsc/formatter/visitor/utils/space-compression.d.ts +55 -0
  448. package/out-tsc/formatter/visitor/utils/space-compression.d.ts.map +1 -0
  449. package/out-tsc/formatter/visitor/utils/space-compression.js +71 -0
  450. package/out-tsc/formatter/visitor/utils/space-compression.js.map +1 -0
  451. package/out-tsc/formatter/visitor/utils/token-helpers.d.ts +64 -0
  452. package/out-tsc/formatter/visitor/utils/token-helpers.d.ts.map +1 -0
  453. package/out-tsc/formatter/visitor/utils/token-helpers.js +249 -0
  454. package/out-tsc/formatter/visitor/utils/token-helpers.js.map +1 -0
  455. package/out-tsc/index.d.ts +2 -1
  456. package/out-tsc/index.d.ts.map +1 -0
  457. package/out-tsc/index.js +3 -1
  458. package/out-tsc/index.js.map +1 -1
  459. package/out-tsc/lib/SparkSQLLexer.d.ts +557 -0
  460. package/out-tsc/lib/SparkSQLLexer.d.ts.map +1 -0
  461. package/out-tsc/lib/SparkSQLLexer.js +3676 -0
  462. package/out-tsc/lib/SparkSQLLexer.js.map +1 -0
  463. package/out-tsc/lib/SparkSQLParser.d.ts +7884 -0
  464. package/out-tsc/lib/SparkSQLParser.d.ts.map +1 -0
  465. package/out-tsc/lib/SparkSQLParser.js +45848 -0
  466. package/out-tsc/lib/SparkSQLParser.js.map +1 -0
  467. package/out-tsc/lib/SparkSQLParserListener.d.ts +5855 -0
  468. package/out-tsc/lib/SparkSQLParserListener.d.ts.map +1 -0
  469. package/out-tsc/lib/SparkSQLParserListener.js +4 -0
  470. package/out-tsc/lib/SparkSQLParserListener.js.map +1 -0
  471. package/out-tsc/lib/SparkSQLParserVisitor.d.ts +3674 -0
  472. package/out-tsc/lib/SparkSQLParserVisitor.d.ts.map +1 -0
  473. package/out-tsc/lib/SparkSQLParserVisitor.js +4 -0
  474. package/out-tsc/lib/SparkSQLParserVisitor.js.map +1 -0
  475. package/out-tsc/lineage.typing.d.ts +64 -0
  476. package/out-tsc/lineage.typing.d.ts.map +1 -0
  477. package/out-tsc/lineage.typing.js +3 -0
  478. package/out-tsc/lineage.typing.js.map +1 -0
  479. package/out-tsc/listeners/parse-error.listener.d.ts +3 -2
  480. package/out-tsc/listeners/parse-error.listener.d.ts.map +1 -0
  481. package/out-tsc/listeners/parse-error.listener.js +4 -4
  482. package/out-tsc/listeners/parse-error.listener.js.map +1 -1
  483. package/out-tsc/listeners/schema.listener.d.ts +32 -39
  484. package/out-tsc/listeners/schema.listener.d.ts.map +1 -0
  485. package/out-tsc/listeners/schema.listener.js +58 -100
  486. package/out-tsc/listeners/schema.listener.js.map +1 -1
  487. package/out-tsc/listeners/statement.listener.d.ts +263 -5
  488. package/out-tsc/listeners/statement.listener.d.ts.map +1 -0
  489. package/out-tsc/listeners/statement.listener.js +836 -11
  490. package/out-tsc/listeners/statement.listener.js.map +1 -1
  491. package/out-tsc/listeners/structure.listener.d.ts +70 -0
  492. package/out-tsc/listeners/structure.listener.d.ts.map +1 -0
  493. package/out-tsc/listeners/structure.listener.js +211 -0
  494. package/out-tsc/listeners/structure.listener.js.map +1 -0
  495. package/out-tsc/listeners/tokens-collector.listener.d.ts +27 -0
  496. package/out-tsc/listeners/tokens-collector.listener.d.ts.map +1 -0
  497. package/out-tsc/listeners/tokens-collector.listener.js +102 -0
  498. package/out-tsc/listeners/tokens-collector.listener.js.map +1 -0
  499. package/out-tsc/lsp-server.d.ts +79 -8
  500. package/out-tsc/lsp-server.d.ts.map +1 -0
  501. package/out-tsc/lsp-server.js +672 -237
  502. package/out-tsc/lsp-server.js.map +1 -1
  503. package/out-tsc/metadata.typing.d.ts +1 -0
  504. package/out-tsc/metadata.typing.d.ts.map +1 -0
  505. package/out-tsc/monaco-config.d.ts +219 -0
  506. package/out-tsc/monaco-config.d.ts.map +1 -0
  507. package/out-tsc/monaco-config.js +1032 -0
  508. package/out-tsc/monaco-config.js.map +1 -0
  509. package/out-tsc/parsing-warehouse.d.ts +8 -3
  510. package/out-tsc/parsing-warehouse.d.ts.map +1 -0
  511. package/out-tsc/parsing-warehouse.js +62 -6
  512. package/out-tsc/parsing-warehouse.js.map +1 -1
  513. package/out-tsc/protocol-translation.d.ts +12 -5
  514. package/out-tsc/protocol-translation.d.ts.map +1 -0
  515. package/out-tsc/protocol-translation.js +72 -19
  516. package/out-tsc/protocol-translation.js.map +1 -1
  517. package/out-tsc/public-apis.d.ts +1 -0
  518. package/out-tsc/public-apis.d.ts.map +1 -0
  519. package/out-tsc/schema-registry.d.ts +10 -7
  520. package/out-tsc/schema-registry.d.ts.map +1 -0
  521. package/out-tsc/schema-registry.js +87 -106
  522. package/out-tsc/schema-registry.js.map +1 -1
  523. package/out-tsc/server-worker.d.ts +1 -0
  524. package/out-tsc/server-worker.d.ts.map +1 -0
  525. package/out-tsc/server-worker.js +159 -44
  526. package/out-tsc/server-worker.js.map +1 -1
  527. package/out-tsc/tests/folding/block-comment-folding.test.d.ts +7 -0
  528. package/out-tsc/tests/folding/block-comment-folding.test.d.ts.map +1 -0
  529. package/out-tsc/tests/folding/block-comment-folding.test.js +268 -0
  530. package/out-tsc/tests/folding/block-comment-folding.test.js.map +1 -0
  531. package/out-tsc/tests/folding/caching.test.d.ts +11 -0
  532. package/out-tsc/tests/folding/caching.test.d.ts.map +1 -0
  533. package/out-tsc/tests/folding/caching.test.js +141 -0
  534. package/out-tsc/tests/folding/caching.test.js.map +1 -0
  535. package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts +15 -0
  536. package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts.map +1 -0
  537. package/out-tsc/tests/folding/cte-dependency-chain.test.js +323 -0
  538. package/out-tsc/tests/folding/cte-dependency-chain.test.js.map +1 -0
  539. package/out-tsc/tests/folding/debug-format-flow.test.d.ts +2 -0
  540. package/out-tsc/tests/folding/debug-format-flow.test.d.ts.map +1 -0
  541. package/out-tsc/tests/folding/debug-format-flow.test.js +114 -0
  542. package/out-tsc/tests/folding/debug-format-flow.test.js.map +1 -0
  543. package/out-tsc/tests/folding/debug-formatted.test.d.ts +2 -0
  544. package/out-tsc/tests/folding/debug-formatted.test.d.ts.map +1 -0
  545. package/out-tsc/tests/folding/debug-formatted.test.js +175 -0
  546. package/out-tsc/tests/folding/debug-formatted.test.js.map +1 -0
  547. package/out-tsc/tests/folding/deduplication.test.d.ts +10 -0
  548. package/out-tsc/tests/folding/deduplication.test.d.ts.map +1 -0
  549. package/out-tsc/tests/folding/deduplication.test.js +206 -0
  550. package/out-tsc/tests/folding/deduplication.test.js.map +1 -0
  551. package/out-tsc/tests/folding/edge-cases.test.d.ts +8 -0
  552. package/out-tsc/tests/folding/edge-cases.test.d.ts.map +1 -0
  553. package/out-tsc/tests/folding/edge-cases.test.js +319 -0
  554. package/out-tsc/tests/folding/edge-cases.test.js.map +1 -0
  555. package/out-tsc/tests/folding/folding-level-config.test.d.ts +11 -0
  556. package/out-tsc/tests/folding/folding-level-config.test.d.ts.map +1 -0
  557. package/out-tsc/tests/folding/folding-level-config.test.js +313 -0
  558. package/out-tsc/tests/folding/folding-level-config.test.js.map +1 -0
  559. package/out-tsc/tests/folding/folding-statistics.test.d.ts +13 -0
  560. package/out-tsc/tests/folding/folding-statistics.test.d.ts.map +1 -0
  561. package/out-tsc/tests/folding/folding-statistics.test.js +144 -0
  562. package/out-tsc/tests/folding/folding-statistics.test.js.map +1 -0
  563. package/out-tsc/tests/folding/index.d.ts +8 -0
  564. package/out-tsc/tests/folding/index.d.ts.map +1 -0
  565. package/out-tsc/tests/folding/index.js +24 -0
  566. package/out-tsc/tests/folding/index.js.map +1 -0
  567. package/out-tsc/tests/folding/join-folding.test.d.ts +11 -0
  568. package/out-tsc/tests/folding/join-folding.test.d.ts.map +1 -0
  569. package/out-tsc/tests/folding/join-folding.test.js +167 -0
  570. package/out-tsc/tests/folding/join-folding.test.js.map +1 -0
  571. package/out-tsc/tests/folding/kind-classification.test.d.ts +11 -0
  572. package/out-tsc/tests/folding/kind-classification.test.d.ts.map +1 -0
  573. package/out-tsc/tests/folding/kind-classification.test.js +270 -0
  574. package/out-tsc/tests/folding/kind-classification.test.js.map +1 -0
  575. package/out-tsc/tests/folding/level1-statement.test.d.ts +8 -0
  576. package/out-tsc/tests/folding/level1-statement.test.d.ts.map +1 -0
  577. package/out-tsc/tests/folding/level1-statement.test.js +278 -0
  578. package/out-tsc/tests/folding/level1-statement.test.js.map +1 -0
  579. package/out-tsc/tests/folding/level2-query-block.test.d.ts +8 -0
  580. package/out-tsc/tests/folding/level2-query-block.test.d.ts.map +1 -0
  581. package/out-tsc/tests/folding/level2-query-block.test.js +374 -0
  582. package/out-tsc/tests/folding/level2-query-block.test.js.map +1 -0
  583. package/out-tsc/tests/folding/level3-expression.test.d.ts +8 -0
  584. package/out-tsc/tests/folding/level3-expression.test.d.ts.map +1 -0
  585. package/out-tsc/tests/folding/level3-expression.test.js +361 -0
  586. package/out-tsc/tests/folding/level3-expression.test.js.map +1 -0
  587. package/out-tsc/tests/folding/level4-structure.test.d.ts +8 -0
  588. package/out-tsc/tests/folding/level4-structure.test.d.ts.map +1 -0
  589. package/out-tsc/tests/folding/level4-structure.test.js +270 -0
  590. package/out-tsc/tests/folding/level4-structure.test.js.map +1 -0
  591. package/out-tsc/tests/folding/line-comment-folding.test.d.ts +13 -0
  592. package/out-tsc/tests/folding/line-comment-folding.test.d.ts.map +1 -0
  593. package/out-tsc/tests/folding/line-comment-folding.test.js +215 -0
  594. package/out-tsc/tests/folding/line-comment-folding.test.js.map +1 -0
  595. package/out-tsc/tests/folding/nested-folding.test.d.ts +8 -0
  596. package/out-tsc/tests/folding/nested-folding.test.d.ts.map +1 -0
  597. package/out-tsc/tests/folding/nested-folding.test.js +386 -0
  598. package/out-tsc/tests/folding/nested-folding.test.js.map +1 -0
  599. package/out-tsc/tests/folding/performance-benchmark.test.d.ts +11 -0
  600. package/out-tsc/tests/folding/performance-benchmark.test.d.ts.map +1 -0
  601. package/out-tsc/tests/folding/performance-benchmark.test.js +256 -0
  602. package/out-tsc/tests/folding/performance-benchmark.test.js.map +1 -0
  603. package/out-tsc/tests/folding/region-marker-folding.test.d.ts +11 -0
  604. package/out-tsc/tests/folding/region-marker-folding.test.d.ts.map +1 -0
  605. package/out-tsc/tests/folding/region-marker-folding.test.js +245 -0
  606. package/out-tsc/tests/folding/region-marker-folding.test.js.map +1 -0
  607. package/out-tsc/tests/folding/select-columns-folding.test.d.ts +10 -0
  608. package/out-tsc/tests/folding/select-columns-folding.test.d.ts.map +1 -0
  609. package/out-tsc/tests/folding/select-columns-folding.test.js +139 -0
  610. package/out-tsc/tests/folding/select-columns-folding.test.js.map +1 -0
  611. package/out-tsc/tests/folding/test-utils.d.ts +73 -0
  612. package/out-tsc/tests/folding/test-utils.d.ts.map +1 -0
  613. package/out-tsc/tests/folding/test-utils.js +98 -0
  614. package/out-tsc/tests/folding/test-utils.js.map +1 -0
  615. package/out-tsc/tests/folding/values-folding.test.d.ts +10 -0
  616. package/out-tsc/tests/folding/values-folding.test.d.ts.map +1 -0
  617. package/out-tsc/tests/folding/values-folding.test.js +102 -0
  618. package/out-tsc/tests/folding/values-folding.test.js.map +1 -0
  619. package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts +5 -0
  620. package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts.map +1 -0
  621. package/out-tsc/tests/format/ddl/datatype-constraint.test.js +132 -0
  622. package/out-tsc/tests/format/ddl/datatype-constraint.test.js.map +1 -0
  623. package/out-tsc/tests/format/ddl/index.test.d.ts +5 -0
  624. package/out-tsc/tests/format/ddl/index.test.d.ts.map +1 -0
  625. package/out-tsc/tests/format/ddl/index.test.js +74 -0
  626. package/out-tsc/tests/format/ddl/index.test.js.map +1 -0
  627. package/out-tsc/tests/format/ddl/materialized-view.test.d.ts +5 -0
  628. package/out-tsc/tests/format/ddl/materialized-view.test.d.ts.map +1 -0
  629. package/out-tsc/tests/format/ddl/materialized-view.test.js +92 -0
  630. package/out-tsc/tests/format/ddl/materialized-view.test.js.map +1 -0
  631. package/out-tsc/tests/format/ddl/partition.test.d.ts +5 -0
  632. package/out-tsc/tests/format/ddl/partition.test.d.ts.map +1 -0
  633. package/out-tsc/tests/format/ddl/partition.test.js +109 -0
  634. package/out-tsc/tests/format/ddl/partition.test.js.map +1 -0
  635. package/out-tsc/tests/format/ddl/variable.test.d.ts +5 -0
  636. package/out-tsc/tests/format/ddl/variable.test.d.ts.map +1 -0
  637. package/out-tsc/tests/format/ddl/variable.test.js +58 -0
  638. package/out-tsc/tests/format/ddl/variable.test.js.map +1 -0
  639. package/out-tsc/tests/format/dml/select.test.d.ts +5 -0
  640. package/out-tsc/tests/format/dml/select.test.d.ts.map +1 -0
  641. package/out-tsc/tests/format/dml/select.test.js +114 -0
  642. package/out-tsc/tests/format/dml/select.test.js.map +1 -0
  643. package/out-tsc/tests/format/dml/subquery.test.d.ts +5 -0
  644. package/out-tsc/tests/format/dml/subquery.test.d.ts.map +1 -0
  645. package/out-tsc/tests/format/dml/subquery.test.js +221 -0
  646. package/out-tsc/tests/format/dml/subquery.test.js.map +1 -0
  647. package/out-tsc/tests/format/dql/comment.test.d.ts +7 -0
  648. package/out-tsc/tests/format/dql/comment.test.d.ts.map +1 -0
  649. package/out-tsc/tests/format/dql/comment.test.js +279 -0
  650. package/out-tsc/tests/format/dql/comment.test.js.map +1 -0
  651. package/out-tsc/tests/format/dql/cte.test.d.ts +7 -0
  652. package/out-tsc/tests/format/dql/cte.test.d.ts.map +1 -0
  653. package/out-tsc/tests/format/dql/cte.test.js +31 -0
  654. package/out-tsc/tests/format/dql/cte.test.js.map +1 -0
  655. package/out-tsc/tests/format/dql/dql-detail.test.d.ts +5 -0
  656. package/out-tsc/tests/format/dql/dql-detail.test.d.ts.map +1 -0
  657. package/out-tsc/tests/format/dql/dql-detail.test.js +191 -0
  658. package/out-tsc/tests/format/dql/dql-detail.test.js.map +1 -0
  659. package/out-tsc/tests/format/dql/lateral-view.test.d.ts +7 -0
  660. package/out-tsc/tests/format/dql/lateral-view.test.d.ts.map +1 -0
  661. package/out-tsc/tests/format/dql/lateral-view.test.js +34 -0
  662. package/out-tsc/tests/format/dql/lateral-view.test.js.map +1 -0
  663. package/out-tsc/tests/format/dql/pivot.test.d.ts +7 -0
  664. package/out-tsc/tests/format/dql/pivot.test.d.ts.map +1 -0
  665. package/out-tsc/tests/format/dql/pivot.test.js +56 -0
  666. package/out-tsc/tests/format/dql/pivot.test.js.map +1 -0
  667. package/out-tsc/tests/format/dql/window.test.d.ts +7 -0
  668. package/out-tsc/tests/format/dql/window.test.d.ts.map +1 -0
  669. package/out-tsc/tests/format/dql/window.test.js +89 -0
  670. package/out-tsc/tests/format/dql/window.test.js.map +1 -0
  671. package/out-tsc/tests/format/expression/expression.test.d.ts +5 -0
  672. package/out-tsc/tests/format/expression/expression.test.d.ts.map +1 -0
  673. package/out-tsc/tests/format/expression/expression.test.js +203 -0
  674. package/out-tsc/tests/format/expression/expression.test.js.map +1 -0
  675. package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts +5 -0
  676. package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts.map +1 -0
  677. package/out-tsc/tests/format/pipe/pipe-operator.test.js +290 -0
  678. package/out-tsc/tests/format/pipe/pipe-operator.test.js.map +1 -0
  679. package/out-tsc/tests/format/procedure/compound-statement.test.d.ts +16 -0
  680. package/out-tsc/tests/format/procedure/compound-statement.test.d.ts.map +1 -0
  681. package/out-tsc/tests/format/procedure/compound-statement.test.js +254 -0
  682. package/out-tsc/tests/format/procedure/compound-statement.test.js.map +1 -0
  683. package/out-tsc/tests/format/resource/resource.test.d.ts +5 -0
  684. package/out-tsc/tests/format/resource/resource.test.d.ts.map +1 -0
  685. package/out-tsc/tests/format/resource/resource.test.js +69 -0
  686. package/out-tsc/tests/format/resource/resource.test.js.map +1 -0
  687. package/out-tsc/tests/format/test-utils.d.ts +40 -0
  688. package/out-tsc/tests/format/test-utils.d.ts.map +1 -0
  689. package/out-tsc/tests/format/test-utils.js +53 -0
  690. package/out-tsc/tests/format/test-utils.js.map +1 -0
  691. package/out-tsc/tests/lsp-server.test.d.ts +2 -0
  692. package/out-tsc/tests/lsp-server.test.d.ts.map +1 -0
  693. package/out-tsc/tests/lsp-server.test.js +1525 -0
  694. package/out-tsc/tests/lsp-server.test.js.map +1 -0
  695. package/out-tsc/tests/spark-sql-inputs.test.d.ts +17 -0
  696. package/out-tsc/tests/spark-sql-inputs.test.d.ts.map +1 -0
  697. package/out-tsc/tests/spark-sql-inputs.test.js +570 -0
  698. package/out-tsc/tests/spark-sql-inputs.test.js.map +1 -0
  699. package/out-tsc/tests/validation.test.d.ts +2 -0
  700. package/out-tsc/tests/validation.test.d.ts.map +1 -0
  701. package/out-tsc/tests/validation.test.js +115 -0
  702. package/out-tsc/tests/validation.test.js.map +1 -0
  703. package/out-tsc/typings.d.ts +115 -1
  704. package/out-tsc/typings.d.ts.map +1 -0
  705. package/out-tsc/typings.js +28 -0
  706. package/out-tsc/typings.js.map +1 -1
  707. package/out-tsc/utils.d.ts +1 -0
  708. package/out-tsc/utils.d.ts.map +1 -0
  709. package/out-tsc/utils.js +4 -5
  710. package/out-tsc/utils.js.map +1 -1
  711. package/out-tsc/visitors/completion.visitor.d.ts +85 -0
  712. package/out-tsc/visitors/completion.visitor.d.ts.map +1 -0
  713. package/out-tsc/visitors/completion.visitor.js +379 -0
  714. package/out-tsc/visitors/completion.visitor.js.map +1 -0
  715. package/out-tsc/visitors/lineage.visitor.d.ts +34 -0
  716. package/out-tsc/visitors/lineage.visitor.d.ts.map +1 -0
  717. package/out-tsc/visitors/lineage.visitor.js +181 -0
  718. package/out-tsc/visitors/lineage.visitor.js.map +1 -0
  719. package/out-tsc/visitors/space-replacer-format.visitor.d.ts +1641 -0
  720. package/out-tsc/visitors/space-replacer-format.visitor.d.ts.map +1 -0
  721. package/out-tsc/visitors/space-replacer-format.visitor.js +7529 -0
  722. package/out-tsc/visitors/space-replacer-format.visitor.js.map +1 -0
  723. package/out-tsc/visitors/sparksql-relation.visitor.d.ts +154 -0
  724. package/out-tsc/visitors/sparksql-relation.visitor.d.ts.map +1 -0
  725. package/out-tsc/visitors/sparksql-relation.visitor.js +749 -0
  726. package/out-tsc/visitors/sparksql-relation.visitor.js.map +1 -0
  727. package/package.json +36 -9
  728. package/out-tsc/constant.d.ts +0 -3
  729. package/out-tsc/constant.js +0 -7
  730. package/out-tsc/constant.js.map +0 -1
  731. package/out-tsc/lib/SparkSqlLexer.d.ts +0 -421
  732. package/out-tsc/lib/SparkSqlLexer.js +0 -2750
  733. package/out-tsc/lib/SparkSqlLexer.js.map +0 -1
  734. package/out-tsc/lib/SparkSqlParser.d.ts +0 -6203
  735. package/out-tsc/lib/SparkSqlParser.js +0 -34733
  736. package/out-tsc/lib/SparkSqlParser.js.map +0 -1
  737. package/out-tsc/lib/SparkSqlParserListener.d.ts +0 -1158
  738. package/out-tsc/lib/SparkSqlParserListener.js.map +0 -1
  739. package/out-tsc/lib/SparkSqlParserVisitor.d.ts +0 -773
  740. 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,KAAK,QAAQ,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QACrD,MAAM,CAAC,iCAAiC,CAAC,GAAU,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,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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,E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