sqlglot 30.21.0__tar.gz → 30.23.0__tar.gz

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 (340) hide show
  1. {sqlglot-30.21.0 → sqlglot-30.23.0}/CHANGELOG.md +249 -0
  2. {sqlglot-30.21.0 → sqlglot-30.23.0}/Makefile +1 -1
  3. {sqlglot-30.21.0/sqlglot.egg-info → sqlglot-30.23.0}/PKG-INFO +22 -10
  4. {sqlglot-30.21.0 → sqlglot-30.23.0}/README.md +18 -6
  5. {sqlglot-30.21.0 → sqlglot-30.23.0}/setup.py +3 -3
  6. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/__init__.py +5 -0
  7. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/_version.py +3 -3
  8. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/anonymize.py +1 -0
  9. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/athena.py +17 -1
  10. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/bigquery.py +9 -1
  11. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/clickhouse.py +11 -1
  12. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/databricks.py +1 -0
  13. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/dialect.py +143 -11
  14. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/doris.py +4 -0
  15. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/drill.py +2 -2
  16. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/duckdb.py +8 -0
  17. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/hive.py +13 -0
  18. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/materialize.py +5 -0
  19. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/mysql.py +15 -1
  20. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/oracle.py +27 -0
  21. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/postgres.py +11 -0
  22. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/redshift.py +5 -0
  23. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/risingwave.py +2 -0
  24. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/snowflake.py +8 -0
  25. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/spark.py +1 -0
  26. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/sqlite.py +3 -0
  27. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/starrocks.py +6 -0
  28. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/tsql.py +1 -0
  29. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/executor/env.py +10 -1
  30. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/array.py +15 -1
  31. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/builders.py +55 -6
  32. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/constraints.py +1 -0
  33. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/core.py +13 -3
  34. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/ddl.py +3 -1
  35. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/json.py +1 -0
  36. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/properties.py +20 -5
  37. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/query.py +37 -3
  38. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/string.py +4 -0
  39. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generator.py +127 -34
  40. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/athena.py +5 -1
  41. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/bigquery.py +4 -2
  42. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/clickhouse.py +53 -1
  43. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/doris.py +7 -0
  44. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/dremio.py +1 -0
  45. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/drill.py +7 -0
  46. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/duckdb.py +85 -11
  47. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/hive.py +1 -0
  48. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/materialize.py +6 -1
  49. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/mysql.py +25 -1
  50. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/oracle.py +23 -0
  51. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/postgres.py +15 -1
  52. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/presto.py +11 -1
  53. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/redshift.py +8 -0
  54. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/risingwave.py +2 -1
  55. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/singlestore.py +5 -1
  56. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/snowflake.py +5 -48
  57. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/spark2.py +2 -1
  58. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/sqlite.py +2 -1
  59. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/starrocks.py +29 -0
  60. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/teradata.py +19 -0
  61. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/trino.py +1 -0
  62. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/tsql.py +12 -4
  63. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/lineage.py +19 -6
  64. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/merge_subqueries.py +3 -3
  65. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/optimizer.py +5 -2
  66. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/pushdown_predicates.py +24 -18
  67. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/qualify.py +0 -3
  68. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/qualify_columns.py +96 -25
  69. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/qualify_tables.py +36 -9
  70. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/resolver.py +29 -25
  71. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/scope.py +31 -13
  72. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/simplify.py +9 -2
  73. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parser.py +275 -87
  74. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/athena.py +8 -0
  75. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/clickhouse.py +19 -1
  76. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/doris.py +43 -0
  77. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/duckdb.py +10 -2
  78. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/mysql.py +43 -5
  79. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/oracle.py +77 -2
  80. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/postgres.py +4 -0
  81. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/snowflake.py +11 -0
  82. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/spark.py +4 -0
  83. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/spark2.py +13 -5
  84. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/starrocks.py +75 -1
  85. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/teradata.py +44 -0
  86. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/trino.py +25 -0
  87. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/tsql.py +72 -2
  88. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/planner.py +1 -1
  89. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/schema.py +0 -3
  90. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/tokenizer_core.py +101 -20
  91. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/tokens.py +28 -7
  92. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/transforms.py +7 -0
  93. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/__init__.py +49 -2
  94. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/bigquery.py +2 -20
  95. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/duckdb.py +33 -1
  96. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/hive.py +18 -0
  97. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/postgres.py +21 -1
  98. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/presto.py +0 -2
  99. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/redshift.py +17 -0
  100. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/snowflake.py +19 -3
  101. sqlglot-30.23.0/sqlglot/typing/tsql.py +64 -0
  102. {sqlglot-30.21.0 → sqlglot-30.23.0/sqlglot.egg-info}/PKG-INFO +22 -10
  103. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.egg-info/requires.txt +3 -3
  104. sqlglot-30.23.0/sqlglot.egg-info/scm_version.json +8 -0
  105. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglotc/pyproject.toml +2 -2
  106. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglotc/setup.py +0 -1
  107. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_athena.py +36 -1
  108. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_bigquery.py +48 -8
  109. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_clickhouse.py +208 -2
  110. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_databricks.py +25 -0
  111. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_dialect.py +39 -16
  112. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_doris.py +63 -1
  113. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_duckdb.py +229 -1
  114. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_hive.py +87 -6
  115. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_mysql.py +323 -1
  116. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_oracle.py +291 -1
  117. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_postgres.py +121 -4
  118. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_presto.py +28 -3
  119. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_redshift.py +62 -1
  120. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_risingwave.py +3 -0
  121. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_singlestore.py +19 -4
  122. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_snowflake.py +81 -5
  123. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_spark.py +41 -0
  124. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_starrocks.py +110 -1
  125. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_teradata.py +38 -0
  126. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_trino.py +51 -6
  127. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_tsql.py +124 -1
  128. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/annotate_functions.sql +15 -3
  129. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +1 -1
  130. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +4 -0
  131. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/merge_subqueries.sql +4 -0
  132. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/optimizer.sql +36 -4
  133. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/pushdown_projections.sql +6 -6
  134. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/qualify_columns.sql +81 -7
  135. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/qualify_tables.sql +33 -0
  136. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/simplify.sql +39 -0
  137. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_anonymize.py +1 -0
  138. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_build.py +6 -2
  139. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_executor.py +37 -2
  140. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_expressions.py +111 -0
  141. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_lineage.py +98 -28
  142. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_optimizer.py +179 -98
  143. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_parser.py +7 -0
  144. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_schema.py +31 -1
  145. sqlglot-30.21.0/sqlglot/typing/tsql.py +0 -37
  146. sqlglot-30.21.0/sqlglot.egg-info/scm_version.json +0 -8
  147. {sqlglot-30.21.0 → sqlglot-30.23.0}/.gitignore +0 -0
  148. {sqlglot-30.21.0 → sqlglot-30.23.0}/.gitmodules +0 -0
  149. {sqlglot-30.21.0 → sqlglot-30.23.0}/.gitpod.yml +0 -0
  150. {sqlglot-30.21.0 → sqlglot-30.23.0}/.pre-commit-config.yaml +0 -0
  151. {sqlglot-30.21.0 → sqlglot-30.23.0}/AGENTS.md +0 -0
  152. {sqlglot-30.21.0 → sqlglot-30.23.0}/CLAUDE.md +0 -0
  153. {sqlglot-30.21.0 → sqlglot-30.23.0}/CONTRIBUTING.md +0 -0
  154. {sqlglot-30.21.0 → sqlglot-30.23.0}/LICENSE +0 -0
  155. {sqlglot-30.21.0 → sqlglot-30.23.0}/MANIFEST.in +0 -0
  156. {sqlglot-30.21.0 → sqlglot-30.23.0}/pyproject.toml +0 -0
  157. {sqlglot-30.21.0 → sqlglot-30.23.0}/setup.cfg +0 -0
  158. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/__main__.py +0 -0
  159. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/_typing.py +0 -0
  160. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/__init__.py +0 -0
  161. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/dax.py +0 -0
  162. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/dremio.py +0 -0
  163. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/druid.py +0 -0
  164. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/dune.py +0 -0
  165. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/exasol.py +0 -0
  166. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/fabric.py +0 -0
  167. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/presto.py +0 -0
  168. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/prql.py +0 -0
  169. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/singlestore.py +0 -0
  170. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/solr.py +0 -0
  171. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/spark2.py +0 -0
  172. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/tableau.py +0 -0
  173. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/teradata.py +0 -0
  174. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/dialects/trino.py +0 -0
  175. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/diff.py +0 -0
  176. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/errors.py +0 -0
  177. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/executor/__init__.py +0 -0
  178. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/executor/context.py +0 -0
  179. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/executor/python.py +0 -0
  180. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/executor/table.py +0 -0
  181. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/__init__.py +0 -0
  182. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/aggregate.py +0 -0
  183. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/datatypes.py +0 -0
  184. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/dml.py +0 -0
  185. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/functions.py +0 -0
  186. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/math.py +0 -0
  187. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/expressions/temporal.py +0 -0
  188. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/__init__.py +0 -0
  189. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/databricks.py +0 -0
  190. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/dax.py +0 -0
  191. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/druid.py +0 -0
  192. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/dune.py +0 -0
  193. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/exasol.py +0 -0
  194. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/fabric.py +0 -0
  195. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/prql.py +0 -0
  196. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/python.py +0 -0
  197. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/solr.py +0 -0
  198. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/spark.py +0 -0
  199. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/generators/tableau.py +0 -0
  200. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/helper.py +0 -0
  201. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/jsonpath.py +0 -0
  202. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/__init__.py +0 -0
  203. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/annotate_types.py +0 -0
  204. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/canonicalize.py +0 -0
  205. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
  206. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
  207. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
  208. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
  209. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/helpers.py +0 -0
  210. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
  211. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/journal.py +0 -0
  212. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/normalize.py +0 -0
  213. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
  214. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/optimize_joins.py +0 -0
  215. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
  216. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/optimizer/unnest_subqueries.py +3 -3
  217. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/__init__.py +0 -0
  218. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/base.py +0 -0
  219. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/bigquery.py +0 -0
  220. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/databricks.py +0 -0
  221. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/dax.py +0 -0
  222. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/dremio.py +0 -0
  223. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/drill.py +0 -0
  224. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/druid.py +0 -0
  225. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/dune.py +0 -0
  226. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/exasol.py +0 -0
  227. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/fabric.py +0 -0
  228. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/hive.py +0 -0
  229. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/materialize.py +0 -0
  230. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/presto.py +0 -0
  231. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/prql.py +0 -0
  232. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/redshift.py +0 -0
  233. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/risingwave.py +0 -0
  234. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/singlestore.py +0 -0
  235. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/solr.py +0 -0
  236. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/sqlite.py +0 -0
  237. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/parsers/tableau.py +0 -0
  238. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/py.typed +0 -0
  239. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/serde.py +0 -0
  240. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/time.py +0 -0
  241. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/trie.py +0 -0
  242. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/clickhouse.py +0 -0
  243. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/databricks.py +0 -0
  244. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/mysql.py +0 -0
  245. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/spark.py +0 -0
  246. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot/typing/spark2.py +0 -0
  247. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.egg-info/SOURCES.txt +0 -0
  248. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.egg-info/dependency_links.txt +0 -0
  249. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.egg-info/scm_file_list.json +0 -0
  250. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.egg-info/top_level.txt +0 -0
  251. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglot.png +0 -0
  252. {sqlglot-30.21.0 → sqlglot-30.23.0}/sqlglotc/MANIFEST.in +0 -0
  253. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/__init__.py +0 -0
  254. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/__init__.py +0 -0
  255. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_dax.py +0 -0
  256. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_dremio.py +0 -0
  257. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_drill.py +0 -0
  258. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_druid.py +0 -0
  259. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_dune.py +0 -0
  260. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_exasol.py +0 -0
  261. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_fabric.py +0 -0
  262. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_materialize.py +0 -0
  263. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_pipe_syntax.py +0 -0
  264. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_prql.py +0 -0
  265. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_solr.py +0 -0
  266. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_sqlite.py +0 -0
  267. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/dialects/test_tableau.py +0 -0
  268. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/identity.sql +0 -0
  269. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/jsonpath/LICENSE +0 -0
  270. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/jsonpath/cts.json +0 -0
  271. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
  272. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
  273. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
  274. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
  275. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
  276. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/normalize.sql +0 -0
  277. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
  278. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
  279. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
  280. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
  281. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
  282. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
  283. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
  284. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
  285. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
  286. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
  287. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
  288. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
  289. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
  290. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
  291. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
  292. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
  293. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
  294. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
  295. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
  296. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
  297. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
  298. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
  299. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
  300. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
  301. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
  302. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
  303. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
  304. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
  305. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
  306. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
  307. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
  308. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
  309. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
  310. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
  311. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
  312. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
  313. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
  314. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
  315. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
  316. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
  317. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
  318. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
  319. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
  320. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/partial.sql +0 -0
  321. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/fixtures/pretty.sql +0 -0
  322. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/gen_fixtures.py +0 -0
  323. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/helpers.py +0 -0
  324. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/leakcheck.py +0 -0
  325. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/sqlglot/__init__.py +0 -0
  326. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_dialect_entry_points.py +0 -0
  327. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_dialect_imports.py +0 -0
  328. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_diff.py +0 -0
  329. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_docs.py +0 -0
  330. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_errors.py +0 -0
  331. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_generator.py +0 -0
  332. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_helper.py +0 -0
  333. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_integration_loader.py +0 -0
  334. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_jsonpath.py +0 -0
  335. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_serde.py +0 -0
  336. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_time.py +0 -0
  337. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_tokens.py +0 -0
  338. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_transforms.py +0 -0
  339. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_transpile.py +0 -0
  340. {sqlglot-30.21.0 → sqlglot-30.23.0}/tests/test_typing.py +0 -0
