sqlglot 30.20.0__tar.gz → 30.22.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 (341) hide show
  1. {sqlglot-30.20.0 → sqlglot-30.22.0}/CHANGELOG.md +124 -0
  2. {sqlglot-30.20.0 → sqlglot-30.22.0}/Makefile +1 -1
  3. {sqlglot-30.20.0/sqlglot.egg-info → sqlglot-30.22.0}/PKG-INFO +22 -10
  4. {sqlglot-30.20.0 → sqlglot-30.22.0}/README.md +18 -6
  5. {sqlglot-30.20.0 → sqlglot-30.22.0}/setup.py +3 -3
  6. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/__init__.py +5 -0
  7. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/_version.py +3 -3
  8. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/athena.py +2 -2
  9. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/bigquery.py +9 -1
  10. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/clickhouse.py +11 -1
  11. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/dialect.py +136 -11
  12. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/doris.py +4 -0
  13. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/drill.py +2 -2
  14. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/duckdb.py +8 -0
  15. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/hive.py +13 -0
  16. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/materialize.py +5 -0
  17. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/mysql.py +15 -1
  18. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/postgres.py +11 -0
  19. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/redshift.py +5 -0
  20. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/risingwave.py +2 -0
  21. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/snowflake.py +5 -0
  22. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/spark.py +1 -0
  23. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/sqlite.py +3 -0
  24. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/starrocks.py +5 -0
  25. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/tsql.py +1 -0
  26. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/executor/env.py +10 -1
  27. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/array.py +15 -1
  28. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/builders.py +1 -1
  29. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/ddl.py +1 -1
  30. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/properties.py +3 -5
  31. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/query.py +41 -3
  32. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/string.py +4 -0
  33. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generator.py +150 -34
  34. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/athena.py +1 -1
  35. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/bigquery.py +4 -2
  36. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/clickhouse.py +21 -0
  37. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/doris.py +1 -0
  38. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/dremio.py +1 -0
  39. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/drill.py +7 -0
  40. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/duckdb.py +76 -9
  41. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/hive.py +1 -0
  42. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/materialize.py +6 -1
  43. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/mysql.py +25 -1
  44. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/oracle.py +1 -0
  45. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/postgres.py +15 -1
  46. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/presto.py +9 -0
  47. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/redshift.py +8 -0
  48. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/risingwave.py +2 -1
  49. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/singlestore.py +11 -2
  50. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/snowflake.py +5 -48
  51. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/spark.py +3 -3
  52. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/spark2.py +10 -0
  53. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/sqlite.py +2 -1
  54. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/starrocks.py +8 -0
  55. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/trino.py +1 -0
  56. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/tsql.py +12 -4
  57. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/lineage.py +19 -6
  58. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/canonicalize_internal_names.py +6 -4
  59. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/optimizer.py +5 -2
  60. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/pushdown_predicates.py +24 -18
  61. sqlglot-30.22.0/sqlglot/optimizer/pushdown_projections.py +600 -0
  62. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/qualify.py +0 -3
  63. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/qualify_columns.py +132 -40
  64. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/qualify_tables.py +32 -8
  65. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/resolver.py +46 -38
  66. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/scope.py +31 -13
  67. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/simplify.py +10 -3
  68. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parser.py +251 -79
  69. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/athena.py +5 -2
  70. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/clickhouse.py +14 -0
  71. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/doris.py +3 -0
  72. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/duckdb.py +3 -2
  73. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/hive.py +37 -1
  74. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/mysql.py +30 -5
  75. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/postgres.py +3 -0
  76. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/snowflake.py +11 -0
  77. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/spark.py +6 -0
  78. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/spark2.py +8 -1
  79. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/starrocks.py +3 -0
  80. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/trino.py +25 -0
  81. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/tsql.py +72 -2
  82. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/planner.py +1 -1
  83. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/schema.py +0 -3
  84. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/tokenizer_core.py +207 -22
  85. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/tokens.py +39 -7
  86. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/transforms.py +13 -1
  87. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/__init__.py +49 -2
  88. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/bigquery.py +2 -20
  89. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/duckdb.py +16 -1
  90. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/hive.py +18 -0
  91. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/postgres.py +21 -1
  92. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/presto.py +0 -2
  93. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/redshift.py +17 -0
  94. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/snowflake.py +19 -3
  95. sqlglot-30.22.0/sqlglot/typing/tsql.py +64 -0
  96. {sqlglot-30.20.0 → sqlglot-30.22.0/sqlglot.egg-info}/PKG-INFO +22 -10
  97. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.egg-info/requires.txt +3 -3
  98. sqlglot-30.22.0/sqlglot.egg-info/scm_version.json +8 -0
  99. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglotc/pyproject.toml +2 -2
  100. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglotc/setup.py +0 -1
  101. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_athena.py +33 -0
  102. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_bigquery.py +47 -7
  103. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_clickhouse.py +113 -2
  104. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_databricks.py +2 -0
  105. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_dialect.py +87 -12
  106. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_duckdb.py +185 -1
  107. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_hive.py +91 -10
  108. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_mysql.py +311 -1
  109. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_oracle.py +26 -1
  110. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_postgres.py +102 -2
  111. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_presto.py +28 -3
  112. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_redshift.py +62 -1
  113. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_risingwave.py +3 -0
  114. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_singlestore.py +19 -5
  115. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_snowflake.py +79 -3
  116. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_spark.py +39 -0
  117. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_starrocks.py +6 -0
  118. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_trino.py +51 -6
  119. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_tsql.py +124 -1
  120. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/annotate_functions.sql +37 -5
  121. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +8 -1
  122. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/optimizer.sql +95 -56
  123. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/pushdown_projections.sql +21 -7
  124. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/qualify_columns.sql +110 -7
  125. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +4 -0
  126. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +2 -0
  127. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/qualify_tables.sql +8 -0
  128. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/simplify.sql +81 -0
  129. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_anonymize.py +7 -0
  130. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_build.py +6 -2
  131. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_executor.py +37 -2
  132. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_lineage.py +98 -28
  133. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_optimizer.py +280 -101
  134. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_parser.py +6 -0
  135. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_schema.py +31 -1
  136. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_transforms.py +24 -5
  137. sqlglot-30.20.0/sqlglot/optimizer/pushdown_projections.py +0 -394
  138. sqlglot-30.20.0/sqlglot/typing/tsql.py +0 -37
  139. sqlglot-30.20.0/sqlglot.egg-info/scm_version.json +0 -8
  140. {sqlglot-30.20.0 → sqlglot-30.22.0}/.gitignore +0 -0
  141. {sqlglot-30.20.0 → sqlglot-30.22.0}/.gitmodules +0 -0
  142. {sqlglot-30.20.0 → sqlglot-30.22.0}/.gitpod.yml +0 -0
  143. {sqlglot-30.20.0 → sqlglot-30.22.0}/.pre-commit-config.yaml +0 -0
  144. {sqlglot-30.20.0 → sqlglot-30.22.0}/AGENTS.md +0 -0
  145. {sqlglot-30.20.0 → sqlglot-30.22.0}/CLAUDE.md +0 -0
  146. {sqlglot-30.20.0 → sqlglot-30.22.0}/CONTRIBUTING.md +0 -0
  147. {sqlglot-30.20.0 → sqlglot-30.22.0}/LICENSE +0 -0
  148. {sqlglot-30.20.0 → sqlglot-30.22.0}/MANIFEST.in +0 -0
  149. {sqlglot-30.20.0 → sqlglot-30.22.0}/pyproject.toml +0 -0
  150. {sqlglot-30.20.0 → sqlglot-30.22.0}/setup.cfg +0 -0
  151. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/__main__.py +0 -0
  152. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/_typing.py +0 -0
  153. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/anonymize.py +0 -0
  154. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/__init__.py +0 -0
  155. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/databricks.py +0 -0
  156. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/dax.py +0 -0
  157. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/dremio.py +0 -0
  158. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/druid.py +0 -0
  159. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/dune.py +0 -0
  160. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/exasol.py +0 -0
  161. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/fabric.py +0 -0
  162. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/oracle.py +0 -0
  163. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/presto.py +0 -0
  164. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/prql.py +0 -0
  165. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/singlestore.py +0 -0
  166. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/solr.py +0 -0
  167. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/spark2.py +0 -0
  168. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/tableau.py +0 -0
  169. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/teradata.py +0 -0
  170. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/dialects/trino.py +0 -0
  171. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/diff.py +0 -0
  172. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/errors.py +0 -0
  173. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/executor/__init__.py +0 -0
  174. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/executor/context.py +0 -0
  175. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/executor/python.py +0 -0
  176. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/executor/table.py +0 -0
  177. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/__init__.py +0 -0
  178. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/aggregate.py +0 -0
  179. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/constraints.py +0 -0
  180. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/core.py +0 -0
  181. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/datatypes.py +0 -0
  182. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/dml.py +0 -0
  183. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/functions.py +0 -0
  184. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/json.py +0 -0
  185. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/math.py +0 -0
  186. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/expressions/temporal.py +0 -0
  187. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/__init__.py +0 -0
  188. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/databricks.py +0 -0
  189. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/dax.py +0 -0
  190. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/druid.py +0 -0
  191. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/dune.py +0 -0
  192. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/exasol.py +0 -0
  193. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/fabric.py +0 -0
  194. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/prql.py +0 -0
  195. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/python.py +0 -0
  196. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/solr.py +0 -0
  197. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/tableau.py +0 -0
  198. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/generators/teradata.py +0 -0
  199. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/helper.py +0 -0
  200. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/jsonpath.py +0 -0
  201. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/__init__.py +0 -0
  202. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/annotate_types.py +0 -0
  203. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/canonicalize.py +0 -0
  204. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
  205. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
  206. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
  207. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/helpers.py +0 -0
  208. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
  209. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/journal.py +0 -0
  210. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/merge_subqueries.py +0 -0
  211. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/normalize.py +0 -0
  212. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
  213. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/optimize_joins.py +0 -0
  214. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
  215. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/__init__.py +0 -0
  216. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/base.py +0 -0
  217. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/bigquery.py +0 -0
  218. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/databricks.py +0 -0
  219. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/dax.py +0 -0
  220. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/dremio.py +0 -0
  221. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/drill.py +0 -0
  222. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/druid.py +0 -0
  223. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/dune.py +0 -0
  224. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/exasol.py +0 -0
  225. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/fabric.py +0 -0
  226. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/materialize.py +0 -0
  227. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/oracle.py +0 -0
  228. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/presto.py +0 -0
  229. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/prql.py +0 -0
  230. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/redshift.py +0 -0
  231. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/risingwave.py +0 -0
  232. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/singlestore.py +0 -0
  233. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/solr.py +0 -0
  234. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/sqlite.py +0 -0
  235. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/tableau.py +0 -0
  236. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/parsers/teradata.py +0 -0
  237. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/py.typed +0 -0
  238. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/serde.py +0 -0
  239. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/time.py +0 -0
  240. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/trie.py +0 -0
  241. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/clickhouse.py +0 -0
  242. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/databricks.py +0 -0
  243. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/mysql.py +0 -0
  244. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/spark.py +0 -0
  245. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot/typing/spark2.py +0 -0
  246. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.egg-info/SOURCES.txt +0 -0
  247. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.egg-info/dependency_links.txt +0 -0
  248. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.egg-info/scm_file_list.json +0 -0
  249. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.egg-info/top_level.txt +0 -0
  250. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglot.png +0 -0
  251. {sqlglot-30.20.0 → sqlglot-30.22.0}/sqlglotc/MANIFEST.in +0 -0
  252. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/__init__.py +0 -0
  253. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/__init__.py +0 -0
  254. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_dax.py +0 -0
  255. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_doris.py +0 -0
  256. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_dremio.py +0 -0
  257. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_drill.py +0 -0
  258. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_druid.py +0 -0
  259. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_dune.py +0 -0
  260. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_exasol.py +0 -0
  261. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_fabric.py +0 -0
  262. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_materialize.py +0 -0
  263. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_pipe_syntax.py +0 -0
  264. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_prql.py +0 -0
  265. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_solr.py +0 -0
  266. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_sqlite.py +0 -0
  267. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_tableau.py +0 -0
  268. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/dialects/test_teradata.py +0 -0
  269. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/identity.sql +0 -0
  270. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/jsonpath/LICENSE +0 -0
  271. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/jsonpath/cts.json +0 -0
  272. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
  273. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
  274. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
  275. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
  276. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
  277. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
  278. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
  279. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/normalize.sql +0 -0
  280. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
  281. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
  282. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
  283. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
  284. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
  285. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
  286. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
  287. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
  288. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
  289. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
  290. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
  291. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
  292. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
  293. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
  294. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
  295. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
  296. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
  297. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
  298. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
  299. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
  300. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
  301. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
  302. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
  303. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
  304. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
  305. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
  306. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
  307. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
  308. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
  309. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
  310. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
  311. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
  312. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
  313. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
  314. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
  315. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
  316. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
  317. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
  318. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
  319. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
  320. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
  321. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/partial.sql +0 -0
  322. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/fixtures/pretty.sql +0 -0
  323. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/gen_fixtures.py +0 -0
  324. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/helpers.py +0 -0
  325. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/leakcheck.py +0 -0
  326. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/sqlglot/__init__.py +0 -0
  327. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_dialect_entry_points.py +0 -0
  328. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_dialect_imports.py +0 -0
  329. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_diff.py +0 -0
  330. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_docs.py +0 -0
  331. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_errors.py +0 -0
  332. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_expressions.py +0 -0
  333. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_generator.py +0 -0
  334. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_helper.py +0 -0
  335. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_integration_loader.py +0 -0
  336. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_jsonpath.py +0 -0
  337. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_serde.py +0 -0
  338. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_time.py +0 -0
  339. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_tokens.py +0 -0
  340. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_transpile.py +0 -0
  341. {sqlglot-30.20.0 → sqlglot-30.22.0}/tests/test_typing.py +0 -0
