spark-sql-language-server 0.0.1-beta.5 → 0.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 -6200
  735. package/out-tsc/lib/SparkSqlParser.js +0 -34707
  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,379 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompletionVisitor = void 0;
4
+ const sparksql_relation_visitor_1 = require("./sparksql-relation.visitor");
5
+ const cursor_1 = require("../cursor");
6
+ const SparkSQLParser_1 = require("../lib/SparkSQLParser");
7
+ const utils_1 = require("../utils");
8
+ const getRelationName = (relationPrimaryString) => {
9
+ const splits = relationPrimaryString.split(sparksql_relation_visitor_1.RELATION_SEPARATOR);
10
+ return splits[splits.length - 1];
11
+ };
12
+ function availableColumns(relation) {
13
+ const columns = [];
14
+ if (relation instanceof sparksql_relation_visitor_1.QueryRelation) {
15
+ relation.relations.forEach((rel, name) => {
16
+ const relationName = name !== rel.id ? name : undefined;
17
+ rel.columns.forEach(col => {
18
+ if (col.label !== sparksql_relation_visitor_1.STAR_LABEL && !col.label.includes(cursor_1.defaultCursorPlaceholder)) {
19
+ columns.push({
20
+ relation: relationName !== undefined ? { category: 'table', label: relationName } : undefined,
21
+ name: col.label,
22
+ desc: col.data !== undefined ? col.data : undefined
23
+ });
24
+ }
25
+ });
26
+ });
27
+ }
28
+ else {
29
+ if (relation.sinkTableRelation !== undefined) {
30
+ relation.sinkTableRelation.columns.forEach(col => {
31
+ if (col.label !== sparksql_relation_visitor_1.STAR_LABEL && !col.label.includes(cursor_1.defaultCursorPlaceholder)) {
32
+ columns.push({
33
+ relation: { category: 'table', label: relation.sinkTableRelation.tablePrimary.relationName },
34
+ name: col.label,
35
+ desc: col.data !== undefined ? col.data : undefined
36
+ });
37
+ }
38
+ });
39
+ }
40
+ }
41
+ return columns;
42
+ }
43
+ function getTableMetadataFnFactory(getColumns) {
44
+ return (relationPrimary) => {
45
+ if (relationPrimary.type !== 'table') {
46
+ return undefined;
47
+ }
48
+ const columns = getColumns({
49
+ table: relationPrimary.relationName,
50
+ catalog: relationPrimary.catalogName,
51
+ database: relationPrimary.databaseName
52
+ });
53
+ return {
54
+ columns: columns.map(c => {
55
+ return {
56
+ id: `${(0, sparksql_relation_visitor_1.relationPrimaryToString)(relationPrimary)}_${c.label}`,
57
+ label: c.label,
58
+ data: c
59
+ };
60
+ })
61
+ };
62
+ };
63
+ }
64
+ const SQL_SNIPPETS = [
65
+ {
66
+ label: 'CREATE TABLE ?',
67
+ filterText: 'CREATE',
68
+ template: `CREATE TABLE \${1:table_name}
69
+ (
70
+ \${2:column_name} \${3:column_type}
71
+ )
72
+ USING \${4:parquet}
73
+ ;`
74
+ },
75
+ {
76
+ label: 'CREATE VIEW ?',
77
+ filterText: 'CREATE',
78
+ template: `CREATE VIEW \${1:view_name}
79
+ AS SELECT \${2:columns} FROM \${3:table_name}
80
+ ;`
81
+ },
82
+ {
83
+ label: 'INSERT INTO ?',
84
+ filterText: 'INSERT',
85
+ template: `INSERT INTO \${1:table_name}
86
+ SELECT \${2:columns} FROM \${3:source_table}
87
+ ;`
88
+ },
89
+ {
90
+ label: 'SELECT ? FROM ?',
91
+ filterText: 'SELECT',
92
+ template: `SELECT \${1:columns} FROM \${2:table_name}`
93
+ }
94
+ ];
95
+ /**
96
+ * An Antlr4ts visitor which builds beyond the query contextual analysis. It also
97
+ * captures contexts of any TEMPORARY VIEW/TABLE DDL statements if exists.
98
+ */
99
+ class CompletionVisitor extends sparksql_relation_visitor_1.SparkSQLRelationVisitor {
100
+ constructor(cursor, getColumns) {
101
+ super(getColumns && getTableMetadataFnFactory(getColumns));
102
+ this.cursor = cursor;
103
+ this.getColumns = getColumns;
104
+ this.hasCompletions = false;
105
+ this.completions = { type: 'other', snippets: [] };
106
+ }
107
+ defaultResult() {
108
+ return;
109
+ }
110
+ aggregateResult() {
111
+ return;
112
+ }
113
+ onColumnReference() {
114
+ return;
115
+ }
116
+ updateQueryCompletionItems(relation) {
117
+ // Is this the innermost query with the cursor inside
118
+ if (!this.hasCompletions && this.caretScope !== undefined) {
119
+ this.hasCompletions = true;
120
+ switch (this.caretScope.type) {
121
+ case 'select-column':
122
+ case 'spec-column': {
123
+ const columns = availableColumns(relation);
124
+ // unique relations to avoid duplicated tables
125
+ const relationMap = new Map();
126
+ columns.forEach(c => {
127
+ if (c.relation) {
128
+ const key = `${c.relation.category}:${c.relation.label}`;
129
+ if (!relationMap.has(key)) {
130
+ relationMap.set(key, c.relation);
131
+ }
132
+ }
133
+ });
134
+ const uniqueRelations = [...relationMap.values()];
135
+ this.completions = {
136
+ type: 'column',
137
+ columns,
138
+ relations: uniqueRelations,
139
+ snippets: this.completions.snippets
140
+ };
141
+ break;
142
+ }
143
+ case 'scoped-column': {
144
+ let newCompletions = [];
145
+ const relationName = this.caretScope.relation;
146
+ const relationFound = this.relationDDLColumns.get(relationName);
147
+ if (relationFound) {
148
+ newCompletions = relationFound.map(c => ({
149
+ relation: { category: 'table', label: getRelationName(relationName) },
150
+ name: c.label
151
+ }));
152
+ }
153
+ else {
154
+ const cteFound = relation.findCTE(getRelationName(relationName));
155
+ if (cteFound) {
156
+ newCompletions = cteFound.columns.map(c => ({
157
+ relation: { category: 'CTE', label: getRelationName(relationName) },
158
+ name: c.label
159
+ }));
160
+ }
161
+ else {
162
+ newCompletions =
163
+ relation
164
+ .findLocalRelation(relationName)
165
+ ?.columns.filter(c => c.label !== sparksql_relation_visitor_1.STAR_LABEL && !c.label.includes(cursor_1.defaultCursorPlaceholder))
166
+ .map(c => ({
167
+ relation: { category: 'table', label: getRelationName(relationName) },
168
+ name: c.label
169
+ })) ?? [];
170
+ }
171
+ }
172
+ this.completions = {
173
+ type: 'column',
174
+ relations: [], // no need to suggest relation if already scoped
175
+ columns: newCompletions,
176
+ snippets: this.completions.snippets
177
+ };
178
+ break;
179
+ }
180
+ case 'relation': {
181
+ const ctes = relation.getCTENames().map(label => ({
182
+ label,
183
+ category: 'CTE'
184
+ }));
185
+ const tableDDLNames = [...this.tableDDLs.keys()].map(label => ({
186
+ label: getRelationName(label),
187
+ category: 'table'
188
+ }));
189
+ const viewDDLNames = [...this.viewDDLs.keys()].map(label => ({
190
+ label: getRelationName(label),
191
+ category: 'view'
192
+ }));
193
+ // 对 ctes / tableDDLNames / viewDDLNames 统一按 category+label 去重
194
+ const relationMap = new Map();
195
+ [...ctes, ...tableDDLNames, ...viewDDLNames].forEach(r => {
196
+ const key = `${r.category}:${r.label}`;
197
+ if (!relationMap.has(key)) {
198
+ relationMap.set(key, r);
199
+ }
200
+ });
201
+ const uniqueRelations = [...relationMap.values()];
202
+ this.completions = {
203
+ type: 'relation',
204
+ relations: uniqueRelations,
205
+ snippets: this.completions.snippets,
206
+ incompleteReference: this.caretScope.prefix.length > 0 ? this.caretScope.prefix : undefined
207
+ };
208
+ break;
209
+ }
210
+ default:
211
+ break;
212
+ }
213
+ }
214
+ }
215
+ handleRelationContext(ctx) {
216
+ let multipartRelationName;
217
+ if (ctx instanceof SparkSQLParser_1.IdentifierReferenceContext) {
218
+ const multipartId = ctx.multipartIdentifier();
219
+ if (!multipartId)
220
+ return;
221
+ multipartRelationName = multipartId.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
222
+ }
223
+ else {
224
+ multipartRelationName = ctx.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
225
+ }
226
+ const lastPart = multipartRelationName[multipartRelationName.length - 1];
227
+ const category = 'table';
228
+ this.relationInStatementContext = this.relationPrimaryFromMultipart(multipartRelationName, category);
229
+ if (!this.hasCompletions && this.cursor.isIn(lastPart)) {
230
+ this.hasCompletions = true;
231
+ this.caretScope = { type: 'relation', prefix: multipartRelationName.slice(0, -1) };
232
+ this.completions = {
233
+ type: 'relation',
234
+ relations: [...this.tableDDLs.keys()].map(label => ({
235
+ label: getRelationName(label),
236
+ category
237
+ })),
238
+ snippets: this.completions.snippets,
239
+ incompleteReference: this.caretScope.prefix.length > 0 ? this.caretScope.prefix : undefined
240
+ };
241
+ }
242
+ }
243
+ handleScopedColumn() {
244
+ if (!this.hasCompletions && this.relationInStatementContext) {
245
+ this.hasCompletions = true;
246
+ this.caretScope = {
247
+ type: 'scoped-column',
248
+ relation: (0, sparksql_relation_visitor_1.relationPrimaryToString)(this.relationInStatementContext)
249
+ };
250
+ let newCompletions = [];
251
+ const relationName = this.relationInStatementContext.relationName;
252
+ const relationDDL = this.relationDDLColumns.get(relationName);
253
+ if (relationDDL) {
254
+ newCompletions = relationDDL.map(c => ({
255
+ relation: { category: 'table', label: relationName },
256
+ name: c.label
257
+ }));
258
+ }
259
+ else if (this.getColumns) {
260
+ newCompletions = this.getColumns({
261
+ catalog: this.relationInStatementContext.catalogName,
262
+ database: this.relationInStatementContext.databaseName,
263
+ table: this.relationInStatementContext.relationName
264
+ }).map(c => ({
265
+ relation: { category: 'table', label: relationName },
266
+ name: c.label
267
+ }));
268
+ }
269
+ this.completions = {
270
+ type: 'column',
271
+ relations: [], // no need to suggest relation if already scoped
272
+ columns: newCompletions,
273
+ snippets: this.completions.snippets
274
+ };
275
+ }
276
+ }
277
+ handleDatabaseContext(ctx) {
278
+ const multipartDatabaseName = ctx.errorCapturingIdentifier().map(t => (0, utils_1.sanitizeText)(t.text));
279
+ const lastPart = multipartDatabaseName[multipartDatabaseName.length - 1];
280
+ if (this.cursor.isIn(lastPart)) {
281
+ this.hasCompletions = true;
282
+ const incompleteReference = multipartDatabaseName.length > 1 ? multipartDatabaseName[0] : undefined;
283
+ this.completions = { type: 'database', incompleteReference, snippets: [] };
284
+ }
285
+ }
286
+ getSuggestions() {
287
+ return this.completions;
288
+ }
289
+ onRelation(relation) {
290
+ if (relation instanceof sparksql_relation_visitor_1.TableRelation || relation instanceof sparksql_relation_visitor_1.InsertRelation || relation instanceof sparksql_relation_visitor_1.ViewRelation) {
291
+ return;
292
+ }
293
+ this.updateQueryCompletionItems(relation);
294
+ }
295
+ visitErrorNode(node) {
296
+ super.visitErrorNode(node);
297
+ if (this.cursor.isIn(node.text)) {
298
+ if (node.parent instanceof SparkSQLParser_1.StatementContext || node.parent instanceof SparkSQLParser_1.ProgramContext) {
299
+ this.completions.snippets.push(...SQL_SNIPPETS.filter(s => s.filterText.toUpperCase().indexOf(this.cursor.revert(node.text).toUpperCase()) === 0) // must match snippet's filterText from the beginning
300
+ );
301
+ this.caretScope = { type: 'other' };
302
+ }
303
+ }
304
+ }
305
+ visitStatement(ctx) {
306
+ this.relationInStatementContext = undefined;
307
+ super.visitStatement(ctx);
308
+ }
309
+ visitUse(ctx) {
310
+ super.visitUse(ctx);
311
+ const identifierRef = ctx.identifierReference();
312
+ if (identifierRef) {
313
+ const multipartId = identifierRef.multipartIdentifier();
314
+ if (multipartId) {
315
+ this.handleDatabaseContext(multipartId);
316
+ }
317
+ }
318
+ }
319
+ visitCreateTable(ctx) {
320
+ const tableHeader = ctx.createTableHeader();
321
+ if (tableHeader) {
322
+ const identifierRef = tableHeader.identifierReference();
323
+ if (identifierRef) {
324
+ this.handleRelationContext(identifierRef);
325
+ }
326
+ }
327
+ super.visitCreateTable(ctx);
328
+ }
329
+ visitCreateView(ctx) {
330
+ const identifierRef = ctx.identifierReference();
331
+ if (identifierRef) {
332
+ this.handleRelationContext(identifierRef);
333
+ }
334
+ super.visitCreateView(ctx);
335
+ }
336
+ visitQuerySpecification(ctx) {
337
+ super.visitQuerySpecification(ctx);
338
+ if (this.currentQueryRelation !== undefined) {
339
+ this.updateQueryCompletionItems(this.currentQueryRelation);
340
+ }
341
+ }
342
+ visitRelation(ctx) {
343
+ const relationPrimary = ctx.relationPrimary();
344
+ if (relationPrimary instanceof SparkSQLParser_1.TableNameContext) {
345
+ const identifierRef = relationPrimary.identifierReference();
346
+ const multipartId = identifierRef.multipartIdentifier();
347
+ if (multipartId) {
348
+ const multipartTableName = multipartId
349
+ .errorCapturingIdentifier()
350
+ .map((t) => (0, utils_1.sanitizeText)(t.text));
351
+ const lastPart = multipartTableName[multipartTableName.length - 1];
352
+ if (this.cursor.isIn(lastPart)) {
353
+ this.caretScope = { type: 'relation', prefix: multipartTableName.slice(0, -1) };
354
+ }
355
+ }
356
+ }
357
+ super.visitRelation(ctx);
358
+ }
359
+ visitColumnReference(ctx) {
360
+ super.visitColumnReference(ctx);
361
+ const identifier = ctx.identifier();
362
+ if (this.currentQueryRelation !== undefined && identifier && this.cursor.isIn(identifier.text)) {
363
+ if (this.currentQueryRelation.currentClause === 'select') {
364
+ this.caretScope = { type: 'select-column' };
365
+ }
366
+ else {
367
+ this.caretScope = { type: 'spec-column' };
368
+ }
369
+ }
370
+ }
371
+ visitSelectClause(ctx) {
372
+ super.visitSelectClause(ctx);
373
+ }
374
+ visitFromClause(ctx) {
375
+ super.visitFromClause(ctx);
376
+ }
377
+ }
378
+ exports.CompletionVisitor = CompletionVisitor;
379
+ //# sourceMappingURL=completion.visitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion.visitor.js","sourceRoot":"","sources":["../../src/visitors/completion.visitor.ts"],"names":[],"mappings":";;;AAEA,2EASqC;AACrC,sCAAkE;AAClE,0DAc+B;AAG/B,oCAAwC;AAsDxC,MAAM,eAAe,GAAG,CAAC,qBAA6B,EAAU,EAAE;IAChE,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,8CAAkB,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,SAAS,gBAAgB,CACvB,QAAwC;IAExC,MAAM,OAAO,GAAqE,EAAE,CAAC;IAErF,IAAI,QAAQ,YAAY,yCAAa,EAAE,CAAC;QACtC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACv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,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAEhC,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,oBAAoB,KAAK,SAAS,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC/F,IAAI,IAAI,CAAC,oBAAoB,CAAC,aAAa,KAAK,QAAQ,EAAE,CAAC;gBACzD,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YAC9C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,GAAwB;QACxC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,eAAe,CAAC,GAAsB;QACpC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACF;AAlTD,8CAkTC"}
@@ -0,0 +1,34 @@
1
+ import { AbstractParseTreeVisitor } from 'antlr4ts/tree';
2
+ import { CreateTableContext, CreateViewContext, FromClauseContext, InsertIntoTableContext, QueryContext, RelationContext, SelectClauseContext } from '../lib/SparkSQLParser';
3
+ import { SparkSQLParserVisitor } from '../lib/SparkSQLParserVisitor';
4
+ import { Lineage, LineageEdge, LineageOptions, Relation, RelationPrimary } from '../lineage.typing';
5
+ export declare const STAR_LABEL = "*";
6
+ export declare const COUNT_STAR_LABEL = "count(*)";
7
+ export declare class LineageVisitor extends AbstractParseTreeVisitor<void> implements SparkSQLParserVisitor<void> {
8
+ private options;
9
+ relations: Array<{
10
+ relationPrimary?: RelationPrimary;
11
+ relation: Relation;
12
+ }>;
13
+ edges: LineageEdge[];
14
+ private edgeIdSeq;
15
+ private queryIdSeq;
16
+ private tableIdSeq;
17
+ private viewIdSeq;
18
+ private insertIdSeq;
19
+ private columnIdSeq;
20
+ constructor(options: LineageOptions);
21
+ protected defaultResult(): void;
22
+ getLineage(): Lineage;
23
+ private generateId;
24
+ private extractTableName;
25
+ private extractNameFromIdentifierReference;
26
+ visitQuery(ctx: QueryContext): void;
27
+ visitRelation(ctx: RelationContext): void;
28
+ visitInsertIntoTable(ctx: InsertIntoTableContext): void;
29
+ visitCreateTable(ctx: CreateTableContext): void;
30
+ visitCreateView(ctx: CreateViewContext): void;
31
+ visitSelectClause(ctx: SelectClauseContext): void;
32
+ visitFromClause(ctx: FromClauseContext): void;
33
+ }
34
+ //# sourceMappingURL=lineage.visitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineage.visitor.d.ts","sourceRoot":"","sources":["../../src/visitors/lineage.visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EAEjB,sBAAsB,EAEtB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpH,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,qBAAa,cAAe,SAAQ,wBAAwB,CAAC,IAAI,CAAE,YAAW,qBAAqB,CAAC,IAAI,CAAC;IAW3F,OAAO,CAAC,OAAO;IAV3B,SAAS,EAAE,KAAK,CAAC;QAAE,eAAe,CAAC,EAAE,eAAe,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAM;IACjF,KAAK,EAAE,WAAW,EAAE,CAAM;IAE1B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,WAAW,CAAK;gBAEJ,OAAO,EAAE,cAAc;IAI3C,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,UAAU,IAAI,OAAO;IAOrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kCAAkC;IAQ1C,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IAkBnC,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IA4BzC,oBAAoB,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI;IA4BvD,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAgC/C,eAAe,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IA4B7C,iBAAiB,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;IAYjD,eAAe,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;CAG9C"}
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LineageVisitor = exports.COUNT_STAR_LABEL = exports.STAR_LABEL = void 0;
4
+ const tree_1 = require("antlr4ts/tree");
5
+ exports.STAR_LABEL = '*';
6
+ exports.COUNT_STAR_LABEL = 'count(*)';
7
+ class LineageVisitor extends tree_1.AbstractParseTreeVisitor {
8
+ constructor(options) {
9
+ super();
10
+ this.options = options;
11
+ this.relations = [];
12
+ this.edges = [];
13
+ this.edgeIdSeq = 1;
14
+ this.queryIdSeq = 1;
15
+ this.tableIdSeq = 1;
16
+ this.viewIdSeq = 1;
17
+ this.insertIdSeq = 1;
18
+ this.columnIdSeq = 1;
19
+ }
20
+ defaultResult() {
21
+ return;
22
+ }
23
+ getLineage() {
24
+ return {
25
+ nodes: this.relations.map(r => r.relation),
26
+ edges: this.edges
27
+ };
28
+ }
29
+ generateId(prefix, seq) {
30
+ return `${prefix}_${seq}`;
31
+ }
32
+ extractTableName(ctx) {
33
+ const identifiers = ctx.errorCapturingIdentifier();
34
+ const relationName = identifiers[identifiers.length - 1].text;
35
+ const databaseName = identifiers.length > 1 ? identifiers[identifiers.length - 2].text : undefined;
36
+ const catalogName = identifiers.length > 2 ? identifiers[identifiers.length - 3].text : undefined;
37
+ return {
38
+ type: 'table',
39
+ relationName,
40
+ databaseName,
41
+ catalogName
42
+ };
43
+ }
44
+ extractNameFromIdentifierReference(ctx) {
45
+ const multipartId = ctx.multipartIdentifier();
46
+ if (multipartId) {
47
+ return multipartId.text;
48
+ }
49
+ return ctx.text;
50
+ }
51
+ visitQuery(ctx) {
52
+ const queryId = this.generateId('query', this.queryIdSeq++);
53
+ const columns = [];
54
+ this.visitChildren(ctx);
55
+ this.relations.push({
56
+ relation: {
57
+ type: 'query',
58
+ id: queryId,
59
+ label: `query_${this.queryIdSeq - 1}`,
60
+ columns,
61
+ isSourceOnly: false,
62
+ isTargetOnly: false
63
+ }
64
+ });
65
+ }
66
+ visitRelation(ctx) {
67
+ const tableId = this.generateId('table', this.tableIdSeq++);
68
+ const relationPrimary = ctx.relationPrimary();
69
+ if (relationPrimary) {
70
+ const text = relationPrimary.text;
71
+ const tablePrimary = {
72
+ type: 'table',
73
+ relationName: text
74
+ };
75
+ this.relations.push({
76
+ relationPrimary: tablePrimary,
77
+ relation: {
78
+ type: 'table',
79
+ id: tableId,
80
+ label: text,
81
+ columns: [],
82
+ data: tablePrimary,
83
+ isSourceOnly: true,
84
+ isTargetOnly: false
85
+ }
86
+ });
87
+ }
88
+ this.visitChildren(ctx);
89
+ }
90
+ visitInsertIntoTable(ctx) {
91
+ const insertId = this.generateId('insert', this.insertIdSeq++);
92
+ const identifierRef = ctx.identifierReference();
93
+ if (identifierRef) {
94
+ const tableName = this.extractNameFromIdentifierReference(identifierRef);
95
+ const tablePrimary = {
96
+ type: 'insert',
97
+ relationName: tableName
98
+ };
99
+ this.relations.push({
100
+ relationPrimary: tablePrimary,
101
+ relation: {
102
+ type: 'insert',
103
+ id: insertId,
104
+ label: tableName,
105
+ columns: [],
106
+ data: tablePrimary,
107
+ isSourceOnly: false,
108
+ isTargetOnly: true
109
+ }
110
+ });
111
+ }
112
+ this.visitChildren(ctx);
113
+ }
114
+ visitCreateTable(ctx) {
115
+ const tableId = this.generateId('table', this.tableIdSeq++);
116
+ // Get table name from createTableHeader
117
+ const tableHeader = ctx.createTableHeader();
118
+ if (tableHeader) {
119
+ const identifierRef = tableHeader.identifierReference();
120
+ if (identifierRef) {
121
+ const tableName = this.extractNameFromIdentifierReference(identifierRef);
122
+ const tablePrimary = {
123
+ type: 'table',
124
+ relationName: tableName
125
+ };
126
+ this.relations.push({
127
+ relationPrimary: tablePrimary,
128
+ relation: {
129
+ type: 'table',
130
+ id: tableId,
131
+ label: tableName,
132
+ columns: [],
133
+ data: tablePrimary,
134
+ isSourceOnly: false,
135
+ isTargetOnly: true
136
+ }
137
+ });
138
+ }
139
+ }
140
+ this.visitChildren(ctx);
141
+ }
142
+ visitCreateView(ctx) {
143
+ const viewId = this.generateId('view', this.viewIdSeq++);
144
+ const identifierRef = ctx.identifierReference();
145
+ if (identifierRef) {
146
+ const viewName = this.extractNameFromIdentifierReference(identifierRef);
147
+ const tablePrimary = {
148
+ type: 'view',
149
+ relationName: viewName
150
+ };
151
+ this.relations.push({
152
+ relationPrimary: tablePrimary,
153
+ relation: {
154
+ type: 'view',
155
+ id: viewId,
156
+ label: viewName,
157
+ columns: [],
158
+ data: tablePrimary,
159
+ isSourceOnly: false,
160
+ isTargetOnly: true
161
+ }
162
+ });
163
+ }
164
+ this.visitChildren(ctx);
165
+ }
166
+ visitSelectClause(ctx) {
167
+ const namedExprSeq = ctx.namedExpressionSeq();
168
+ if (namedExprSeq) {
169
+ const namedExprs = namedExprSeq.namedExpression();
170
+ namedExprs.forEach((_expr, _index) => {
171
+ // TODO: Implement column-level lineage tracking
172
+ });
173
+ }
174
+ this.visitChildren(ctx);
175
+ }
176
+ visitFromClause(ctx) {
177
+ this.visitChildren(ctx);
178
+ }
179
+ }
180
+ exports.LineageVisitor = LineageVisitor;
181
+ //# sourceMappingURL=lineage.visitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineage.visitor.js","sourceRoot":"","sources":["../../src/visitors/lineage.visitor.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;AAgB5C,QAAA,UAAU,GAAG,GAAG,CAAC;AACjB,QAAA,gBAAgB,GAAG,UAAU,CAAC;AAE3C,MAAa,cAAe,SAAQ,+BAA8B;IAWhE,YAAoB,OAAuB;QACzC,KAAK,EAAE,CAAC;QADU,YAAO,GAAP,OAAO,CAAgB;QAV3C,cAAS,GAAqE,EAAE,CAAC;QACjF,UAAK,GAAkB,EAAE,CAAC;QAElB,cAAS,GAAG,CAAC,CAAC;QACd,eAAU,GAAG,CAAC,CAAC;QACf,eAAU,GAAG,CAAC,CAAC;QACf,cAAS,GAAG,CAAC,CAAC;QACd,gBAAW,GAAG,CAAC,CAAC;QAChB,gBAAW,GAAG,CAAC,CAAC;IAIxB,CAAC;IAES,aAAa;QACrB,OAAO;IACT,CAAC;IAED,UAAU;QACR,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,MAAc,EAAE,GAAW;QAC5C,OAAO,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC;IAC5B,CAAC;IAEO,gBAAgB,CAAC,GAA+B;QACtD,MAAM,WAAW,GAAG,GAAG,CAAC,wBAAwB,EAAE,CAAC;QACnD,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,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