@@ -1,6 +1,253 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [v30.22.0] - 2026-10-09
5
+ ### :boom: BREAKING CHANGES
6
+ - due to [`5d997d9`](https://github.com/tobymao/sqlglot/commit/5d997d94d8041ed12db5abe7a1155b30df057b43) - Parse bare `ALTER TABLE ... DROP c`. *(PR [#8432](https://github.com/tobymao/sqlglot/pull/8432) by [@burnison](https://github.com/burnison))*:
7
+
8
+ Parse bare `ALTER TABLE ... DROP c`. (#8432)
9
+
10
+ - due to [`fdc0339`](https://github.com/tobymao/sqlglot/commit/fdc0339b219da56b4433198e3cd53e7604d53188) - decode string escapes and preserve byte literals *(PR [#8479](https://github.com/tobymao/sqlglot/pull/8479) by [@georgesittas](https://github.com/georgesittas))*:
11
+
12
+ decode string escapes and preserve byte literals (#8479)
13
+
14
+ - due to [`5cc5ef0`](https://github.com/tobymao/sqlglot/commit/5cc5ef046e8213dcb373c82f6c00fcf918fb4a5b) - preserve backslashes in string literals *(PR [#8481](https://github.com/tobymao/sqlglot/pull/8481) by [@georgesittas](https://github.com/georgesittas))*:
15
+
16
+ preserve backslashes in string literals (#8481)
17
+
18
+ - due to [`5fe5606`](https://github.com/tobymao/sqlglot/commit/5fe5606b905f38930017149c4a6e3d1b3a3a5616) - correct PostgreSQL, DuckDB, Redshift, and ClickHouse string escapes *(PR [#8484](https://github.com/tobymao/sqlglot/pull/8484) by [@georgesittas](https://github.com/georgesittas))*:
19
+
20
+ correct PostgreSQL, DuckDB, Redshift, and ClickHouse string escapes (#8484)
21
+
22
+ - due to [`fc4964b`](https://github.com/tobymao/sqlglot/commit/fc4964bbe8a8efdf28d2c4cbc7a5d66b160e7946) - support mixed-operation `ALTER`s. *(PR [#8419](https://github.com/tobymao/sqlglot/pull/8419) by [@burnison](https://github.com/burnison))*:
23
+
24
+ support mixed-operation `ALTER`s. (#8419)
25
+
26
+ - due to [`47b94d4`](https://github.com/tobymao/sqlglot/commit/47b94d424a05768a2e3b416cc4282b8449f8197f) - MySQL accepts non-CSV table options. *(PR [#8503](https://github.com/tobymao/sqlglot/pull/8503) by [@burnison](https://github.com/burnison))*:
27
+
28
+ MySQL accepts non-CSV table options. (#8503)
29
+
30
+ - due to [`a980f01`](https://github.com/tobymao/sqlglot/commit/a980f017130a5d9c485c53c878982155362ca4de) - scope preserved function names to their dialect *(PR [#8512](https://github.com/tobymao/sqlglot/pull/8512) by [@georgesittas](https://github.com/georgesittas))*:
31
+
32
+ scope preserved function names to their dialect (#8512)
33
+
34
+ - due to [`ee7567c`](https://github.com/tobymao/sqlglot/commit/ee7567c86d9a418cc517f80194e6fc35e075be4a) - expand stars in the order sources appear in FROM *(PR [#8529](https://github.com/tobymao/sqlglot/pull/8529) by [@VaggelisD](https://github.com/VaggelisD))*:
35
+
36
+ expand stars in the order sources appear in FROM (#8529)
37
+
38
+ - due to [`e3ed748`](https://github.com/tobymao/sqlglot/commit/e3ed74860fd5a44d31347b2e2cf62cf5030e9222) - support FROM-first multi-table INSERT [CLAUDE] *(PR [#8527](https://github.com/tobymao/sqlglot/pull/8527) by [@LeeChaeRok](https://github.com/LeeChaeRok))*:
39
+
40
+ support FROM-first multi-table INSERT [CLAUDE] (#8527)
41
+
42
+ - due to [`5b7b413`](https://github.com/tobymao/sqlglot/commit/5b7b413451e2a7a35bfc8c076d3b3636f8a7b203) - expand nested join constructs in qualify_tables *(PR [#8530](https://github.com/tobymao/sqlglot/pull/8530) by [@VaggelisD](https://github.com/VaggelisD))*:
43
+
44
+ expand nested join constructs in qualify_tables (#8530)
45
+
46
+ - due to [`6de29fd`](https://github.com/tobymao/sqlglot/commit/6de29fdce762e564002e0ae0d8d09c388ebc4cfb) - FROM-first multi-table INSERT cleanup *(PR [#8535](https://github.com/tobymao/sqlglot/pull/8535) by [@geooo109](https://github.com/geooo109))*:
47
+
48
+ FROM-first multi-table INSERT cleanup (#8535)
49
+
50
+ - due to [`e1e0d2e`](https://github.com/tobymao/sqlglot/commit/e1e0d2e52f45247bfa0ab815eb8a7388ea50a0e8) - preserve precision for timestamp and time literals ([#8534](https://github.com/tobymao/sqlglot/pull/8534)) *(PR [#8538](https://github.com/tobymao/sqlglot/pull/8538) by [@ansh-rohilla](https://github.com/ansh-rohilla))*:
51
+
52
+ preserve precision for timestamp and time literals (#8534) (#8538)
53
+
54
+ - due to [`f5dd70b`](https://github.com/tobymao/sqlglot/commit/f5dd70bff7ebce048d6bdd3f782328104c6c119d) - truncate integer division towards zero instead of rounding *(PR [#8532](https://github.com/tobymao/sqlglot/pull/8532) by [@georgesittas](https://github.com/georgesittas))*:
55
+
56
+ truncate integer division towards zero instead of rounding (#8532)
57
+
58
+ - due to [`b7e5153`](https://github.com/tobymao/sqlglot/commit/b7e515399a589e720b2bd081e5bb395f408feff8) - preserve bracket flags in gen serialization *(commit by [@georgesittas](https://github.com/georgesittas))*:
59
+
60
+ preserve bracket flags in gen serialization
61
+
62
+ - due to [`aa64321`](https://github.com/tobymao/sqlglot/commit/aa64321744bcb38828146b33ead1c0529dd64652) - expand USING columns first in star expansion *(PR [#8536](https://github.com/tobymao/sqlglot/pull/8536) by [@VaggelisD](https://github.com/VaggelisD))*:
63
+
64
+ expand USING columns first in star expansion (#8536)
65
+
66
+ - due to [`f2b81bf`](https://github.com/tobymao/sqlglot/commit/f2b81bfb2d2cf5b14b01be5211e022b23b6bec19) - annotate FLOOR, CEIL and SIGN by their arg type *(PR [#8547](https://github.com/tobymao/sqlglot/pull/8547) by [@georgesittas](https://github.com/georgesittas))*:
67
+
68
+ annotate FLOOR, CEIL and SIGN by their arg type (#8547)
69
+
70
+ - due to [`7f1cf60`](https://github.com/tobymao/sqlglot/commit/7f1cf60c884868a295f76dfd42745b931dd9cfbb) - Make `ALTER` actions optional. *(PR [#8539](https://github.com/tobymao/sqlglot/pull/8539) by [@burnison](https://github.com/burnison))*:
71
+
72
+ Make `ALTER` actions optional. (#8539)
73
+
74
+ - due to [`1e2cc21`](https://github.com/tobymao/sqlglot/commit/1e2cc210e2a336defd9037dfc66d9dae1e72780e) - preserve CASE branches before always-true conditions *(PR [#8572](https://github.com/tobymao/sqlglot/pull/8572) by [@georgesittas](https://github.com/georgesittas))*:
75
+
76
+ preserve CASE branches before always-true conditions (#8572)
77
+
78
+ - due to [`9f2f4cd`](https://github.com/tobymao/sqlglot/commit/9f2f4cd5a2d25e967142d0c90d107128d4dc70e5) - resolve correlated UNNEST fields from projection types *(PR [#8571](https://github.com/tobymao/sqlglot/pull/8571) by [@georgesittas](https://github.com/georgesittas))*:
79
+
80
+ resolve correlated UNNEST fields from projection types (#8571)
81
+
82
+ - due to [`6683ad2`](https://github.com/tobymao/sqlglot/commit/6683ad28a45a8b803de0ce650d737adec609fbd4) - resolve correlated UNNEST fields from projection types *(PR [#8571](https://github.com/tobymao/sqlglot/pull/8571) by [@georgesittas](https://github.com/georgesittas))*:
83
+
84
+ resolve correlated UNNEST fields from projection types (#8571)
85
+
86
+ - due to [`51864e7`](https://github.com/tobymao/sqlglot/commit/51864e76b42b26f1fdeb829e349bd43db4d81598) - edge case in array generation *(commit by [@georgesittas](https://github.com/georgesittas))*:
87
+
88
+ edge case in array generation
89
+
90
+ - due to [`1d8e1c9`](https://github.com/tobymao/sqlglot/commit/1d8e1c9963e36652a57dd837989b3e4bcb7fc90a) - annotate sha2 for redshift properly *(PR [#8577](https://github.com/tobymao/sqlglot/pull/8577) by [@georgesittas](https://github.com/georgesittas))*:
91
+
92
+ annotate sha2 for redshift properly (#8577)
93
+
94
+ - due to [`b8333a8`](https://github.com/tobymao/sqlglot/commit/b8333a81f02fafaa040bb3b8535f1c17eb9caf0c) - remove infer_schema from optimizer *(PR [#8552](https://github.com/tobymao/sqlglot/pull/8552) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
95
+
96
+ remove infer_schema from optimizer (#8552)
97
+
98
+
99
+ ### :sparkles: New Features
100
+ - [`5d997d9`](https://github.com/tobymao/sqlglot/commit/5d997d94d8041ed12db5abe7a1155b30df057b43) - **parser**: Parse bare `ALTER TABLE ... DROP c`. *(PR [#8432](https://github.com/tobymao/sqlglot/pull/8432) by [@burnison](https://github.com/burnison))*
101
+ - [`db3931c`](https://github.com/tobymao/sqlglot/commit/db3931c8bac748038751ce20f40fd6c54619a7e1) - **mysql**: Fix sqlglot tokenizer to incorporate mysql rules *(PR [#8465](https://github.com/tobymao/sqlglot/pull/8465) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
102
+ - [`fc4964b`](https://github.com/tobymao/sqlglot/commit/fc4964bbe8a8efdf28d2c4cbc7a5d66b160e7946) - **parser**: support mixed-operation `ALTER`s. *(PR [#8419](https://github.com/tobymao/sqlglot/pull/8419) by [@burnison](https://github.com/burnison))*
103
+ - [`47b94d4`](https://github.com/tobymao/sqlglot/commit/47b94d424a05768a2e3b416cc4282b8449f8197f) - **parser**: MySQL accepts non-CSV table options. *(PR [#8503](https://github.com/tobymao/sqlglot/pull/8503) by [@burnison](https://github.com/burnison))*
104
+ - [`e3ed748`](https://github.com/tobymao/sqlglot/commit/e3ed74860fd5a44d31347b2e2cf62cf5030e9222) - **hive**: support FROM-first multi-table INSERT [CLAUDE] *(PR [#8527](https://github.com/tobymao/sqlglot/pull/8527) by [@LeeChaeRok](https://github.com/LeeChaeRok))*
105
+ - [`7f1cf60`](https://github.com/tobymao/sqlglot/commit/7f1cf60c884868a295f76dfd42745b931dd9cfbb) - **parser**: Make `ALTER` actions optional. *(PR [#8539](https://github.com/tobymao/sqlglot/pull/8539) by [@burnison](https://github.com/burnison))*
106
+ - [`54e1455`](https://github.com/tobymao/sqlglot/commit/54e1455fd7566b2f0b8450a49b5c274b6161d625) - **databricks**: Retain LIMIT ALL in recursive CTEs during roundtrip *(PR [#8537](https://github.com/tobymao/sqlglot/pull/8537) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
107
+ - :arrow_lower_right: *addresses issue [#8513](https://github.com/tobymao/sqlglot/issues/8513) opened by [@paddy-devan](https://github.com/paddy-devan)*
108
+ - [`2471dd6`](https://github.com/tobymao/sqlglot/commit/2471dd6f91b10bdba2a26d012e454ce3923d427e) - **optimizer**: ! annotate function Mode for duckdb *(PR [#8560](https://github.com/tobymao/sqlglot/pull/8560) by [@Anuja006](https://github.com/Anuja006))*
109
+ - [`9214453`](https://github.com/tobymao/sqlglot/commit/921445341b7fc8afa40359bebb8b59f53a86916c) - **mysql**: parse ASCII and UNICODE. *(PR [#8561](https://github.com/tobymao/sqlglot/pull/8561) by [@burnison](https://github.com/burnison))*
110
+ - [`54005bf`](https://github.com/tobymao/sqlglot/commit/54005bf19b32d1dbcaecbd9f752059bc647339c5) - **bigquery,tsql**: rewrite AGG(...) FILTER (WHERE cond) into conditional aggregates [CLAUDE] *(PR [#8563](https://github.com/tobymao/sqlglot/pull/8563) by [@VaggelisD](https://github.com/VaggelisD))*
111
+ - [`ffe2c73`](https://github.com/tobymao/sqlglot/commit/ffe2c73694fc88e5b44b0deff1f1fb92a6a9fe95) - **spark**: parse dotted column identifiers in column definitions [CLAUDE] *(PR [#8570](https://github.com/tobymao/sqlglot/pull/8570) by [@tsamaras](https://github.com/tsamaras))*
112
+
113
+ ### :bug: Bug Fixes
114
+ - [`61fc386`](https://github.com/tobymao/sqlglot/commit/61fc386dc713e281523768d41ff2bb8b5450e751) - **clickhouse**: generate toDayOfMonth and toDayOfYear *(PR [#8473](https://github.com/tobymao/sqlglot/pull/8473) by [@ekut](https://github.com/ekut))*
115
+ - [`4afe079`](https://github.com/tobymao/sqlglot/commit/4afe079f91f06440b2f4c4a2cad754e0ee8d23fa) - **ci**: wait for sqlglotc before publishing sqlglot [CODEX] *(commit by [@tobymao](https://github.com/tobymao))*
116
+ - [`cb5d8da`](https://github.com/tobymao/sqlglot/commit/cb5d8da1bac8eafb2b64618ff205dddbe53664f7) - **duckdb**: check for an empty regexp pattern before embedding flags *(PR [#8474](https://github.com/tobymao/sqlglot/pull/8474) by [@ekut](https://github.com/ekut))*
117
+ - [`ac084c5`](https://github.com/tobymao/sqlglot/commit/ac084c5bdb2f188ff878687000273ae2247db24b) - **builders**: allow None table name in table_ for sqlglotc *(PR [#8476](https://github.com/tobymao/sqlglot/pull/8476) by [@VaggelisD](https://github.com/VaggelisD))*
118
+ - :arrow_lower_right: *fixes issue [#8475](https://github.com/tobymao/sqlglot/issues/8475) opened by [@asikeero](https://github.com/asikeero)*
119
+ - [`c7778cf`](https://github.com/tobymao/sqlglot/commit/c7778cf56d90e409c75e59b82842544b118fa850) - **parser**: bare ALTER DROP refactor and indexes named concurrently *(commit by [@geooo109](https://github.com/geooo109))*
120
+ - [`15a77f1`](https://github.com/tobymao/sqlglot/commit/15a77f1d89c3c6baac93230173e48b626497027d) - **mysql**: decode backslash string escapes *(PR [#8471](https://github.com/tobymao/sqlglot/pull/8471) by [@georgesittas](https://github.com/georgesittas))*
121
+ - [`49d6ed4`](https://github.com/tobymao/sqlglot/commit/49d6ed436647447a775f4bba5f1af94702f31055) - **hive**: decode backslash string escapes *(PR [#8478](https://github.com/tobymao/sqlglot/pull/8478) by [@georgesittas](https://github.com/georgesittas))*
122
+ - [`fdc0339`](https://github.com/tobymao/sqlglot/commit/fdc0339b219da56b4433198e3cd53e7604d53188) - **bigquery**: decode string escapes and preserve byte literals *(PR [#8479](https://github.com/tobymao/sqlglot/pull/8479) by [@georgesittas](https://github.com/georgesittas))*
123
+ - [`5cc5ef0`](https://github.com/tobymao/sqlglot/commit/5cc5ef046e8213dcb373c82f6c00fcf918fb4a5b) - **drill**: preserve backslashes in string literals *(PR [#8481](https://github.com/tobymao/sqlglot/pull/8481) by [@georgesittas](https://github.com/georgesittas))*
124
+ - [`13463de`](https://github.com/tobymao/sqlglot/commit/13463de608e9d74d36fb57da045c537e0ce1a7f6) - **clickhouse**: parse isInfinite *(PR [#8487](https://github.com/tobymao/sqlglot/pull/8487) by [@ekut](https://github.com/ekut))*
125
+ - [`5fe5606`](https://github.com/tobymao/sqlglot/commit/5fe5606b905f38930017149c4a6e3d1b3a3a5616) - correct PostgreSQL, DuckDB, Redshift, and ClickHouse string escapes *(PR [#8484](https://github.com/tobymao/sqlglot/pull/8484) by [@georgesittas](https://github.com/georgesittas))*
126
+ - [`268ad02`](https://github.com/tobymao/sqlglot/commit/268ad021b8bfaf164be3b0774657952c3d70bed4) - **parser**: parse ALTER TABLE DROP with multiple columns *(PR [#8486](https://github.com/tobymao/sqlglot/pull/8486) by [@Madin-H23](https://github.com/Madin-H23))*
127
+ - :arrow_lower_right: *fixes issue [#8485](https://github.com/tobymao/sqlglot/issues/8485) opened by [@ultrabear](https://github.com/ultrabear)*
128
+ - [`1d2a99b`](https://github.com/tobymao/sqlglot/commit/1d2a99b9cc0acf671fd2688ef02097a69404057d) - **parser**: ALTER DROP/ALTER COLUMN cleanups *(commit by [@geooo109](https://github.com/geooo109))*
129
+ - [`5fc93a9`](https://github.com/tobymao/sqlglot/commit/5fc93a9eab142393c0ef688c82d898329bcddb67) - **snowflake**: support for SPLIT_TO_TABLE *(PR [#8488](https://github.com/tobymao/sqlglot/pull/8488) by [@andrjohns](https://github.com/andrjohns))*
130
+ - [`b65592b`](https://github.com/tobymao/sqlglot/commit/b65592b45831df5e7f13d418e50f24c4cea118f0) - **postgres**: parse ^@ as STARTS_WITH closes [#8490](https://github.com/tobymao/sqlglot/pull/8490) *(commit by [@geooo109](https://github.com/geooo109))*
131
+ - [`bffcdef`](https://github.com/tobymao/sqlglot/commit/bffcdefc16b01527ee252ad2bf322b0bbff33bc8) - **snowflake**: parse (+) outer join markers *(PR [#8492](https://github.com/tobymao/sqlglot/pull/8492) by [@DG47](https://github.com/DG47))*
132
+ - [`0ceaf13`](https://github.com/tobymao/sqlglot/commit/0ceaf1319e6506fe7644021c0825c10af4f0ae6a) - **clickhouse**: map ISO calendar functions in both directions [CLAUDE] *(PR [#8494](https://github.com/tobymao/sqlglot/pull/8494) by [@ekut](https://github.com/ekut))*
133
+ - [`a6698b7`](https://github.com/tobymao/sqlglot/commit/a6698b765b006b4b3b181fcdc75319f7f990164f) - drop wrong Dialect cast in build_formatted_time [CLAUDE] *(commit by [@tobymao](https://github.com/tobymao))*
134
+ - [`5e6887a`](https://github.com/tobymao/sqlglot/commit/5e6887adc805ee13b359e25b1d17e062b0a60342) - **tsql**: parse bare table hints [CODEX: GPT-6.1 Sol] *(PR [#8493](https://github.com/tobymao/sqlglot/pull/8493) by [@mikamikasuki](https://github.com/mikamikasuki))*
135
+ - [`f337c70`](https://github.com/tobymao/sqlglot/commit/f337c70ee42614bb3224fe8c54b7af5be286eb85) - **snowflake**: parse LIST and LS stage commands [GPT-6.1] *(PR [#8502](https://github.com/tobymao/sqlglot/pull/8502) by [@tekumara](https://github.com/tekumara))*
136
+ - :arrow_lower_right: *fixes issue [#8500](https://github.com/tobymao/sqlglot/issues/8500) opened by [@tekumara](https://github.com/tekumara)*
137
+ - [`7fb054f`](https://github.com/tobymao/sqlglot/commit/7fb054f17f0b86bf572884a524067ca9eb883fb4) - **clickhouse**: generate POSITION(...) > 0 for Contains *(PR [#8507](https://github.com/tobymao/sqlglot/pull/8507) by [@ekut](https://github.com/ekut))*
138
+ - [`a980f01`](https://github.com/tobymao/sqlglot/commit/a980f017130a5d9c485c53c878982155362ca4de) - scope preserved function names to their dialect *(PR [#8512](https://github.com/tobymao/sqlglot/pull/8512) by [@georgesittas](https://github.com/georgesittas))*
139
+ - :arrow_lower_right: *fixes issue [#8497](https://github.com/tobymao/sqlglot/issues/8497) opened by [@ekut](https://github.com/ekut)*
140
+ - [`c7957e8`](https://github.com/tobymao/sqlglot/commit/c7957e8c867e42654d91b1d9c20d5e9b77ddf5b9) - **generator**: only resolve a query's own ORDER BY aliases in NULLS simulation *(PR [#8514](https://github.com/tobymao/sqlglot/pull/8514) by [@geooo109](https://github.com/geooo109))*
141
+ - :arrow_lower_right: *fixes issue [#8489](https://github.com/tobymao/sqlglot/issues/8489) opened by [@goldmedal](https://github.com/goldmedal)*
142
+ - [`51587ff`](https://github.com/tobymao/sqlglot/commit/51587ffdecfc8b2c08ee1da24b543312ded90d39) - **mysql**: Parse `DROP KEY`, `DROP CHECK` and `SIGNED`. *(PR [#8515](https://github.com/tobymao/sqlglot/pull/8515) by [@burnison](https://github.com/burnison))*
143
+ - [`50d7ce4`](https://github.com/tobymao/sqlglot/commit/50d7ce4a9808aed6beb4127c4f60d309219c664d) - **duckdb**: read the UNIFORM seed set by the Databricks parser *(PR [#8519](https://github.com/tobymao/sqlglot/pull/8519) by [@Ayoubhm07](https://github.com/Ayoubhm07))*
144
+ - :arrow_lower_right: *fixes issue [#8518](https://github.com/tobymao/sqlglot/issues/8518) opened by [@Ayoubhm07](https://github.com/Ayoubhm07)*
145
+ - [`ee7567c`](https://github.com/tobymao/sqlglot/commit/ee7567c86d9a418cc517f80194e6fc35e075be4a) - **optimizer**: expand stars in the order sources appear in FROM *(PR [#8529](https://github.com/tobymao/sqlglot/pull/8529) by [@VaggelisD](https://github.com/VaggelisD))*
146
+ - [`fc8178e`](https://github.com/tobymao/sqlglot/commit/fc8178edd3e4717db5acf1c735a03aeb67951c92) - **parser**: `DROP INDEX` accepts `db.t` syntax. *(PR [#8526](https://github.com/tobymao/sqlglot/pull/8526) by [@burnison](https://github.com/burnison))*
147
+ - [`d5d436b`](https://github.com/tobymao/sqlglot/commit/d5d436bc32030c019ca07e1dcb4a247f5b4a0f53) - **generator**: escape identifier escape chars when generating quoted identifiers *(PR [#8533](https://github.com/tobymao/sqlglot/pull/8533) by [@georgesittas](https://github.com/georgesittas))*
148
+ - [`5b7b413`](https://github.com/tobymao/sqlglot/commit/5b7b413451e2a7a35bfc8c076d3b3636f8a7b203) - **optimizer**: expand nested join constructs in qualify_tables *(PR [#8530](https://github.com/tobymao/sqlglot/pull/8530) by [@VaggelisD](https://github.com/VaggelisD))*
149
+ - :arrow_lower_right: *fixes issue [#8505](https://github.com/tobymao/sqlglot/issues/8505) opened by [@laravioli](https://github.com/laravioli)*
150
+ - :arrow_lower_right: *fixes issue [#8508](https://github.com/tobymao/sqlglot/issues/8508) opened by [@yousefissa](https://github.com/yousefissa)*
151
+ - [`30958d6`](https://github.com/tobymao/sqlglot/commit/30958d61522b84765973a8fa6c76ea03d7f97373) - **optimizer**: column resolution for TVFs, PIVOTs, and Snowflake schemas *(PR [#8472](https://github.com/tobymao/sqlglot/pull/8472) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
152
+ - [`48beaa6`](https://github.com/tobymao/sqlglot/commit/48beaa64b8d3348c31a8eab2e7daf90836d151b2) - **optimizer**: preserve all OR arms during DNF pushdown for multi-table branches *(PR [#8525](https://github.com/tobymao/sqlglot/pull/8525) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
153
+ - [`8184834`](https://github.com/tobymao/sqlglot/commit/818483464bf50a1b41d6982dbc172e7934141c52) - **duckdb**: preserve Spark array slice length *(PR [#8524](https://github.com/tobymao/sqlglot/pull/8524) by [@subotac](https://github.com/subotac))*
154
+ - :arrow_lower_right: *fixes issue [#8520](https://github.com/tobymao/sqlglot/issues/8520) opened by [@Sharpiro](https://github.com/Sharpiro)*
155
+ - [`e1e0d2e`](https://github.com/tobymao/sqlglot/commit/e1e0d2e52f45247bfa0ab815eb8a7388ea50a0e8) - **trino**: preserve precision for timestamp and time literals ([#8534](https://github.com/tobymao/sqlglot/pull/8534)) *(PR [#8538](https://github.com/tobymao/sqlglot/pull/8538) by [@ansh-rohilla](https://github.com/ansh-rohilla))*
156
+ - :arrow_lower_right: *fixes issue [#8534](https://github.com/tobymao/sqlglot/issues/8534) opened by [@ramcasa](https://github.com/ramcasa)*
157
+ - [`f5dd70b`](https://github.com/tobymao/sqlglot/commit/f5dd70bff7ebce048d6bdd3f782328104c6c119d) - truncate integer division towards zero instead of rounding *(PR [#8532](https://github.com/tobymao/sqlglot/pull/8532) by [@georgesittas](https://github.com/georgesittas))*
158
+ - :arrow_lower_right: *fixes issue [#8531](https://github.com/tobymao/sqlglot/issues/8531) opened by [@ramcasa](https://github.com/ramcasa)*
159
+ - [`f8606fe`](https://github.com/tobymao/sqlglot/commit/f8606fe8f97a10a3ba00f42104836add1299966f) - **tsql**: treat `output` as a valid identifier closes [#8545](https://github.com/tobymao/sqlglot/pull/8545) *(commit by [@georgesittas](https://github.com/georgesittas))*
160
+ - [`3096a59`](https://github.com/tobymao/sqlglot/commit/3096a591d65b1b00ba9abdf482fc7b7973a6e6af) - **duckdb**: transpile Spark CONCAT_WS on arrays to ARRAY_TO_STRING ([#8521](https://github.com/tobymao/sqlglot/pull/8521)) *(PR [#8523](https://github.com/tobymao/sqlglot/pull/8523) by [@ansh-rohilla](https://github.com/ansh-rohilla))*
161
+ - :arrow_lower_right: *fixes issue [#8521](https://github.com/tobymao/sqlglot/issues/8521) opened by [@Sharpiro](https://github.com/Sharpiro)*
162
+ - [`b7e5153`](https://github.com/tobymao/sqlglot/commit/b7e515399a589e720b2bd081e5bb395f408feff8) - **optimizer**: preserve bracket flags in gen serialization *(commit by [@georgesittas](https://github.com/georgesittas))*
163
+ - [`aa64321`](https://github.com/tobymao/sqlglot/commit/aa64321744bcb38828146b33ead1c0529dd64652) - **optimizer**: expand USING columns first in star expansion *(PR [#8536](https://github.com/tobymao/sqlglot/pull/8536) by [@VaggelisD](https://github.com/VaggelisD))*
164
+ - :arrow_lower_right: *fixes issue [#8516](https://github.com/tobymao/sqlglot/issues/8516) opened by [@laravioli](https://github.com/laravioli)*
165
+ - [`022bb41`](https://github.com/tobymao/sqlglot/commit/022bb41fc5f9b35ab303a5989edd1f9544ec11bb) - **duckdb**: generate USING SAMPLE before ORDER BY and LIMIT [CLAUDE] *(PR [#8550](https://github.com/tobymao/sqlglot/pull/8550) by [@Fcabla](https://github.com/Fcabla))*
166
+ - :arrow_lower_right: *fixes issue [#8546](https://github.com/tobymao/sqlglot/issues/8546) opened by [@Fcabla](https://github.com/Fcabla)*
167
+ - [`f2b81bf`](https://github.com/tobymao/sqlglot/commit/f2b81bfb2d2cf5b14b01be5211e022b23b6bec19) - **optimizer**: annotate FLOOR, CEIL and SIGN by their arg type *(PR [#8547](https://github.com/tobymao/sqlglot/pull/8547) by [@georgesittas](https://github.com/georgesittas))*
168
+ - [`97a2fa2`](https://github.com/tobymao/sqlglot/commit/97a2fa2ed6351835f07303bd839fec96a01c472e) - **mysql**: Misplaced table and index options. *(PR [#8553](https://github.com/tobymao/sqlglot/pull/8553) by [@burnison](https://github.com/burnison))*
169
+ - [`025a2f4`](https://github.com/tobymao/sqlglot/commit/025a2f46f9a29fcfc68d88ad0290c9c7f7e05320) - **clickhouse**: map bitwise aggregates to groupBitAnd/Or/Xor *(PR [#8556](https://github.com/tobymao/sqlglot/pull/8556) by [@ekut](https://github.com/ekut))*
170
+ - [`93aa16d`](https://github.com/tobymao/sqlglot/commit/93aa16deb98a0f85b4613405e2cfd2a5685bc3fb) - **mysql**: keep the CHAR length in CHARACTER SET casts [CLAUDE] *(PR [#8559](https://github.com/tobymao/sqlglot/pull/8559) by [@DylanMerigaud](https://github.com/DylanMerigaud))*
171
+ - [`507cbf9`](https://github.com/tobymao/sqlglot/commit/507cbf99ca3f34b7f7f7fc26a90a94031c2452cd) - **optimizer**: qualify DuckDB list comprehension variables *(PR [#8557](https://github.com/tobymao/sqlglot/pull/8557) by [@georgesittas](https://github.com/georgesittas))*
172
+ - [`862fd55`](https://github.com/tobymao/sqlglot/commit/862fd55467e09527e07240725c6e78c793099ff1) - **trino**: preserve precision for all temporal literals *(PR [#8564](https://github.com/tobymao/sqlglot/pull/8564) by [@georgesittas](https://github.com/georgesittas))*
173
+ - :arrow_lower_right: *fixes issue [#8562](https://github.com/tobymao/sqlglot/issues/8562) opened by [@ansh-rohilla](https://github.com/ansh-rohilla)*
174
+ - [`1a0fc42`](https://github.com/tobymao/sqlglot/commit/1a0fc4299add581c61a21c92d0c41d13698b20c5) - **parser**: `ALTER` actions/options in any order. *(PR [#8565](https://github.com/tobymao/sqlglot/pull/8565) by [@burnison](https://github.com/burnison))*
175
+ - [`56910fd`](https://github.com/tobymao/sqlglot/commit/56910fd955e62d8e20ba85c1264123656698c178) - **optimizer**: allow simplification to scalar subqueries *(PR [#8573](https://github.com/tobymao/sqlglot/pull/8573) by [@georgesittas](https://github.com/georgesittas))*
176
+ - :arrow_lower_right: *fixes issue [#8568](https://github.com/tobymao/sqlglot/issues/8568) opened by [@laravioli](https://github.com/laravioli)*
177
+ - [`1e2cc21`](https://github.com/tobymao/sqlglot/commit/1e2cc210e2a336defd9037dfc66d9dae1e72780e) - **optimizer**: preserve CASE branches before always-true conditions *(PR [#8572](https://github.com/tobymao/sqlglot/pull/8572) by [@georgesittas](https://github.com/georgesittas))*
178
+ - :arrow_lower_right: *fixes issue [#8567](https://github.com/tobymao/sqlglot/issues/8567) opened by [@laravioli](https://github.com/laravioli)*
179
+ - [`9f2f4cd`](https://github.com/tobymao/sqlglot/commit/9f2f4cd5a2d25e967142d0c90d107128d4dc70e5) - **optimizer**: resolve correlated UNNEST fields from projection types *(PR [#8571](https://github.com/tobymao/sqlglot/pull/8571) by [@georgesittas](https://github.com/georgesittas))*
180
+ - [`6683ad2`](https://github.com/tobymao/sqlglot/commit/6683ad28a45a8b803de0ce650d737adec609fbd4) - **optimizer**: resolve correlated UNNEST fields from projection types *(PR [#8571](https://github.com/tobymao/sqlglot/pull/8571) by [@georgesittas](https://github.com/georgesittas))*
181
+ - [`361b23b`](https://github.com/tobymao/sqlglot/commit/361b23b87b5ee3a3a301c07daaf02d703aad21fe) - **parser**: allow SEARCH + CYCLE and CYCLE TO ... DEFAULT [CLAUDE] *(PR [#8574](https://github.com/tobymao/sqlglot/pull/8574) by [@DylanMerigaud](https://github.com/DylanMerigaud))*
182
+ - :arrow_lower_right: *fixes issue [#8569](https://github.com/tobymao/sqlglot/issues/8569) opened by [@hustontrevor](https://github.com/hustontrevor)*
183
+ - [`bea35b3`](https://github.com/tobymao/sqlglot/commit/bea35b336cba03cb528a6e34c17b265c84ed9793) - **bigquery,duckdb**: don't drop array elements after a subquery *(PR [#8575](https://github.com/tobymao/sqlglot/pull/8575) by [@blackmad-cradle](https://github.com/blackmad-cradle))*
184
+ - [`51864e7`](https://github.com/tobymao/sqlglot/commit/51864e76b42b26f1fdeb829e349bd43db4d81598) - **bigquery**: edge case in array generation *(commit by [@georgesittas](https://github.com/georgesittas))*
185
+ - [`1d8e1c9`](https://github.com/tobymao/sqlglot/commit/1d8e1c9963e36652a57dd837989b3e4bcb7fc90a) - **optimizer**: annotate sha2 for redshift properly *(PR [#8577](https://github.com/tobymao/sqlglot/pull/8577) by [@georgesittas](https://github.com/georgesittas))*
186
+ - [`b8333a8`](https://github.com/tobymao/sqlglot/commit/b8333a81f02fafaa040bb3b8535f1c17eb9caf0c) - **optimizer**: remove infer_schema from optimizer *(PR [#8552](https://github.com/tobymao/sqlglot/pull/8552) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
187
+
188
+ ### :wrench: Chores
189
+ - [`8f0d751`](https://github.com/tobymao/sqlglot/commit/8f0d751dd28b5cfa610c33691ca371d6389d392e) - fix multi-processing py313 CI warnings *(PR [#8477](https://github.com/tobymao/sqlglot/pull/8477) by [@georgesittas](https://github.com/georgesittas))*
190
+ - [`b12b50f`](https://github.com/tobymao/sqlglot/commit/b12b50fc068730fd04f864a3757cd8d356afccfa) - remove qualify for SPLIT_TO_TABLE *(commit by [@geooo109](https://github.com/geooo109))*
191
+ - [`971d004`](https://github.com/tobymao/sqlglot/commit/971d004474ff010eaf247f186d71dc39ae1151f9) - switch sqlglot[c] from sqlglot-mypy to upstream mypy *(PR [#8517](https://github.com/tobymao/sqlglot/pull/8517) by [@VaggelisD](https://github.com/VaggelisD))*
192
+ - [`6de29fd`](https://github.com/tobymao/sqlglot/commit/6de29fdce762e564002e0ae0d8d09c388ebc4cfb) - FROM-first multi-table INSERT cleanup *(PR [#8535](https://github.com/tobymao/sqlglot/pull/8535) by [@geooo109](https://github.com/geooo109))*
193
+ - [`aa58ce6`](https://github.com/tobymao/sqlglot/commit/aa58ce602e3f50b87192f2e1bd2994d56da10c3c) - **optimizer**: optionally copy input ast *(PR [#8566](https://github.com/tobymao/sqlglot/pull/8566) by [@georgesittas](https://github.com/georgesittas))*
194
+ - [`b78bd9c`](https://github.com/tobymao/sqlglot/commit/b78bd9cc28aef86e94f05031538a0c32ee6980f8) - avoid compiling schema.py *(PR [#8576](https://github.com/tobymao/sqlglot/pull/8576) by [@geooo109](https://github.com/geooo109))*
195
+
196
+
197
+ ## [v30.21.0] - 2026-09-30
198
+ ### :boom: BREAKING CHANGES
199
+ - due to [`2be1e0e`](https://github.com/tobymao/sqlglot/commit/2be1e0e2addc0ef01cfa3fd3cf2ef751cdbf411d) - annotate `bit_xor` for duckdb *(PR [#8452](https://github.com/tobymao/sqlglot/pull/8452) by [@opencode13241-eng](https://github.com/opencode13241-eng))*:
200
+
201
+ annotate `bit_xor` for duckdb (#8452)
202
+
203
+ - due to [`65a0e22`](https://github.com/tobymao/sqlglot/commit/65a0e22447fcca9ea4a89f6167954fbb872c8e6d) - new projection pushdown algorithm *(PR [#8440](https://github.com/tobymao/sqlglot/pull/8440) by [@georgesittas](https://github.com/georgesittas))*:
204
+
205
+ new projection pushdown algorithm (#8440)
206
+
207
+ - due to [`e3f71dc`](https://github.com/tobymao/sqlglot/commit/e3f71dc1a1186ada4b017a5f2498b8c2b0a8a25b) - decode backslash escape sequences in string literals *(PR [#8456](https://github.com/tobymao/sqlglot/pull/8456) by [@georgesittas](https://github.com/georgesittas))*:
208
+
209
+ decode backslash escape sequences in string literals (#8456)
210
+
211
+ - due to [`b4d9e37`](https://github.com/tobymao/sqlglot/commit/b4d9e37d84a61eeb78e8d652f697e2e0d4d57869) - inherit Trino dialect, parser and generator defaults *(PR [#8464](https://github.com/tobymao/sqlglot/pull/8464) by [@georgesittas](https://github.com/georgesittas))*:
212
+
213
+ inherit Trino dialect, parser and generator defaults (#8464)
214
+
215
+ - due to [`d84f7f3`](https://github.com/tobymao/sqlglot/commit/d84f7f3ee1ff50778c93970b086d59692714dcdc) - preserve BD literal semantics in Hive and Spark *(PR [#8455](https://github.com/tobymao/sqlglot/pull/8455) by [@georgesittas](https://github.com/georgesittas))*:
216
+
217
+ preserve BD literal semantics in Hive and Spark (#8455)
218
+
219
+ - due to [`1122046`](https://github.com/tobymao/sqlglot/commit/11220460d0e78a3c83f14b006239f636e4ddde71) - convert ARRAY_INSERT position between 0- and 1-based dialects [CLAUDE] *(PR [#8460](https://github.com/tobymao/sqlglot/pull/8460) by [@anishmehta24](https://github.com/anishmehta24))*:
220
+
221
+ convert ARRAY_INSERT position between 0- and 1-based dialects [CLAUDE] (#8460)
222
+
223
+
224
+ ### :sparkles: New Features
225
+ - [`2be1e0e`](https://github.com/tobymao/sqlglot/commit/2be1e0e2addc0ef01cfa3fd3cf2ef751cdbf411d) - **optimizer**: annotate `bit_xor` for duckdb *(PR [#8452](https://github.com/tobymao/sqlglot/pull/8452) by [@opencode13241-eng](https://github.com/opencode13241-eng))*
226
+ - [`7e48d16`](https://github.com/tobymao/sqlglot/commit/7e48d16936216f9f93d7a52baef0e482e3fb14e7) - **optimizer**: add #schema fixture directive *(PR [#8435](https://github.com/tobymao/sqlglot/pull/8435) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
227
+
228
+ ### :bug: Bug Fixes
229
+ - [`1d40af1`](https://github.com/tobymao/sqlglot/commit/1d40af146d77dcf890ae18c1a59e649bf0862db3) - **optimizer**: unqualified semi/anti join column bound to table joined *(PR [#8430](https://github.com/tobymao/sqlglot/pull/8430) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
230
+ - [`d9b2b96`](https://github.com/tobymao/sqlglot/commit/d9b2b9660be8a6b77a0bb0475f6bf0509c6c6aa0) - **parser**: constraint parsing fixup *(PR [#8457](https://github.com/tobymao/sqlglot/pull/8457) by [@georgesittas](https://github.com/georgesittas))*
231
+ - [`e3f71dc`](https://github.com/tobymao/sqlglot/commit/e3f71dc1a1186ada4b017a5f2498b8c2b0a8a25b) - **snowflake**: decode backslash escape sequences in string literals *(PR [#8456](https://github.com/tobymao/sqlglot/pull/8456) by [@georgesittas](https://github.com/georgesittas))*
232
+ - :arrow_lower_right: *fixes issue [#4344](https://github.com/tobymao/sqlglot/issues/4344) opened by [@dylanscott](https://github.com/dylanscott)*
233
+ - :arrow_lower_right: *fixes issue [#8441](https://github.com/tobymao/sqlglot/issues/8441) opened by [@yvonne-chou-1](https://github.com/yvonne-chou-1)*
234
+ - [`b4d9e37`](https://github.com/tobymao/sqlglot/commit/b4d9e37d84a61eeb78e8d652f697e2e0d4d57869) - **athena**: inherit Trino dialect, parser and generator defaults *(PR [#8464](https://github.com/tobymao/sqlglot/pull/8464) by [@georgesittas](https://github.com/georgesittas))*
235
+ - :arrow_lower_right: *fixes issue [#8458](https://github.com/tobymao/sqlglot/issues/8458) opened by [@deepyaman](https://github.com/deepyaman)*
236
+ - [`d84f7f3`](https://github.com/tobymao/sqlglot/commit/d84f7f3ee1ff50778c93970b086d59692714dcdc) - preserve BD literal semantics in Hive and Spark *(PR [#8455](https://github.com/tobymao/sqlglot/pull/8455) by [@georgesittas](https://github.com/georgesittas))*
237
+ - [`1122046`](https://github.com/tobymao/sqlglot/commit/11220460d0e78a3c83f14b006239f636e4ddde71) - **spark**: convert ARRAY_INSERT position between 0- and 1-based dialects [CLAUDE] *(PR [#8460](https://github.com/tobymao/sqlglot/pull/8460) by [@anishmehta24](https://github.com/anishmehta24))*
238
+ - [`18520e2`](https://github.com/tobymao/sqlglot/commit/18520e2b5bfa3f1d7ed1a261d1bd463132054db1) - **clickhouse**: generate varPop for VariancePop [CLAUDE] *(PR [#8469](https://github.com/tobymao/sqlglot/pull/8469) by [@ekut](https://github.com/ekut))*
239
+ - [`2960bdd`](https://github.com/tobymao/sqlglot/commit/2960bdd7470f1c21518710ed468466b9bab4bb7b) - **optimizer**: preserve tautological aggregate filters [CODEX] *(PR [#8466](https://github.com/tobymao/sqlglot/pull/8466) by [@Boulea7](https://github.com/Boulea7))*
240
+ - [`840b482`](https://github.com/tobymao/sqlglot/commit/840b4823e649e380e1dda30cf21907baebb6c58c) - **postgres**: keep WITH ORDINALITY alias columns on LATERAL UNNEST [GROK] *(PR [#8463](https://github.com/tobymao/sqlglot/pull/8463) by [@00200200](https://github.com/00200200))*
241
+ - :arrow_lower_right: *fixes issue [#8462](https://github.com/tobymao/sqlglot/issues/8462) opened by [@SoTrx](https://github.com/SoTrx)*
242
+ - [`aa70202`](https://github.com/tobymao/sqlglot/commit/aa702020725f4d1591cfb2d308c72937a38e8fd4) - **optimizer**: qualify struct paths with conflicting aliases [CODEX] *(PR [#8467](https://github.com/tobymao/sqlglot/pull/8467) by [@tobymao](https://github.com/tobymao))*
243
+ - [`b54d32f`](https://github.com/tobymao/sqlglot/commit/b54d32f036d4c1158bb889324f4ac6d2846d2701) - **optimizer**: stop struct lookup at nearest alias [CODEX] *(commit by [@tobymao](https://github.com/tobymao))*
244
+ - [`5d16fa8`](https://github.com/tobymao/sqlglot/commit/5d16fa83bfb8f3582eaffa4b99c7d05a061d8a76) - **ci**: publish sqlglot independently of sqlglotc [CODEX] *(commit by [@tobymao](https://github.com/tobymao))*
245
+
246
+ ### :recycle: Refactors
247
+ - [`65a0e22`](https://github.com/tobymao/sqlglot/commit/65a0e22447fcca9ea4a89f6167954fbb872c8e6d) - **optimizer**: new projection pushdown algorithm *(PR [#8440](https://github.com/tobymao/sqlglot/pull/8440) by [@georgesittas](https://github.com/georgesittas))*
248
+ - [`ac940f0`](https://github.com/tobymao/sqlglot/commit/ac940f016a1d398137b4d666db0f191e6c4b6d1f) - **tokenizer**: generalize backslash escape handling, report unterminated escapes *(PR [#8470](https://github.com/tobymao/sqlglot/pull/8470) by [@georgesittas](https://github.com/georgesittas))*
249
+
250
+
4
251
  ## [v30.20.0] - 2026-09-27
5
252
  ### :boom: BREAKING CHANGES
6
253
  - due to [`1d0e3f3`](https://github.com/tobymao/sqlglot/commit/1d0e3f34864037c54cf6bdf45af594db62ad7319) - Fix mysql roundtrip for DATE_ADD and DATE_SUB *(PR [#8417](https://github.com/tobymao/sqlglot/pull/8417) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
@@ -15990,3 +16237,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
15990
16237
  [v30.18.0]: https://github.com/tobymao/sqlglot/compare/v30.17.0...v30.18.0
15991
16238
  [v30.19.0]: https://github.com/tobymao/sqlglot/compare/v30.18.0...v30.19.0
15992
16239
  [v30.20.0]: https://github.com/tobymao/sqlglot/compare/v30.19.0...v30.20.0
16240
+ [v30.21.0]: https://github.com/tobymao/sqlglot/compare/v30.20.0...v30.21.0
16241
+ [v30.22.0]: https://github.com/tobymao/sqlglot/compare/v30.21.0...v30.22.0
@@ -42,7 +42,7 @@ install-dev:
42
42
  fi; \
43
43
  fi
44
44
 
45
- # sqlglotc requires Python 3.10+ (sqlglot-mypy 1.20+ dropped 3.9). On 3.9
45
+ # sqlglotc requires Python 3.10+ (mypy 2.4+ dropped 3.9). On 3.9
46
46
  # we skip the C build; tests fall back to pure-Python sqlglot.
47
47
  PY_GE_310 := $(shell python -c "import sys; print(int(sys.version_info >= (3, 10)))")
48
48
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlglot
3
- Version: 30.21.0
3
+ Version: 30.23.0
4
4
  Summary: An easily customizable SQL parser and transpiler
5
5
  Author-email: Toby Mao <toby.mao@gmail.com>
6
6
  License-Expression: MIT
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Provides-Extra: dev
21
21
  Requires-Dist: duckdb>=0.6; extra == "dev"
22
- Requires-Dist: sqlglot-mypy>=2.3.0.post2; python_version >= "3.10" and extra == "dev"
22
+ Requires-Dist: mypy>=2.4.0; python_version >= "3.10" and extra == "dev"
23
23
  Requires-Dist: mypy; python_version < "3.10" and extra == "dev"
24
24
  Requires-Dist: setuptools_scm; extra == "dev"
25
25
  Requires-Dist: pandas; extra == "dev"
@@ -34,10 +34,10 @@ Requires-Dist: types-pytz; extra == "dev"
34
34
  Requires-Dist: typing_extensions; extra == "dev"
35
35
  Requires-Dist: pyperf; extra == "dev"
36
36
  Provides-Extra: c
37
- Requires-Dist: sqlglotc==30.21.0; python_version >= "3.10" and extra == "c"
37
+ Requires-Dist: sqlglotc==30.23.0; python_version >= "3.10" and extra == "c"
38
38
  Provides-Extra: rs
39
39
  Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
40
- Requires-Dist: sqlglotc==30.21.0; python_version >= "3.10" and extra == "rs"
40
+ Requires-Dist: sqlglotc==30.23.0; python_version >= "3.10" and extra == "rs"
41
41
  Dynamic: license-file
42
42
  Dynamic: provides-extra
43
43
 
@@ -87,11 +87,13 @@ From PyPI:
87
87
  # Pure python version
88
88
  pip3 install sqlglot
89
89
 
90
- # C extensions compiled with mypyc
90
+ # C extensions compiled with mypyc (Python 3.10+)
91
91
  # prebuilt wheel if available for your platform, otherwise builds from source
92
92
  pip3 install "sqlglot[c]"
93
93
  ```
94
94
 
95
+ On Python 3.9, `sqlglot[c]` installs the pure Python version.
96
+
95
97
  Or with a local checkout:
96
98
 
97
99
  ```
@@ -581,12 +583,12 @@ make docs-serve
581
583
  ## Run Tests and Lint
582
584
 
583
585
  ```
584
- make style # Only linter checks
586
+ make style # Format, lint, and type-check
585
587
  make unit # Only unit tests (pure Python)
586
588
  make test # Unit and integration tests (pure Python)
587
589
  make unitc # Only unit tests (mypyc compiled)
588
590
  make testc # Unit and integration tests (mypyc compiled)
589
- make check # Full test suite & linter checks
591
+ make check # Full test suite, formatting, linting, and type checks
590
592
  make clean # Remove compiled C artifacts (.so files, build dirs)
591
593
  ```
592
594
 
@@ -616,18 +618,28 @@ sqlglot, sqltree, sqlparse, and sqlfluff are python based whereas sqloxide and p
616
618
  | many_numbers | 0.103898 (1.00) | 0.024483 (0.24) | 0.120119 (1.16) | N/A | N/A | 0.031667 (0.30) | 0.026880 (0.26) |
617
619
 
618
620
  ```
619
- make bench # Run parsing benchmark
621
+ make bench # Run parsing, transpilation, and optimization benchmarks
622
+ make bench-parse # Run parsing benchmark
623
+ make bench-transpile # Run transpilation benchmark
620
624
  make bench-optimize # Run optimization benchmark
621
625
  ```
622
626
 
623
627
  ## Optional Dependencies
624
628
 
625
- SQLGlot uses [dateutil](https://github.com/dateutil/dateutil) to simplify literal timedelta expressions. The optimizer will not simplify expressions like the following if the module cannot be found:
629
+ SQLGlot uses [dateutil](https://github.com/dateutil/dateutil) to simplify constant date and interval arithmetic. With dateutil installed, the optimizer simplifies:
630
+
631
+ ```sql
632
+ DATE '2021-01-01' + INTERVAL '1' MONTH
633
+ ```
634
+
635
+ to:
626
636
 
627
637
  ```sql
628
- x + interval '1' month
638
+ CAST('2021-02-01' AS DATE)
629
639
  ```
630
640
 
641
+ Without dateutil, the optimizer leaves this arithmetic unevaluated.
642
+
631
643
  ## Supported Dialects
632
644
 
633
645
  | Dialect | Support Level |
@@ -44,11 +44,13 @@ From PyPI:
44
44
  # Pure python version
45
45
  pip3 install sqlglot
46
46
 
47
- # C extensions compiled with mypyc
47
+ # C extensions compiled with mypyc (Python 3.10+)
48
48
  # prebuilt wheel if available for your platform, otherwise builds from source
49
49
  pip3 install "sqlglot[c]"
50
50
  ```
51
51
 
52
+ On Python 3.9, `sqlglot[c]` installs the pure Python version.
53
+
52
54
  Or with a local checkout:
53
55
 
54
56
  ```
@@ -538,12 +540,12 @@ make docs-serve
538
540
  ## Run Tests and Lint
539
541
 
540
542
  ```
541
- make style # Only linter checks
543
+ make style # Format, lint, and type-check
542
544
  make unit # Only unit tests (pure Python)
543
545
  make test # Unit and integration tests (pure Python)
544
546
  make unitc # Only unit tests (mypyc compiled)
545
547
  make testc # Unit and integration tests (mypyc compiled)
546
- make check # Full test suite & linter checks
548
+ make check # Full test suite, formatting, linting, and type checks
547
549
  make clean # Remove compiled C artifacts (.so files, build dirs)
548
550
  ```
549
551
 
@@ -573,18 +575,28 @@ sqlglot, sqltree, sqlparse, and sqlfluff are python based whereas sqloxide and p
573
575
  | many_numbers | 0.103898 (1.00) | 0.024483 (0.24) | 0.120119 (1.16) | N/A | N/A | 0.031667 (0.30) | 0.026880 (0.26) |
574
576
 
575
577
  ```
576
- make bench # Run parsing benchmark
578
+ make bench # Run parsing, transpilation, and optimization benchmarks
579
+ make bench-parse # Run parsing benchmark
580
+ make bench-transpile # Run transpilation benchmark
577
581
  make bench-optimize # Run optimization benchmark
578
582
  ```
579
583
 
580
584
  ## Optional Dependencies
581
585
 
582
- SQLGlot uses [dateutil](https://github.com/dateutil/dateutil) to simplify literal timedelta expressions. The optimizer will not simplify expressions like the following if the module cannot be found:
586
+ SQLGlot uses [dateutil](https://github.com/dateutil/dateutil) to simplify constant date and interval arithmetic. With dateutil installed, the optimizer simplifies:
587
+
588
+ ```sql
589
+ DATE '2021-01-01' + INTERVAL '1' MONTH
590
+ ```
591
+
592
+ to:
583
593
 
584
594
  ```sql
585
- x + interval '1' month
595
+ CAST('2021-02-01' AS DATE)
586
596
  ```
587
597
 
598
+ Without dateutil, the optimizer leaves this arithmetic unevaluated.
599
+
588
600
  ## Supported Dialects
589
601
 
590
602
  | Dialect | Support Level |
@@ -7,9 +7,9 @@ setup(
7
7
  extras_require={
8
8
  "dev": [
9
9
  "duckdb>=0.6",
10
- # sqlglot-mypy 1.20+ is the build dep for sqlglotc and only ships
10
+ # mypy 2.4+ is the build dep for sqlglotc and only ships
11
11
  # for py3.10+; on py3.9 just use upstream mypy for type checking.
12
- "sqlglot-mypy >= 2.3.0.post2; python_version >= '3.10'",
12
+ "mypy >= 2.4.0; python_version >= '3.10'",
13
13
  "mypy; python_version < '3.10'",
14
14
  "setuptools_scm",
15
15
  "pandas",
@@ -25,7 +25,7 @@ setup(
25
25
  "pyperf",
26
26
  ],
27
27
  # Compiles from source on the user's machine. Requires Python 3.10+
28
- # because the build dep (sqlglot-mypy 1.20+) dropped 3.9; on 3.9
28
+ # because the build dep (mypy 2.4+) dropped 3.9; on 3.9
29
29
  # `pip install sqlglot[c]` is a no-op and you just get pure-Python sqlglot.
30
30
  "c": [f"sqlglotc=={version}; python_version >= '3.10'"],
31
31
  # Deprecated: the Rust tokenizer has been replaced by sqlglotc.
@@ -81,6 +81,7 @@ def tokenize(sql: str, read: DialectType = None, dialect: DialectType = None) ->
81
81
  Args:
82
82
  sql: the SQL code string to tokenize.
83
83
  read: the SQL dialect to apply during tokenizing (eg. "spark", "hive", "presto", "mysql").
84
+ See `sqlglot.dialects.Dialects` for options.
84
85
  dialect: the SQL dialect (alias for read).
85
86
 
86
87
  Returns:
@@ -101,6 +102,7 @@ def parse(
101
102
  Args:
102
103
  sql: the SQL code string to parse.
103
104
  read: the SQL dialect to apply during parsing (eg. "spark", "hive", "presto", "mysql").
105
+ See `sqlglot.dialects.Dialects` for options.
104
106
  dialect: the SQL dialect (alias for read).
105
107
  **opts: other `sqlglot.parser.Parser` options.
106
108
 
@@ -144,6 +146,7 @@ def parse_one(
144
146
  Args:
145
147
  sql: the SQL code string to parse.
146
148
  read: the SQL dialect to apply during parsing (eg. "spark", "hive", "presto", "mysql").
149
+ See `sqlglot.dialects.Dialects` for options.
147
150
  dialect: the SQL dialect (alias for read)
148
151
  into: the SQLGlot Expr to parse into.
149
152
  **opts: other `sqlglot.parser.Parser` options.
@@ -180,7 +183,9 @@ def transpile(
180
183
  Args:
181
184
  sql: the SQL code string to transpile.
182
185
  read: the source dialect used to parse the input string (eg. "spark", "hive", "presto", "mysql").
186
+ See `sqlglot.dialects.Dialects` for options.
183
187
  write: the target dialect into which the input should be transformed (eg. "spark", "hive", "presto", "mysql").
188
+ See `sqlglot.dialects.Dialects` for options.
184
189
  identity: if set to `True` and if the target dialect is not specified the source dialect will be used as both:
185
190
  the source and the target dialect.
186
191
  error_level: the desired error level of the parser.
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '30.21.0'
22
- __version_tuple__ = version_tuple = (30, 21, 0)
21
+ __version__ = version = '30.23.0'
22
+ __version_tuple__ = version_tuple = (30, 23, 0)
23
23
 
24
- __commit_id__ = commit_id = 'g5d16fa83b'
24
+ __commit_id__ = commit_id = 'gad8764a04'
@@ -15,6 +15,7 @@ ANONYMIZED_TYPES = {
15
15
  TokenType.HEX_STRING,
16
16
  TokenType.HEREDOC_STRING,
17
17
  TokenType.IDENTIFIER,
18
+ TokenType.NATIONAL_RAW_STRING,
18
19
  TokenType.NATIONAL_STRING,
19
20
  TokenType.NUMBER,
20
21
  TokenType.RAW_STRING,
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  from sqlglot import tokens
5
5
  from sqlglot.dialects.dialect import DialectType
6
+ from sqlglot.errors import TokenError
6
7
  from sqlglot.generators.athena import AthenaGenerator
7
8
  from sqlglot.parsers.athena import AthenaParser
8
9
  from sqlglot.tokens import TokenType, Token
@@ -74,7 +75,22 @@ class Athena(Trino):
74
75
  self._trino_tokenizer = _TrinoTokenizer(Trino())
75
76
 
76
77
  def tokenize(self, sql: str) -> list[Token]:
77
- tokens = super().tokenize(sql)
78
+ try:
79
+ tokens = super().tokenize(sql)
80
+ except TokenError:
81
+ # Combined rules can reject literals valid in only one engine.
82
+ for tokenizer, hive in (
83
+ (self._trino_tokenizer, False),
84
+ (self._hive_tokenizer, True),
85
+ ):
86
+ try:
87
+ tokens = tokenizer.tokenize(sql)
88
+ except TokenError:
89
+ continue
90
+
91
+ if _tokenize_as_hive(tokens) == hive:
92
+ return [Token(TokenType.HIVE_TOKEN_STREAM, "")] + tokens if hive else tokens
93
+ raise
78
94
 
79
95
  if _tokenize_as_hive(tokens):
80
96
  return [Token(TokenType.HIVE_TOKEN_STREAM, "")] + self._hive_tokenizer.tokenize(sql)
@@ -29,7 +29,7 @@ class BigQuery(Dialect):
29
29
  HEX_LOWERCASE = True
30
30
  FORCE_EARLY_ALIAS_REF_EXPANSION = True
31
31
  EXPAND_ONLY_GROUP_ALIAS_REF = True
32
- PRESERVE_ORIGINAL_NAMES = True
32
+ ORIGINAL_NAME_META_KEY = "bigquery_name"
33
33
  HEX_STRING_IS_INTEGER_TYPE = True
34
34
  BYTE_STRING_IS_BYTES_TYPE = True
35
35
  UUID_IS_STRING_TYPE = True
@@ -168,6 +168,14 @@ class BigQuery(Dialect):
168
168
  }
169
169
 
170
170
  class Tokenizer(tokens.Tokenizer):
171
+ NUMERIC_ESCAPES = {
172
+ "x": (16, 2, 2, 0xFF),
173
+ "X": (16, 2, 2, 0xFF),
174
+ "u": (16, 4, 4, 0xFFFF),
175
+ "U": (16, 8, 8, 0x10FFFF),
176
+ "0": (8, 3, 3, 0xFF),
177
+ }
178
+ DROP_UNKNOWN_ESCAPES = True
171
179
  QUOTES = ["'", '"', '"""', "'''"]
172
180
  COMMENTS = ["--", "#", ("/*", "*/")]
173
181
  IDENTIFIERS = ["`"]