@@ -1,6 +1,128 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [v30.21.0] - 2026-09-30
5
+ ### :boom: BREAKING CHANGES
6
+ - 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))*:
7
+
8
+ annotate `bit_xor` for duckdb (#8452)
9
+
10
+ - 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))*:
11
+
12
+ new projection pushdown algorithm (#8440)
13
+
14
+ - 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))*:
15
+
16
+ decode backslash escape sequences in string literals (#8456)
17
+
18
+ - 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))*:
19
+
20
+ inherit Trino dialect, parser and generator defaults (#8464)
21
+
22
+ - 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))*:
23
+
24
+ preserve BD literal semantics in Hive and Spark (#8455)
25
+
26
+ - 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))*:
27
+
28
+ convert ARRAY_INSERT position between 0- and 1-based dialects [CLAUDE] (#8460)
29
+
30
+
31
+ ### :sparkles: New Features
32
+ - [`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))*
33
+ - [`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))*
34
+
35
+ ### :bug: Bug Fixes
36
+ - [`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))*
37
+ - [`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))*
38
+ - [`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))*
39
+ - :arrow_lower_right: *fixes issue [#4344](https://github.com/tobymao/sqlglot/issues/4344) opened by [@dylanscott](https://github.com/dylanscott)*
40
+ - :arrow_lower_right: *fixes issue [#8441](https://github.com/tobymao/sqlglot/issues/8441) opened by [@yvonne-chou-1](https://github.com/yvonne-chou-1)*
41
+ - [`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))*
42
+ - :arrow_lower_right: *fixes issue [#8458](https://github.com/tobymao/sqlglot/issues/8458) opened by [@deepyaman](https://github.com/deepyaman)*
43
+ - [`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))*
44
+ - [`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))*
45
+ - [`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))*
46
+ - [`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))*
47
+ - [`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))*
48
+ - :arrow_lower_right: *fixes issue [#8462](https://github.com/tobymao/sqlglot/issues/8462) opened by [@SoTrx](https://github.com/SoTrx)*
49
+ - [`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))*
50
+ - [`b54d32f`](https://github.com/tobymao/sqlglot/commit/b54d32f036d4c1158bb889324f4ac6d2846d2701) - **optimizer**: stop struct lookup at nearest alias [CODEX] *(commit by [@tobymao](https://github.com/tobymao))*
51
+ - [`5d16fa8`](https://github.com/tobymao/sqlglot/commit/5d16fa83bfb8f3582eaffa4b99c7d05a061d8a76) - **ci**: publish sqlglot independently of sqlglotc [CODEX] *(commit by [@tobymao](https://github.com/tobymao))*
52
+
53
+ ### :recycle: Refactors
54
+ - [`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))*
55
+ - [`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))*
56
+
57
+
58
+ ## [v30.20.0] - 2026-09-27
59
+ ### :boom: BREAKING CHANGES
60
+ - 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))*:
61
+
62
+ Fix mysql roundtrip for DATE_ADD and DATE_SUB (#8417)
63
+
64
+ - due to [`284ea43`](https://github.com/tobymao/sqlglot/commit/284ea43fe773762a1aa1556171bbb4c03a197788) - support IGNORE NULLS and RESPECT NULLS in window functions [CLAUDE] *(PR [#8412](https://github.com/tobymao/sqlglot/pull/8412) by [@UCHPUCHMAK](https://github.com/UCHPUCHMAK))*:
65
+
66
+ support IGNORE NULLS and RESPECT NULLS in window functions [CLAUDE] (#8412)
67
+
68
+ - due to [`abacf31`](https://github.com/tobymao/sqlglot/commit/abacf31d7b12b3bd70cd4a70b25cfcd2ad6c1f0a) - use row-preserving default projection for windowed aggregates *(PR [#8381](https://github.com/tobymao/sqlglot/pull/8381) by [@treysp](https://github.com/treysp))*:
69
+
70
+ use row-preserving default projection for windowed aggregates (#8381)
71
+
72
+ - due to [`a388416`](https://github.com/tobymao/sqlglot/commit/a3884168f639633fa8f64334bf63e4b343bedfe2) - retain json <string> literals closes [#8413](https://github.com/tobymao/sqlglot/pull/8413) *(commit by [@georgesittas](https://github.com/georgesittas))*:
73
+
74
+ retain json <string> literals closes #8413
75
+
76
+ - due to [`20fa8ae`](https://github.com/tobymao/sqlglot/commit/20fa8aedc48fccb780b973987908db63d0f76895) - keep `TRY_TO_NUMBER` safe when it falls back to a cast [CLAUDE] *(PR [#8424](https://github.com/tobymao/sqlglot/pull/8424) by [@anishmehta24](https://github.com/anishmehta24))*:
77
+
78
+ keep `TRY_TO_NUMBER` safe when it falls back to a cast [CLAUDE] (#8424)
79
+
80
+ - due to [`b85a8c8`](https://github.com/tobymao/sqlglot/commit/b85a8c8b0d107410f6689c2ddad0921dbff9ddad) - exponential AST growth prevention in merge_subqueries *(PR [#8427](https://github.com/tobymao/sqlglot/pull/8427) by [@georgesittas](https://github.com/georgesittas))*:
81
+
82
+ exponential AST growth prevention in merge_subqueries (#8427)
83
+
84
+ - due to [`4c11d07`](https://github.com/tobymao/sqlglot/commit/4c11d07af4b533274cabbcae9271234e9a0b039c) - avoid AUTOINCREMENT without a primary key *(PR [#8431](https://github.com/tobymao/sqlglot/pull/8431) by [@georgesittas](https://github.com/georgesittas))*:
85
+
86
+ avoid AUTOINCREMENT without a primary key (#8431)
87
+
88
+ - due to [`d2fbb21`](https://github.com/tobymao/sqlglot/commit/d2fbb215ff6bd548547a151e8838c277aad076c1) - preserve TIMESTAMP_FROM_PARTS time zones ([#8422](https://github.com/tobymao/sqlglot/pull/8422)) *(PR [#8434](https://github.com/tobymao/sqlglot/pull/8434) by [@georgesittas](https://github.com/georgesittas))*:
89
+
90
+ preserve TIMESTAMP_FROM_PARTS time zones (#8422) (#8434)
91
+
92
+ - due to [`afd6b69`](https://github.com/tobymao/sqlglot/commit/afd6b6946267b0b1100f48b299f3d44ff9a13767) - annotate `bit_or` for duckdb *(PR [#8438](https://github.com/tobymao/sqlglot/pull/8438) by [@deepika-kakde](https://github.com/deepika-kakde))*:
93
+
94
+ annotate `bit_or` for duckdb (#8438)
95
+
96
+ - due to [`8bd7686`](https://github.com/tobymao/sqlglot/commit/8bd768664197fbd0ed86158c0eca955c14f43328) - annotate `bit_and` for duckdb *(PR [#8439](https://github.com/tobymao/sqlglot/pull/8439) by [@Anuja006](https://github.com/Anuja006))*:
97
+
98
+ annotate `bit_and` for duckdb (#8439)
99
+
100
+
101
+ ### :sparkles: New Features
102
+ - [`a313c8b`](https://github.com/tobymao/sqlglot/commit/a313c8bee143b4b92c9a068fef72a5fd512bba61) - **parser**: support boolean expressions in update assignments closes [#8428](https://github.com/tobymao/sqlglot/pull/8428) *(commit by [@georgesittas](https://github.com/georgesittas))*
103
+ - [`afd6b69`](https://github.com/tobymao/sqlglot/commit/afd6b6946267b0b1100f48b299f3d44ff9a13767) - **optimizer**: annotate `bit_or` for duckdb *(PR [#8438](https://github.com/tobymao/sqlglot/pull/8438) by [@deepika-kakde](https://github.com/deepika-kakde))*
104
+ - [`8bd7686`](https://github.com/tobymao/sqlglot/commit/8bd768664197fbd0ed86158c0eca955c14f43328) - **optimizer**: annotate `bit_and` for duckdb *(PR [#8439](https://github.com/tobymao/sqlglot/pull/8439) by [@Anuja006](https://github.com/Anuja006))*
105
+
106
+ ### :bug: Bug Fixes
107
+ - [`1d0e3f3`](https://github.com/tobymao/sqlglot/commit/1d0e3f34864037c54cf6bdf45af594db62ad7319) - **mysql**: 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))*
108
+ - :arrow_lower_right: *fixes issue [#8392](https://github.com/tobymao/sqlglot/issues/8392) opened by [@linchangyang-sg](https://github.com/linchangyang-sg)*
109
+ - [`284ea43`](https://github.com/tobymao/sqlglot/commit/284ea43fe773762a1aa1556171bbb4c03a197788) - **starrocks**: support IGNORE NULLS and RESPECT NULLS in window functions [CLAUDE] *(PR [#8412](https://github.com/tobymao/sqlglot/pull/8412) by [@UCHPUCHMAK](https://github.com/UCHPUCHMAK))*
110
+ - [`abacf31`](https://github.com/tobymao/sqlglot/commit/abacf31d7b12b3bd70cd4a70b25cfcd2ad6c1f0a) - **optimizer**: use row-preserving default projection for windowed aggregates *(PR [#8381](https://github.com/tobymao/sqlglot/pull/8381) by [@treysp](https://github.com/treysp))*
111
+ - [`a388416`](https://github.com/tobymao/sqlglot/commit/a3884168f639633fa8f64334bf63e4b343bedfe2) - retain json <string> literals closes [#8413](https://github.com/tobymao/sqlglot/pull/8413) *(commit by [@georgesittas](https://github.com/georgesittas))*
112
+ - [`32a9297`](https://github.com/tobymao/sqlglot/commit/32a9297a24f06035293a2a3e935a7b65ece25755) - **optimizer**: avoid accumulating parentheses when merging repeated references *(PR [#8425](https://github.com/tobymao/sqlglot/pull/8425) by [@georgesittas](https://github.com/georgesittas))*
113
+ - [`20fa8ae`](https://github.com/tobymao/sqlglot/commit/20fa8aedc48fccb780b973987908db63d0f76895) - keep `TRY_TO_NUMBER` safe when it falls back to a cast [CLAUDE] *(PR [#8424](https://github.com/tobymao/sqlglot/pull/8424) by [@anishmehta24](https://github.com/anishmehta24))*
114
+ - [`b85a8c8`](https://github.com/tobymao/sqlglot/commit/b85a8c8b0d107410f6689c2ddad0921dbff9ddad) - **optimizer**: exponential AST growth prevention in merge_subqueries *(PR [#8427](https://github.com/tobymao/sqlglot/pull/8427) by [@georgesittas](https://github.com/georgesittas))*
115
+ - [`8d9f5d0`](https://github.com/tobymao/sqlglot/commit/8d9f5d08cce4b72b4df1a8f6394c2aa043cc7de8) - **parser**: handle singular ROW in FETCH and OFFSET clauses closes [#8429](https://github.com/tobymao/sqlglot/pull/8429) *(commit by [@georgesittas](https://github.com/georgesittas))*
116
+ - [`981e492`](https://github.com/tobymao/sqlglot/commit/981e492413740f7740d2b0288e3da5b4028c767e) - **clickhouse**: preserve GLOBAL JOIN after ON conditions fixes [#8426](https://github.com/tobymao/sqlglot/pull/8426) *(commit by [@georgesittas](https://github.com/georgesittas))*
117
+ - [`4c11d07`](https://github.com/tobymao/sqlglot/commit/4c11d07af4b533274cabbcae9271234e9a0b039c) - **sqlite**: avoid AUTOINCREMENT without a primary key *(PR [#8431](https://github.com/tobymao/sqlglot/pull/8431) by [@georgesittas](https://github.com/georgesittas))*
118
+ - :arrow_lower_right: *fixes issue [#8423](https://github.com/tobymao/sqlglot/issues/8423) opened by [@Rodrigo-Palma](https://github.com/Rodrigo-Palma)*
119
+ - [`87b1402`](https://github.com/tobymao/sqlglot/commit/87b14027372c3820cbf6c89bc8adc2cbf8963404) - **optimizer**: preserve grouping when complementing comparisons *(PR [#8433](https://github.com/tobymao/sqlglot/pull/8433) by [@georgesittas](https://github.com/georgesittas))*
120
+ - :arrow_lower_right: *fixes issue [#8421](https://github.com/tobymao/sqlglot/issues/8421) opened by [@Rodrigo-Palma](https://github.com/Rodrigo-Palma)*
121
+ - [`d2fbb21`](https://github.com/tobymao/sqlglot/commit/d2fbb215ff6bd548547a151e8838c277aad076c1) - **duckdb**: preserve TIMESTAMP_FROM_PARTS time zones ([#8422](https://github.com/tobymao/sqlglot/pull/8422)) *(PR [#8434](https://github.com/tobymao/sqlglot/pull/8434) by [@georgesittas](https://github.com/georgesittas))*
122
+ - :arrow_lower_right: *fixes issue [#8422](https://github.com/tobymao/sqlglot/issues/8422) opened by [@Rodrigo-Palma](https://github.com/Rodrigo-Palma)*
123
+ - [`d01e946`](https://github.com/tobymao/sqlglot/commit/d01e9461a7a3fcbe50a965c7a2ddf55d41aca97d) - **optimizer**: preserve ordinal ordering with duplicate aliases [CODEX] *(PR [#8436](https://github.com/tobymao/sqlglot/pull/8436) by [@tobymao](https://github.com/tobymao))*
124
+
125
+
4
126
  ## [v30.19.0] - 2026-09-22
5
127
  ### :boom: BREAKING CHANGES
6
128
  - due to [`bbb717e`](https://github.com/tobymao/sqlglot/commit/bbb717ebb24c8dcbee94d77c9154e74da1dc6c10) - rename union scope type to set operation for consistency *(PR [#8306](https://github.com/tobymao/sqlglot/pull/8306) by [@georgesittas](https://github.com/georgesittas))*:
@@ -15921,3 +16043,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
15921
16043
  [v30.17.0]: https://github.com/tobymao/sqlglot/compare/v30.16.0...v30.17.0
15922
16044
  [v30.18.0]: https://github.com/tobymao/sqlglot/compare/v30.17.0...v30.18.0
15923
16045
  [v30.19.0]: https://github.com/tobymao/sqlglot/compare/v30.18.0...v30.19.0
16046
+ [v30.20.0]: https://github.com/tobymao/sqlglot/compare/v30.19.0...v30.20.0
16047
+ [v30.21.0]: https://github.com/tobymao/sqlglot/compare/v30.20.0...v30.21.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.20.0
3
+ Version: 30.22.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.20.0; python_version >= "3.10" and extra == "c"
37
+ Requires-Dist: sqlglotc==30.22.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.20.0; python_version >= "3.10" and extra == "rs"
40
+ Requires-Dist: sqlglotc==30.22.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.20.0'
22
- __version_tuple__ = version_tuple = (30, 20, 0)
21
+ __version__ = version = '30.22.0'
22
+ __version_tuple__ = version_tuple = (30, 22, 0)
23
23
 
24
- __commit_id__ = commit_id = 'g8bd768664'
24
+ __commit_id__ = commit_id = 'gb8333a81f'
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
 
4
4
  from sqlglot import tokens
5
- from sqlglot.dialects.dialect import Dialect, DialectType
5
+ from sqlglot.dialects.dialect import DialectType
6
6
  from sqlglot.generators.athena import AthenaGenerator
7
7
  from sqlglot.parsers.athena import AthenaParser
8
8
  from sqlglot.tokens import TokenType, Token
@@ -10,7 +10,7 @@ from sqlglot.dialects.trino import Trino
10
10
  from sqlglot.dialects.hive import Hive
11
11
 
12
12
 
13
- class Athena(Dialect):
13
+ class Athena(Trino):
14
14
  """
15
15
  Over the years, it looks like AWS has taken various execution engines, bolted on AWS-specific
16
16
  modifications and then built the Athena service around them.
@@ -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 = ["`"]
@@ -19,7 +19,7 @@ class ClickHouse(Dialect):
19
19
  SUPPORTS_USER_DEFINED_TYPES = False
20
20
  LOG_BASE_FIRST: bool | None = None
21
21
  FORCE_EARLY_ALIAS_REF_EXPANSION = True
22
- PRESERVE_ORIGINAL_NAMES = True
22
+ ORIGINAL_NAME_META_KEY = "clickhouse_name"
23
23
  NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
24
24
  IDENTIFIERS_CAN_START_WITH_DIGIT = True
25
25
  HEX_STRING_IS_INTEGER_TYPE = True
@@ -31,6 +31,13 @@ class ClickHouse(Dialect):
31
31
 
32
32
  UNESCAPED_SEQUENCES = {
33
33
  "\\0": "\0",
34
+ "\\e": "\x1b",
35
+ "\\N": "",
36
+ "\\/": "/",
37
+ '\\"': '"',
38
+ "\\=": "=",
39
+ "\\`": "`",
40
+ **{"\\" + chr(i): chr(i) for i in range(1, 32)},
34
41
  }
35
42
 
36
43
  CREATABLE_KIND_MAPPING = {"DATABASE": "SCHEMA"}
@@ -68,7 +75,10 @@ class ClickHouse(Dialect):
68
75
  return column_aliases
69
76
 
70
77
  class Tokenizer(tokens.Tokenizer):
78
+ NUMERIC_ESCAPES = {"x": (16, 2, 2, 0xFF)}
79
+ NUMERIC_ESCAPES_ARE_BYTES = True
71
80
  COMMENTS = ["--", "#", "#!", ("/*", "*/")]
81
+ COMMENTS_TERMINATE_AT_NEWLINE_ONLY = True
72
82
  IDENTIFIERS = ['"', "`"]
73
83
  IDENTIFIER_ESCAPES = ["\\"]
74
84
  STRING_ESCAPES = ["'", "\\"]