sqlglot 30.8.0__tar.gz → 30.10.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 (328) hide show
  1. {sqlglot-30.8.0 → sqlglot-30.10.0}/CHANGELOG.md +223 -0
  2. {sqlglot-30.8.0 → sqlglot-30.10.0}/Makefile +24 -2
  3. {sqlglot-30.8.0/sqlglot.egg-info → sqlglot-30.10.0}/PKG-INFO +4 -4
  4. {sqlglot-30.8.0 → sqlglot-30.10.0}/setup.py +1 -1
  5. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/_typing.py +11 -2
  6. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/_version.py +3 -3
  7. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/bigquery.py +10 -0
  8. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/dialect.py +5 -0
  9. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/duckdb.py +1 -0
  10. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/oracle.py +2 -0
  11. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/postgres.py +3 -0
  12. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/presto.py +1 -0
  13. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/spark.py +1 -0
  14. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/aggregate.py +1 -1
  15. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/core.py +33 -12
  16. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/datatypes.py +17 -5
  17. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/ddl.py +8 -0
  18. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/dml.py +1 -0
  19. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/functions.py +10 -1
  20. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/properties.py +4 -0
  21. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/query.py +12 -4
  22. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/string.py +1 -0
  23. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generator.py +166 -13
  24. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/bigquery.py +6 -0
  25. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/clickhouse.py +1 -1
  26. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/databricks.py +4 -0
  27. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/duckdb.py +60 -0
  28. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/exasol.py +6 -0
  29. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/mysql.py +37 -0
  30. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/oracle.py +10 -2
  31. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/presto.py +2 -6
  32. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/snowflake.py +0 -3
  33. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/sqlite.py +39 -10
  34. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/starrocks.py +5 -2
  35. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/tsql.py +18 -7
  36. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/jsonpath.py +2 -1
  37. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/annotate_types.py +10 -0
  38. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/canonicalize.py +1 -1
  39. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/merge_subqueries.py +1 -1
  40. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/normalize.py +20 -10
  41. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/pushdown_projections.py +12 -0
  42. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify_columns.py +2 -2
  43. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/simplify.py +31 -3
  44. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/unnest_subqueries.py +10 -1
  45. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parser.py +134 -23
  46. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/bigquery.py +29 -2
  47. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/clickhouse.py +9 -3
  48. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/databricks.py +5 -0
  49. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/duckdb.py +1 -0
  50. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/oracle.py +21 -0
  51. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/snowflake.py +16 -1
  52. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/spark2.py +1 -0
  53. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/tsql.py +72 -10
  54. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/serde.py +1 -1
  55. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/tokenizer_core.py +1 -0
  56. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/tokens.py +1 -0
  57. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/__init__.py +14 -1
  58. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/bigquery.py +0 -9
  59. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/duckdb.py +1 -0
  60. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/hive.py +6 -0
  61. sqlglot-30.10.0/sqlglot/typing/postgres.py +11 -0
  62. sqlglot-30.10.0/sqlglot/typing/redshift.py +17 -0
  63. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/snowflake.py +4 -0
  64. sqlglot-30.10.0/sqlglot/typing/spark2.py +81 -0
  65. {sqlglot-30.8.0 → sqlglot-30.10.0/sqlglot.egg-info}/PKG-INFO +4 -4
  66. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot.egg-info/SOURCES.txt +1 -0
  67. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot.egg-info/requires.txt +3 -3
  68. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglotc/pyproject.toml +2 -2
  69. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_bigquery.py +65 -0
  70. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_clickhouse.py +15 -6
  71. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_databricks.py +6 -0
  72. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_dialect.py +12 -0
  73. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_duckdb.py +36 -0
  74. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_exasol.py +14 -2
  75. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_hive.py +3 -3
  76. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_mysql.py +58 -1
  77. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_oracle.py +13 -0
  78. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_pipe_syntax.py +24 -8
  79. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_postgres.py +41 -1
  80. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_snowflake.py +2 -2
  81. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_spark.py +3 -3
  82. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_sqlite.py +19 -0
  83. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_starrocks.py +2 -2
  84. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_tsql.py +120 -0
  85. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/annotate_functions.sql +167 -0
  86. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/normalize.sql +3 -0
  87. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/optimizer.sql +2 -2
  88. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_projections.sql +16 -0
  89. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns.sql +12 -0
  90. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +7 -12
  91. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/unnest_subqueries.sql +12 -0
  92. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/leakcheck.py +5 -1
  93. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_build.py +2 -2
  94. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_expressions.py +6 -0
  95. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_jsonpath.py +8 -0
  96. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_optimizer.py +18 -0
  97. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_transpile.py +43 -0
  98. sqlglot-30.8.0/sqlglot/typing/redshift.py +0 -11
  99. sqlglot-30.8.0/sqlglot/typing/spark2.py +0 -86
  100. {sqlglot-30.8.0 → sqlglot-30.10.0}/.gitignore +0 -0
  101. {sqlglot-30.8.0 → sqlglot-30.10.0}/.gitmodules +0 -0
  102. {sqlglot-30.8.0 → sqlglot-30.10.0}/.gitpod.yml +0 -0
  103. {sqlglot-30.8.0 → sqlglot-30.10.0}/.pre-commit-config.yaml +0 -0
  104. {sqlglot-30.8.0 → sqlglot-30.10.0}/AGENTS.md +0 -0
  105. {sqlglot-30.8.0 → sqlglot-30.10.0}/CLAUDE.md +0 -0
  106. {sqlglot-30.8.0 → sqlglot-30.10.0}/CONTRIBUTING.md +0 -0
  107. {sqlglot-30.8.0 → sqlglot-30.10.0}/LICENSE +0 -0
  108. {sqlglot-30.8.0 → sqlglot-30.10.0}/MANIFEST.in +0 -0
  109. {sqlglot-30.8.0 → sqlglot-30.10.0}/README.md +0 -0
  110. {sqlglot-30.8.0 → sqlglot-30.10.0}/pyproject.toml +0 -0
  111. {sqlglot-30.8.0 → sqlglot-30.10.0}/setup.cfg +0 -0
  112. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/__init__.py +0 -0
  113. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/__main__.py +0 -0
  114. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/__init__.py +0 -0
  115. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/athena.py +0 -0
  116. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/clickhouse.py +0 -0
  117. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/databricks.py +0 -0
  118. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/doris.py +0 -0
  119. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/dremio.py +0 -0
  120. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/drill.py +0 -0
  121. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/druid.py +0 -0
  122. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/dune.py +0 -0
  123. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/exasol.py +0 -0
  124. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/fabric.py +0 -0
  125. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/hive.py +0 -0
  126. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/materialize.py +0 -0
  127. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/mysql.py +0 -0
  128. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/prql.py +0 -0
  129. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/redshift.py +0 -0
  130. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/risingwave.py +0 -0
  131. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/singlestore.py +0 -0
  132. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/snowflake.py +0 -0
  133. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/solr.py +0 -0
  134. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/spark2.py +0 -0
  135. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/sqlite.py +0 -0
  136. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/starrocks.py +0 -0
  137. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/tableau.py +0 -0
  138. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/teradata.py +0 -0
  139. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/trino.py +0 -0
  140. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/dialects/tsql.py +0 -0
  141. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/diff.py +0 -0
  142. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/errors.py +0 -0
  143. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/executor/__init__.py +0 -0
  144. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/executor/context.py +0 -0
  145. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/executor/env.py +0 -0
  146. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/executor/python.py +0 -0
  147. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/executor/table.py +0 -0
  148. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/__init__.py +0 -0
  149. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/array.py +0 -0
  150. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/builders.py +0 -0
  151. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/constraints.py +0 -0
  152. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/json.py +0 -0
  153. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/math.py +0 -0
  154. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/expressions/temporal.py +0 -0
  155. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/__init__.py +0 -0
  156. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/athena.py +0 -0
  157. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/doris.py +0 -0
  158. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/dremio.py +0 -0
  159. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/drill.py +0 -0
  160. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/druid.py +0 -0
  161. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/dune.py +0 -0
  162. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/fabric.py +0 -0
  163. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/hive.py +0 -0
  164. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/materialize.py +0 -0
  165. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/postgres.py +0 -0
  166. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/prql.py +0 -0
  167. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/python.py +0 -0
  168. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/redshift.py +0 -0
  169. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/risingwave.py +0 -0
  170. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/singlestore.py +0 -0
  171. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/solr.py +0 -0
  172. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/spark.py +0 -0
  173. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/spark2.py +0 -0
  174. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/tableau.py +0 -0
  175. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/teradata.py +0 -0
  176. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/generators/trino.py +0 -0
  177. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/helper.py +0 -0
  178. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/lineage.py +0 -0
  179. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/__init__.py +0 -0
  180. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
  181. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
  182. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
  183. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
  184. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
  185. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
  186. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/optimize_joins.py +0 -0
  187. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/optimizer.py +0 -0
  188. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
  189. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify.py +0 -0
  190. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify_tables.py +0 -0
  191. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/resolver.py +0 -0
  192. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/optimizer/scope.py +0 -0
  193. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/__init__.py +0 -0
  194. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/athena.py +0 -0
  195. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/base.py +0 -0
  196. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/doris.py +0 -0
  197. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/dremio.py +0 -0
  198. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/drill.py +0 -0
  199. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/druid.py +0 -0
  200. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/dune.py +0 -0
  201. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/exasol.py +0 -0
  202. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/fabric.py +0 -0
  203. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/hive.py +0 -0
  204. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/materialize.py +0 -0
  205. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/mysql.py +0 -0
  206. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/postgres.py +0 -0
  207. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/presto.py +0 -0
  208. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/prql.py +0 -0
  209. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/redshift.py +0 -0
  210. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/risingwave.py +0 -0
  211. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/singlestore.py +0 -0
  212. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/solr.py +0 -0
  213. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/spark.py +0 -0
  214. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/sqlite.py +0 -0
  215. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/starrocks.py +0 -0
  216. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/tableau.py +0 -0
  217. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/teradata.py +0 -0
  218. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/parsers/trino.py +0 -0
  219. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/planner.py +0 -0
  220. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/py.typed +0 -0
  221. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/schema.py +0 -0
  222. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/time.py +0 -0
  223. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/transforms.py +0 -0
  224. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/trie.py +0 -0
  225. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/clickhouse.py +0 -0
  226. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/mysql.py +0 -0
  227. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/presto.py +0 -0
  228. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/spark.py +0 -0
  229. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot/typing/tsql.py +0 -0
  230. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot.egg-info/dependency_links.txt +0 -0
  231. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot.egg-info/top_level.txt +0 -0
  232. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglot.png +0 -0
  233. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglotc/MANIFEST.in +0 -0
  234. {sqlglot-30.8.0 → sqlglot-30.10.0}/sqlglotc/setup.py +0 -0
  235. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/__init__.py +0 -0
  236. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/__init__.py +0 -0
  237. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_athena.py +0 -0
  238. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_doris.py +0 -0
  239. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_dremio.py +0 -0
  240. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_drill.py +0 -0
  241. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_druid.py +0 -0
  242. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_dune.py +0 -0
  243. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_fabric.py +0 -0
  244. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_materialize.py +0 -0
  245. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_presto.py +0 -0
  246. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_prql.py +0 -0
  247. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_redshift.py +0 -0
  248. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_risingwave.py +0 -0
  249. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_singlestore.py +0 -0
  250. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_solr.py +0 -0
  251. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_tableau.py +0 -0
  252. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_teradata.py +0 -0
  253. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/dialects/test_trino.py +0 -0
  254. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/identity.sql +0 -0
  255. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/jsonpath/LICENSE +0 -0
  256. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/jsonpath/cts.json +0 -0
  257. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
  258. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
  259. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
  260. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
  261. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
  262. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
  263. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
  264. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
  265. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
  266. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
  267. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
  268. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
  269. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
  270. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
  271. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
  272. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
  273. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
  274. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/simplify.sql +0 -0
  275. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
  276. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
  277. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
  278. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
  279. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
  280. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
  281. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
  282. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
  283. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
  284. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
  285. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
  286. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
  287. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
  288. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
  289. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
  290. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
  291. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
  292. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
  293. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
  294. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
  295. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
  296. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
  297. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
  298. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
  299. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
  300. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
  301. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
  302. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
  303. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
  304. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
  305. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
  306. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
  307. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
  308. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/partial.sql +0 -0
  309. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/fixtures/pretty.sql +0 -0
  310. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/gen_fixtures.py +0 -0
  311. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/helpers.py +0 -0
  312. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/sqlglot/__init__.py +0 -0
  313. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_dialect_entry_points.py +0 -0
  314. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_dialect_imports.py +0 -0
  315. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_diff.py +0 -0
  316. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_docs.py +0 -0
  317. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_errors.py +0 -0
  318. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_executor.py +0 -0
  319. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_generator.py +0 -0
  320. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_helper.py +0 -0
  321. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_integration_loader.py +0 -0
  322. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_lineage.py +0 -0
  323. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_parser.py +0 -0
  324. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_schema.py +0 -0
  325. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_serde.py +0 -0
  326. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_time.py +0 -0
  327. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_tokens.py +0 -0
  328. {sqlglot-30.8.0 → sqlglot-30.10.0}/tests/test_transforms.py +0 -0
@@ -1,6 +1,227 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [v30.9.0] - 2026-06-04
5
+ ### :boom: BREAKING CHANGES
6
+ - due to [`a40dde9`](https://github.com/tobymao/sqlglot/commit/a40dde9d3992b2b1df4f4ff5dccde240d618dabd) - delimited global/temp table references closes [#7657](https://github.com/tobymao/sqlglot/pull/7657) *(commit by [@georgesittas](https://github.com/georgesittas))*:
7
+
8
+ delimited global/temp table references closes #7657
9
+
10
+ - due to [`cc3f980`](https://github.com/tobymao/sqlglot/commit/cc3f98093d4968400a32434cd23deee6817a21c8) - improve datatype typing *(PR [#7654](https://github.com/tobymao/sqlglot/pull/7654) by [@OutSquareCapital](https://github.com/OutSquareCapital))*:
11
+
12
+ improve datatype typing (#7654)
13
+
14
+ - due to [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*:
15
+
16
+ rename `Distance3d` to `DistanceNd`
17
+
18
+ - due to [`0e9e0a4`](https://github.com/tobymao/sqlglot/commit/0e9e0a483b3207a573ba07023d4071d1b9ddc181) - qualify column reference in NULLS LAST CASE simulation *(PR [#7641](https://github.com/tobymao/sqlglot/pull/7641) by [@brdbry](https://github.com/brdbry))*:
19
+
20
+ qualify column reference in NULLS LAST CASE simulation (#7641)
21
+
22
+ - due to [`edf731c`](https://github.com/tobymao/sqlglot/commit/edf731c119d16de54260ea9098acd4e9dab60d94) - propagate type through Lag/Lead/NthValue window functions [CLAUDE] *(PR [#7652](https://github.com/tobymao/sqlglot/pull/7652) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
23
+
24
+ propagate type through Lag/Lead/NthValue window functions [CLAUDE] (#7652)
25
+
26
+ - due to [`4698d08`](https://github.com/tobymao/sqlglot/commit/4698d087f107c665b6a04ac3329e3b86081367b8) - annotate ranking window functions with constant return types [CLAUDE] *(PR [#7658](https://github.com/tobymao/sqlglot/pull/7658) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
27
+
28
+ annotate ranking window functions with constant return types [CLAUDE] (#7658)
29
+
30
+ - due to [`0be0887`](https://github.com/tobymao/sqlglot/commit/0be088726ed210eb3ae3c8632f9f89cb69289b44) - skip unnesting NOT IN to preserve NULL semantics *(PR [#7671](https://github.com/tobymao/sqlglot/pull/7671) by [@georgesittas](https://github.com/georgesittas))*:
31
+
32
+ skip unnesting NOT IN to preserve NULL semantics (#7671)
33
+
34
+ - due to [`cd06eb6`](https://github.com/tobymao/sqlglot/commit/cd06eb60af44fdf56e7d5dee9fe173e56bc6f521) - support INSERT IGNORE and offset-only limits [CODEX] *(PR [#7674](https://github.com/tobymao/sqlglot/pull/7674) by [@russellromney](https://github.com/russellromney))*:
35
+
36
+ support INSERT IGNORE and offset-only limits [CODEX] (#7674)
37
+
38
+ - due to [`c3fa1ce`](https://github.com/tobymao/sqlglot/commit/c3fa1ced5d7fce8f3546cc01f9f604ca4ad41859) - CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] *(PR [#7661](https://github.com/tobymao/sqlglot/pull/7661) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
39
+
40
+ CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] (#7661)
41
+
42
+ - due to [`603433d`](https://github.com/tobymao/sqlglot/commit/603433d273b5f6cca8ddb2da9f0336515b985755) - fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
43
+
44
+ fix for Snowflake transpilation issue related to PIVOT and string literal column names (#7660)
45
+
46
+ - due to [`3e42f92`](https://github.com/tobymao/sqlglot/commit/3e42f927cf1deb65eafc0eea5904507fe613795b) - parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` *(PR [#7702](https://github.com/tobymao/sqlglot/pull/7702) by [@georgesittas](https://github.com/georgesittas))*:
47
+
48
+ parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` (#7702)
49
+
50
+ - due to [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*:
51
+
52
+ bump sqlglot-mypy
53
+
54
+
55
+ ### :sparkles: New Features
56
+ - [`f8b184e`](https://github.com/tobymao/sqlglot/commit/f8b184e3e62ca9964dc8f4b5cbf0b52a1913dfce) - **mysql**: transpile `MAKE_INTERVAL` closes [#7646](https://github.com/tobymao/sqlglot/pull/7646) *(commit by [@georgesittas](https://github.com/georgesittas))*
57
+ - [`2f2dd8c`](https://github.com/tobymao/sqlglot/commit/2f2dd8cbd39350850b5a4f40946b1f53c1f8c4df) - **duckdb**: Add transpilation unsupported for GET_IGNORE_CASE function *(PR [#7642](https://github.com/tobymao/sqlglot/pull/7642) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
58
+ - [`10af777`](https://github.com/tobymao/sqlglot/commit/10af7778250f17d262626b7042f7d7e4f4f9c5e2) - **tsql**: support FOR JSON clause [CLAUDE] *(PR [#7649](https://github.com/tobymao/sqlglot/pull/7649) by [@lvanoverberghe](https://github.com/lvanoverberghe))*
59
+ - [`cc448ac`](https://github.com/tobymao/sqlglot/commit/cc448ac4809f52b7d458aef220eee8ff7b838d7f) - **postgres**: add support for PostGIS 3D distance operator <<->> *(PR [#7655](https://github.com/tobymao/sqlglot/pull/7655) by [@vnataliia](https://github.com/vnataliia))*
60
+ - [`edf731c`](https://github.com/tobymao/sqlglot/commit/edf731c119d16de54260ea9098acd4e9dab60d94) - **annotate_types**: propagate type through Lag/Lead/NthValue window functions [CLAUDE] *(PR [#7652](https://github.com/tobymao/sqlglot/pull/7652) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
61
+ - [`4698d08`](https://github.com/tobymao/sqlglot/commit/4698d087f107c665b6a04ac3329e3b86081367b8) - **annotate_types**: annotate ranking window functions with constant return types [CLAUDE] *(PR [#7658](https://github.com/tobymao/sqlglot/pull/7658) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
62
+ - [`33b31be`](https://github.com/tobymao/sqlglot/commit/33b31be8255d45a464cd119fe4d16c3438ff3be3) - **snowflake**: support `OBJECT_AGG(DISTINCT ...)` *(commit by [@georgesittas](https://github.com/georgesittas))*
63
+ - [`6084d34`](https://github.com/tobymao/sqlglot/commit/6084d3409571f607c2783e7363c5ec7d34fd1e9c) - **oracle**: add support for `^=` not-equals operator closes [#7662](https://github.com/tobymao/sqlglot/pull/7662) *(commit by [@georgesittas](https://github.com/georgesittas))*
64
+ - [`e0c1933`](https://github.com/tobymao/sqlglot/commit/e0c193375fa590e2dbc7ea76a40c68b9cbd2a3ed) - **optimizer**: annotate types for CovarPop/Samp, PercentileCont/Disc, and WithinGroup [CLAUDE] *(PR [#7656](https://github.com/tobymao/sqlglot/pull/7656) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
65
+ - [`e5c6b6a`](https://github.com/tobymao/sqlglot/commit/e5c6b6a8b7e3ecd3abe4f3cc69178b2b51ddb8f7) - **bigquery**: support LOAD DATA INTO TEMP TABLE syntax *(PR [#7675](https://github.com/tobymao/sqlglot/pull/7675) by [@simonlourson](https://github.com/simonlourson))*
66
+ - [`9e6faab`](https://github.com/tobymao/sqlglot/commit/9e6faabb7c317eda92aa3b08736354017ee6cf0f) - **bigquery**: support LOAD DATA INTO TEMP TABLE syntax *(PR [#7675](https://github.com/tobymao/sqlglot/pull/7675) by [@simonlourson](https://github.com/simonlourson))*
67
+ - [`bd4a397`](https://github.com/tobymao/sqlglot/commit/bd4a3971f4c7ed9b297bf2d37790596b01ea52f0) - **oracle**: support `DEFAULT` clause in `TO_NUMBER` func closes [#7685](https://github.com/tobymao/sqlglot/pull/7685) *(commit by [@georgesittas](https://github.com/georgesittas))*
68
+ - [`96a90be`](https://github.com/tobymao/sqlglot/commit/96a90befb8493a70c6bd98e7f252480b23803eb1) - **duckdb**: add support for overloaded `MACRO` DDL syntax *(PR [#7690](https://github.com/tobymao/sqlglot/pull/7690) by [@georgesittas](https://github.com/georgesittas))*
69
+ - :arrow_lower_right: *addresses issue [#7688](https://github.com/tobymao/sqlglot/issues/7688) opened by [@VBobCat](https://github.com/VBobCat)*
70
+ - [`13a8b8d`](https://github.com/tobymao/sqlglot/commit/13a8b8db69d97613b2444fc9aa0721f7947a9c87) - **exasol**: transpile MySQL `SHOW DATABASES/SCHEMAS` to `SELECT` over `SYS.EXA_SCHEMAS` *(PR [#7695](https://github.com/tobymao/sqlglot/pull/7695) by [@mariadb-AllenHerrera](https://github.com/mariadb-AllenHerrera))*
71
+ - [`e23a9ee`](https://github.com/tobymao/sqlglot/commit/e23a9eeceaff20e9655eb323e6a364f83a10acf2) - **duckdb**: Add transpilation support for BOOLEAN and TEXT cases of TRY_CAST function *(PR [#7681](https://github.com/tobymao/sqlglot/pull/7681) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
72
+
73
+ ### :bug: Bug Fixes
74
+ - [`0a43a44`](https://github.com/tobymao/sqlglot/commit/0a43a44d7613de5e39d9b72e706af7510a56b6a8) - **optimizer**: guard against None type in _coerce_datediff_args *(PR [#7647](https://github.com/tobymao/sqlglot/pull/7647) by [@fangzheng](https://github.com/fangzheng))*
75
+ - [`a40dde9`](https://github.com/tobymao/sqlglot/commit/a40dde9d3992b2b1df4f4ff5dccde240d618dabd) - **tsql**: delimited global/temp table references closes [#7657](https://github.com/tobymao/sqlglot/pull/7657) *(commit by [@georgesittas](https://github.com/georgesittas))*
76
+ - [`c19bb4b`](https://github.com/tobymao/sqlglot/commit/c19bb4b3d7282f2da5eea7f3dc76c1a270ff909d) - **parser**: Avoid `__tmp#` CTEs getting replaced with outer CTEs for pipe syntax *(PR [#7659](https://github.com/tobymao/sqlglot/pull/7659) by [@sean-rose](https://github.com/sean-rose))*
77
+ - [`0e9e0a4`](https://github.com/tobymao/sqlglot/commit/0e9e0a483b3207a573ba07023d4071d1b9ddc181) - **mysql**: qualify column reference in NULLS LAST CASE simulation *(PR [#7641](https://github.com/tobymao/sqlglot/pull/7641) by [@brdbry](https://github.com/brdbry))*
78
+ - [`b748094`](https://github.com/tobymao/sqlglot/commit/b74809445223d6d02b4b26a45cc72119e09ef574) - raise ParseError, not IndexError, on an unclosed JSONPath filter *(PR [#7665](https://github.com/tobymao/sqlglot/pull/7665) by [@c-tonneslan](https://github.com/c-tonneslan))*
79
+ - [`f173fde`](https://github.com/tobymao/sqlglot/commit/f173fde381c2a1eeaa69127e56d1d2087828f3b7) - **optimizer**: `unnest_subqueries` produces invalid column references when subquery contains a UNION *(PR [#7667](https://github.com/tobymao/sqlglot/pull/7667) by [@snovik75](https://github.com/snovik75))*
80
+ - :arrow_lower_right: *fixes issue [#7666](https://github.com/tobymao/sqlglot/issues/7666) opened by [@wzhseno](https://github.com/wzhseno)*
81
+ - [`0be0887`](https://github.com/tobymao/sqlglot/commit/0be088726ed210eb3ae3c8632f9f89cb69289b44) - **optimizer**: skip unnesting NOT IN to preserve NULL semantics *(PR [#7671](https://github.com/tobymao/sqlglot/pull/7671) by [@georgesittas](https://github.com/georgesittas))*
82
+ - [`5683e3d`](https://github.com/tobymao/sqlglot/commit/5683e3df9926f25e8d60e65c93851c8035db0cb0) - improve transpilation of `e'...'` strings *(PR [#7677](https://github.com/tobymao/sqlglot/pull/7677) by [@SAY-5](https://github.com/SAY-5))*
83
+ - :arrow_lower_right: *fixes issue [#7676](https://github.com/tobymao/sqlglot/issues/7676) opened by [@russellromney](https://github.com/russellromney)*
84
+ - [`a7e21a4`](https://github.com/tobymao/sqlglot/commit/a7e21a49f6c83e2917b9e02fc39c9e4237f4850a) - **duckdb**: add transpilation support for bq func PARSE_TIME *(PR [#7673](https://github.com/tobymao/sqlglot/pull/7673) by [@william-goode](https://github.com/william-goode))*
85
+ - [`c072a26`](https://github.com/tobymao/sqlglot/commit/c072a2635f8c20851c61f829633ad05d353599ae) - **mysql**: joined table `UPDATE` syntax handling *(PR [#7680](https://github.com/tobymao/sqlglot/pull/7680) by [@georgesittas](https://github.com/georgesittas))*
86
+ - :arrow_lower_right: *fixes issue [#7679](https://github.com/tobymao/sqlglot/issues/7679) opened by [@devfros](https://github.com/devfros)*
87
+ - [`cd06eb6`](https://github.com/tobymao/sqlglot/commit/cd06eb60af44fdf56e7d5dee9fe173e56bc6f521) - **sqlite**: support INSERT IGNORE and offset-only limits [CODEX] *(PR [#7674](https://github.com/tobymao/sqlglot/pull/7674) by [@russellromney](https://github.com/russellromney))*
88
+ - [`c3fa1ce`](https://github.com/tobymao/sqlglot/commit/c3fa1ced5d7fce8f3546cc01f9f604ca4ad41859) - **spark**: CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] *(PR [#7661](https://github.com/tobymao/sqlglot/pull/7661) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
89
+ - [`07faa10`](https://github.com/tobymao/sqlglot/commit/07faa10723e822d2319f2f41c7099948336d7514) - **postgres**: parse schema-qualified COMMENT ON TYPE, VIEW, SEQUENCE, and INDEX *(PR [#7684](https://github.com/tobymao/sqlglot/pull/7684) by [@devfros](https://github.com/devfros))*
90
+ - :arrow_lower_right: *fixes issue [#7683](https://github.com/tobymao/sqlglot/issues/7683) opened by [@devfros](https://github.com/devfros)*
91
+ - [`08e61b7`](https://github.com/tobymao/sqlglot/commit/08e61b775bd678124bb5e154e950b55e92e64182) - **expressions**: invalidate cached _hash on append() *(commit by [@tobymao](https://github.com/tobymao))*
92
+ - [`5c916ee`](https://github.com/tobymao/sqlglot/commit/5c916eee88264c3d73040b5d00232265cf47a1b2) - **optimizer**: retain set-returning projections in pushdown_projections *(PR [#7686](https://github.com/tobymao/sqlglot/pull/7686) by [@tobymao](https://github.com/tobymao))*
93
+ - [`8520e68`](https://github.com/tobymao/sqlglot/commit/8520e684f0da4b960b258d682f0c73c3858a23f2) - **parser**: pipe syntax AGGREGATE projection order *(PR [#7689](https://github.com/tobymao/sqlglot/pull/7689) by [@geooo109](https://github.com/geooo109))*
94
+ - [`9457cf6`](https://github.com/tobymao/sqlglot/commit/9457cf661659422f718817bf8c4e22f8d4e6ad1f) - multiline comment idempotency in connectors [GEMINI] *(PR [#7691](https://github.com/tobymao/sqlglot/pull/7691) by [@dcolestock](https://github.com/dcolestock))*
95
+ - [`19f5aea`](https://github.com/tobymao/sqlglot/commit/19f5aea982e9cad34210361bae603b4ceba7d167) - **duckdb**: fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
96
+ - [`603433d`](https://github.com/tobymao/sqlglot/commit/603433d273b5f6cca8ddb2da9f0336515b985755) - **duckdb**: fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
97
+ - [`98b2b92`](https://github.com/tobymao/sqlglot/commit/98b2b923a6b86b87141c21e8869a55f6c887460f) - **bigquery**: avoid self join auto unnest *(PR [#7697](https://github.com/tobymao/sqlglot/pull/7697) by [@geooo109](https://github.com/geooo109))*
98
+ - [`3e42f92`](https://github.com/tobymao/sqlglot/commit/3e42f927cf1deb65eafc0eea5904507fe613795b) - parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` *(PR [#7702](https://github.com/tobymao/sqlglot/pull/7702) by [@georgesittas](https://github.com/georgesittas))*
99
+ - :arrow_lower_right: *fixes issue [#7698](https://github.com/tobymao/sqlglot/issues/7698) opened by [@gabrielteotonio](https://github.com/gabrielteotonio)*
100
+ - [`a32a69f`](https://github.com/tobymao/sqlglot/commit/a32a69fa9e527977d253391a9caf76271e96fa9e) - **bigquery**: roundtrip for CAST with DATE/TIMESTAMP FORMAT *(PR [#7703](https://github.com/tobymao/sqlglot/pull/7703) by [@geooo109](https://github.com/geooo109))*
101
+ - [`2216a6e`](https://github.com/tobymao/sqlglot/commit/2216a6ed43ce479b29603440d1fb72043c4ff50a) - **bigquery**: preserve domain-scoped project IDs [CLAUDE] *(PR [#7693](https://github.com/tobymao/sqlglot/pull/7693) by [@etonlels](https://github.com/etonlels))*
102
+ - [`ec93edf`](https://github.com/tobymao/sqlglot/commit/ec93edf8873f37294b4c0d0f53627cb1ba2104ff) - make DataType.type return self instead of a clone *(PR [#7708](https://github.com/tobymao/sqlglot/pull/7708) by [@VaggelisD](https://github.com/VaggelisD))*
103
+
104
+ ### :zap: Performance Improvements
105
+ - [`35bc1e0`](https://github.com/tobymao/sqlglot/commit/35bc1e02e85b49464a8f47cc76740dfd657a345d) - **optimizer**: skip O(n^2) connector simplification when no operands can combine *(PR [#7687](https://github.com/tobymao/sqlglot/pull/7687) by [@tobymao](https://github.com/tobymao))*
106
+ - [`dcd70a2`](https://github.com/tobymao/sqlglot/commit/dcd70a2aeb84e1b1b9e3a4cc5c5b515ba139a8f9) - cache `gen` dispatch table *(PR [#7705](https://github.com/tobymao/sqlglot/pull/7705) by [@georgesittas](https://github.com/georgesittas))*
107
+ - [`eb35b13`](https://github.com/tobymao/sqlglot/commit/eb35b135925acfad63ced7320cbe4f308eea6912) - improve `__hash__` performance *(PR [#7706](https://github.com/tobymao/sqlglot/pull/7706) by [@georgesittas](https://github.com/georgesittas))*
108
+
109
+ ### :recycle: Refactors
110
+ - [`cc3f980`](https://github.com/tobymao/sqlglot/commit/cc3f98093d4968400a32434cd23deee6817a21c8) - **typing**: improve datatype typing *(PR [#7654](https://github.com/tobymao/sqlglot/pull/7654) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
111
+ - [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - **postgres**: rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*
112
+
113
+ ### :wrench: Chores
114
+ - [`0399cca`](https://github.com/tobymao/sqlglot/commit/0399cca9a1ec5f248cbe5837ce18da8401de3622) - bump sqlglot-mypy, fix leakcheck *(commit by [@georgesittas](https://github.com/georgesittas))*
115
+ - [`1b78667`](https://github.com/tobymao/sqlglot/commit/1b78667da199e6f510ff901a990b23ad728194f5) - bump sqlglot-mypy to post9 *(commit by [@georgesittas](https://github.com/georgesittas))*
116
+ - [`b02ed52`](https://github.com/tobymao/sqlglot/commit/b02ed523f3242545e860f1265efc177a734cfd6f) - small clean up for within group *(commit by [@geooo109](https://github.com/geooo109))*
117
+ - [`515e2b0`](https://github.com/tobymao/sqlglot/commit/515e2b0a9a609f3302da8f1095067588dd0a59cb) - bump sqlglot-mypy to 2.1.0.post1 *(PR [#7669](https://github.com/tobymao/sqlglot/pull/7669) by [@VaggelisD](https://github.com/VaggelisD))*
118
+ - [`ec5fb1c`](https://github.com/tobymao/sqlglot/commit/ec5fb1cec5c88ef9a16ed1c73b1c10c4e7abd9e6) - add makefile rule to run only updated tests *(PR [#7692](https://github.com/tobymao/sqlglot/pull/7692) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
119
+ - [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*
120
+
121
+
122
+ ## [v30.8.0] - 2026-05-13
123
+ ### :boom: BREAKING CHANGES
124
+ - due to [`6944a6c`](https://github.com/tobymao/sqlglot/commit/6944a6c3ff5a9d18f31ddab53239cbce2e702055) - Improve typing annotations for planner, schema, serde, and transforms modules *(PR [#7579](https://github.com/tobymao/sqlglot/pull/7579) by [@OutSquareCapital](https://github.com/OutSquareCapital))*:
125
+
126
+ Improve typing annotations for planner, schema, serde, and transforms modules (#7579)
127
+
128
+ - due to [`9d84348`](https://github.com/tobymao/sqlglot/commit/9d843482f1765f449dd21a4dcccff14aa0837ffe) - annotate MD5 for clickhouse *(PR [#7602](https://github.com/tobymao/sqlglot/pull/7602) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
129
+
130
+ annotate MD5 for clickhouse (#7602)
131
+
132
+ - due to [`d1147b6`](https://github.com/tobymao/sqlglot/commit/d1147b6ec3e97c55ee27fa8dc8079175328b16e3) - roundtrip for ST_MAKEPOINT / 4 parameters *(PR [#7605](https://github.com/tobymao/sqlglot/pull/7605) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
133
+
134
+ roundtrip for ST_MAKEPOINT / 4 parameters (#7605)
135
+
136
+ - due to [`4bd7d1d`](https://github.com/tobymao/sqlglot/commit/4bd7d1d02d35cc83a94d8a7ed5edbbff1d409483) - preserve NOT LIKE quantifiers during generation *(PR [#7611](https://github.com/tobymao/sqlglot/pull/7611) by [@bialkou](https://github.com/bialkou))*:
137
+
138
+ preserve NOT LIKE quantifiers during generation (#7611)
139
+
140
+ - due to [`fc6b87a`](https://github.com/tobymao/sqlglot/commit/fc6b87a3a533ab105f38f9f43abea4949de4e24e) - parse `CONVERT` into `Cast` instead of `TryCast` *(PR [#7609](https://github.com/tobymao/sqlglot/pull/7609) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
141
+
142
+ parse `CONVERT` into `Cast` instead of `TryCast` (#7609)
143
+
144
+ - due to [`b6d2c76`](https://github.com/tobymao/sqlglot/commit/b6d2c760b7cf3d965fef6d5809d87d07a1cc230a) - avoid pushdown projections for column dependent funcs *(PR [#7614](https://github.com/tobymao/sqlglot/pull/7614) by [@geooo109](https://github.com/geooo109))*:
145
+
146
+ avoid pushdown projections for column dependent funcs (#7614)
147
+
148
+ - due to [`a16f7d0`](https://github.com/tobymao/sqlglot/commit/a16f7d0aa2b5b6a505b65788d0a84bcfef4d3c8c) - disambiguate 2-arg date_add from 3-arg dateadd [CLAUDE] *(PR [#7588](https://github.com/tobymao/sqlglot/pull/7588) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
149
+
150
+ disambiguate 2-arg date_add from 3-arg dateadd [CLAUDE] (#7588)
151
+
152
+ - due to [`ae58fd1`](https://github.com/tobymao/sqlglot/commit/ae58fd10c33b05f4f5ae631d6b1ee0b88ba64e0a) - parse CREATE TYPE statements *(PR [#7616](https://github.com/tobymao/sqlglot/pull/7616) by [@devfros](https://github.com/devfros))*:
153
+
154
+ parse CREATE TYPE statements (#7616)
155
+
156
+ - due to [`8dcb2d3`](https://github.com/tobymao/sqlglot/commit/8dcb2d3599c5637dfa6a8438df8148d6706a5217) - register First and Last in Hive typing *(PR [#7623](https://github.com/tobymao/sqlglot/pull/7623) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
157
+
158
+ register First and Last in Hive typing (#7623)
159
+
160
+ - due to [`8ce7d78`](https://github.com/tobymao/sqlglot/commit/8ce7d78901994870b6569361dffaa4b9fd6dec54) - PIVOT qualify with alias + type annotation *(PR [#7586](https://github.com/tobymao/sqlglot/pull/7586) by [@geooo109](https://github.com/geooo109))*:
161
+
162
+ PIVOT qualify with alias + type annotation (#7586)
163
+
164
+ - due to [`c876570`](https://github.com/tobymao/sqlglot/commit/c8765701e0d4c87293409e5e0fe5d605f2286b3c) - roundtrip for HH12 time mapping *(PR [#7626](https://github.com/tobymao/sqlglot/pull/7626) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
165
+
166
+ roundtrip for HH12 time mapping (#7626)
167
+
168
+ - due to [`87cc106`](https://github.com/tobymao/sqlglot/commit/87cc1069e7703b77a5adde652154fcade16b8c26) - roundtrip support for CURRENT_USER_ID and USER *(PR [#7633](https://github.com/tobymao/sqlglot/pull/7633) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
169
+
170
+ roundtrip support for CURRENT_USER_ID and USER (#7633)
171
+
172
+ - due to [`c6615a9`](https://github.com/tobymao/sqlglot/commit/c6615a910953f8e07a9d4ec2269bb537c83f40ea) - propagate type through IgnoreNulls/RespectNulls wrappers [CLAUDE] *(PR [#7636](https://github.com/tobymao/sqlglot/pull/7636) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
173
+
174
+ propagate type through IgnoreNulls/RespectNulls wrappers [CLAUDE] (#7636)
175
+
176
+ - due to [`9e37283`](https://github.com/tobymao/sqlglot/commit/9e37283ab01b089c9b50b5cd59b3a1eaf24e98a1) - case-insensitive alias matching for LOCAL. prefix *(PR [#7631](https://github.com/tobymao/sqlglot/pull/7631) by [@antonireus](https://github.com/antonireus))*:
177
+
178
+ case-insensitive alias matching for LOCAL. prefix (#7631)
179
+
180
+
181
+ ### :sparkles: New Features
182
+ - [`af5dc38`](https://github.com/tobymao/sqlglot/commit/af5dc38762552e7627e6f85e86345a5242855ed3) - **duckdb**: Add transpilation support for HEX_DECODE_STRING *(PR [#7590](https://github.com/tobymao/sqlglot/pull/7590) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
183
+ - [`9507aad`](https://github.com/tobymao/sqlglot/commit/9507aad7ba8ddef02adbe7fdf3098ead9c7ba1d6) - **duckdb**: Consolidate HEX_ENCODE_ into HEX function *(PR [#7603](https://github.com/tobymao/sqlglot/pull/7603) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
184
+ - [`9d84348`](https://github.com/tobymao/sqlglot/commit/9d843482f1765f449dd21a4dcccff14aa0837ffe) - **optimizer**: annotate MD5 for clickhouse *(PR [#7602](https://github.com/tobymao/sqlglot/pull/7602) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
185
+ - [`ae58fd1`](https://github.com/tobymao/sqlglot/commit/ae58fd10c33b05f4f5ae631d6b1ee0b88ba64e0a) - **postgres**: parse CREATE TYPE statements *(PR [#7616](https://github.com/tobymao/sqlglot/pull/7616) by [@devfros](https://github.com/devfros))*
186
+ - :arrow_lower_right: *addresses issue [#7612](https://github.com/tobymao/sqlglot/issues/7612) opened by [@devfros](https://github.com/devfros)*
187
+ - [`80e0929`](https://github.com/tobymao/sqlglot/commit/80e0929cc1f105fbd060493ed094d4308e946063) - **parser**: handle `COLLATE` in nested types and `CAST` closes [#7624](https://github.com/tobymao/sqlglot/pull/7624) *(PR [#7630](https://github.com/tobymao/sqlglot/pull/7630) by [@georgesittas](https://github.com/georgesittas))*
188
+ - [`8ce7d78`](https://github.com/tobymao/sqlglot/commit/8ce7d78901994870b6569361dffaa4b9fd6dec54) - **optimizer**: PIVOT qualify with alias + type annotation *(PR [#7586](https://github.com/tobymao/sqlglot/pull/7586) by [@geooo109](https://github.com/geooo109))*
189
+ - [`cbd3576`](https://github.com/tobymao/sqlglot/commit/cbd3576a4b93e37148da4b93bcabe84fdd9f31c0) - **mysql**: Support `CHANGE COLUMN`. *(PR [#7638](https://github.com/tobymao/sqlglot/pull/7638) by [@burnison](https://github.com/burnison))*
190
+
191
+ ### :bug: Bug Fixes
192
+ - [`593d5a3`](https://github.com/tobymao/sqlglot/commit/593d5a3691990182d69f2c790c8d1b3d23635502) - **redshift**: support ALL in aggregate funcs *(PR [#7592](https://github.com/tobymao/sqlglot/pull/7592) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
193
+ - [`b8bf13e`](https://github.com/tobymao/sqlglot/commit/b8bf13ef775551ebd1c5e4a46ca4f21bb3689679) - **redshift**: support OBJECT_TRANSFORM function *(PR [#7601](https://github.com/tobymao/sqlglot/pull/7601) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
194
+ - [`1206bea`](https://github.com/tobymao/sqlglot/commit/1206bea7715f3af8c6e65dbe8641002720217782) - **redshift**: parser issue for TOP N DISTINCT *(PR [#7594](https://github.com/tobymao/sqlglot/pull/7594) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
195
+ - [`d1147b6`](https://github.com/tobymao/sqlglot/commit/d1147b6ec3e97c55ee27fa8dc8079175328b16e3) - **redshift**: roundtrip for ST_MAKEPOINT / 4 parameters *(PR [#7605](https://github.com/tobymao/sqlglot/pull/7605) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
196
+ - [`b9f18ee`](https://github.com/tobymao/sqlglot/commit/b9f18eea6762f8ce03ff5a426db8195db375f455) - **sqlite**: support named CTE columns closes [#7617](https://github.com/tobymao/sqlglot/pull/7617) *(commit by [@georgesittas](https://github.com/georgesittas))*
197
+ - [`c8b19aa`](https://github.com/tobymao/sqlglot/commit/c8b19aafe3e8b90ae7c67d816c1bedca86300192) - Parametrized bigdecimal mapping was being concatenated with params *(PR [#7584](https://github.com/tobymao/sqlglot/pull/7584) by [@themisvaltinos](https://github.com/themisvaltinos))*
198
+ - [`4bd7d1d`](https://github.com/tobymao/sqlglot/commit/4bd7d1d02d35cc83a94d8a7ed5edbbff1d409483) - **postgres**: preserve NOT LIKE quantifiers during generation *(PR [#7611](https://github.com/tobymao/sqlglot/pull/7611) by [@bialkou](https://github.com/bialkou))*
199
+ - [`fc6b87a`](https://github.com/tobymao/sqlglot/commit/fc6b87a3a533ab105f38f9f43abea4949de4e24e) - **redshift**: parse `CONVERT` into `Cast` instead of `TryCast` *(PR [#7609](https://github.com/tobymao/sqlglot/pull/7609) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
200
+ - [`b6d2c76`](https://github.com/tobymao/sqlglot/commit/b6d2c760b7cf3d965fef6d5809d87d07a1cc230a) - **optimizer**: avoid pushdown projections for column dependent funcs *(PR [#7614](https://github.com/tobymao/sqlglot/pull/7614) by [@geooo109](https://github.com/geooo109))*
201
+ - :arrow_lower_right: *fixes issue [#7607](https://github.com/tobymao/sqlglot/issues/7607) opened by [@ligfx](https://github.com/ligfx)*
202
+ - [`a16f7d0`](https://github.com/tobymao/sqlglot/commit/a16f7d0aa2b5b6a505b65788d0a84bcfef4d3c8c) - **databricks**: disambiguate 2-arg date_add from 3-arg dateadd [CLAUDE] *(PR [#7588](https://github.com/tobymao/sqlglot/pull/7588) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
203
+ - [`6931eec`](https://github.com/tobymao/sqlglot/commit/6931eece4ec56f8b31d2026be41ebb071804adc9) - **redshift**: roundtrip fix ARRAY_CONTAINS *(PR [#7606](https://github.com/tobymao/sqlglot/pull/7606) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
204
+ - [`8dcb2d3`](https://github.com/tobymao/sqlglot/commit/8dcb2d3599c5637dfa6a8438df8148d6706a5217) - **annotate**: register First and Last in Hive typing *(PR [#7623](https://github.com/tobymao/sqlglot/pull/7623) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
205
+ - [`a1fa154`](https://github.com/tobymao/sqlglot/commit/a1fa1546c926b2858cfc5adcfbd186731de40eba) - **parser**: from-first duckdb syntax improvement for pivot fixes [#7628](https://github.com/tobymao/sqlglot/pull/7628) *(commit by [@georgesittas](https://github.com/georgesittas))*
206
+ - [`e7e1fb0`](https://github.com/tobymao/sqlglot/commit/e7e1fb0d3d16054c1076e9f0570b336643b371d8) - **parser**: issue with no parenthesis functions *(PR [#7621](https://github.com/tobymao/sqlglot/pull/7621) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
207
+ - [`b1aa0c5`](https://github.com/tobymao/sqlglot/commit/b1aa0c5fe951a6a2efb7f90c4ef2ed7a4c5ac200) - **redshift**: try_cast roundtrip *(PR [#7622](https://github.com/tobymao/sqlglot/pull/7622) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
208
+ - [`5525f3f`](https://github.com/tobymao/sqlglot/commit/5525f3fdec3c68ad374f39e8c30cdd38ee9b573b) - **sqlite**: prevent ALTER TABLE RENAME TO from falling back to Command *(PR [#7629](https://github.com/tobymao/sqlglot/pull/7629) by [@dedyoc](https://github.com/dedyoc))*
209
+ - :arrow_lower_right: *fixes issue [#7427](https://github.com/tobymao/sqlglot/issues/7427) opened by [@ppacac](https://github.com/ppacac)*
210
+ - [`c876570`](https://github.com/tobymao/sqlglot/commit/c8765701e0d4c87293409e5e0fe5d605f2286b3c) - **redshift**: roundtrip for HH12 time mapping *(PR [#7626](https://github.com/tobymao/sqlglot/pull/7626) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
211
+ - [`87cc106`](https://github.com/tobymao/sqlglot/commit/87cc1069e7703b77a5adde652154fcade16b8c26) - **redshift**: roundtrip support for CURRENT_USER_ID and USER *(PR [#7633](https://github.com/tobymao/sqlglot/pull/7633) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
212
+ - [`6329684`](https://github.com/tobymao/sqlglot/commit/63296846f6a7a683af21683acb24aad7a63bb3f5) - **parser**: allow WINDOW clause without FROM *(PR [#7640](https://github.com/tobymao/sqlglot/pull/7640) by [@1fanwang](https://github.com/1fanwang))*
213
+ - :arrow_lower_right: *fixes issue [#7438](https://github.com/tobymao/sqlglot/issues/7438) opened by [@ppacac](https://github.com/ppacac)*
214
+ - [`c6615a9`](https://github.com/tobymao/sqlglot/commit/c6615a910953f8e07a9d4ec2269bb537c83f40ea) - **annotate_types**: propagate type through IgnoreNulls/RespectNulls wrappers [CLAUDE] *(PR [#7636](https://github.com/tobymao/sqlglot/pull/7636) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
215
+ - [`9e37283`](https://github.com/tobymao/sqlglot/commit/9e37283ab01b089c9b50b5cd59b3a1eaf24e98a1) - **exasol**: case-insensitive alias matching for LOCAL. prefix *(PR [#7631](https://github.com/tobymao/sqlglot/pull/7631) by [@antonireus](https://github.com/antonireus))*
216
+
217
+ ### :recycle: Refactors
218
+ - [`6944a6c`](https://github.com/tobymao/sqlglot/commit/6944a6c3ff5a9d18f31ddab53239cbce2e702055) - Improve typing annotations for planner, schema, serde, and transforms modules *(PR [#7579](https://github.com/tobymao/sqlglot/pull/7579) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
219
+ - [`a2a9ba5`](https://github.com/tobymao/sqlglot/commit/a2a9ba59c15f63b6831674481af1ceb8420dc4de) - **schema**: cache `find` lookups in schema *(PR [#7615](https://github.com/tobymao/sqlglot/pull/7615) by [@georgesittas](https://github.com/georgesittas))*
220
+ - [`958b27d`](https://github.com/tobymao/sqlglot/commit/958b27d0f8f983326a5a480be3962d066f7639f3) - improve `optimizer::pushdown_predicates` typing *(PR [#7613](https://github.com/tobymao/sqlglot/pull/7613) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
221
+ - [`96716a6`](https://github.com/tobymao/sqlglot/commit/96716a6a2a2db13deed0749266ce449de5f9153d) - improve `optimizer::{eliminate_joins, eliminate_subqueries}` typing *(PR [#7618](https://github.com/tobymao/sqlglot/pull/7618) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
222
+ - [`7e7cf8b`](https://github.com/tobymao/sqlglot/commit/7e7cf8b06397ed440921d079a39112e073bcfa80) - make dialect in build_formatted_time optional, fetch it from parser *(PR [#7639](https://github.com/tobymao/sqlglot/pull/7639) by [@georgesittas](https://github.com/georgesittas))*
223
+
224
+
4
225
  ## [v30.7.0] - 2026-05-04
5
226
  ### :boom: BREAKING CHANGES
6
227
  - due to [`68861d9`](https://github.com/tobymao/sqlglot/commit/68861d9f3aaa6c9ae405dacfa22117fb64a1d803) - support `DROP PRIMARY KEY`. *(PR [#7530](https://github.com/tobymao/sqlglot/pull/7530) by [@burnison](https://github.com/burnison))*:
@@ -14363,3 +14584,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
14363
14584
  [v30.5.0]: https://github.com/tobymao/sqlglot/compare/v30.4.3...v30.5.0
14364
14585
  [v30.6.0]: https://github.com/tobymao/sqlglot/compare/v30.5.0...v30.6.0
14365
14586
  [v30.7.0]: https://github.com/tobymao/sqlglot/compare/v30.6.0...v30.7.0
14587
+ [v30.8.0]: https://github.com/tobymao/sqlglot/compare/v30.7.0...v30.8.0
14588
+ [v30.9.0]: https://github.com/tobymao/sqlglot/compare/v30.8.0...v30.9.0
@@ -1,4 +1,4 @@
1
- .PHONY: install install-dev install-devc install-devc-release install-pre-commit bench bench-parse bench-transpile bench-optimize test test-fast unit testc unitc leakcheck style check docs docs-serve hidec showc clean resolve-integration-conflicts update-fixtures
1
+ .PHONY: install install-dev install-devc install-devc-release install-pre-commit bench bench-parse bench-transpile bench-optimize test test-fast test-branch unit testc unitc leakcheck style check docs docs-serve hidec showc clean resolve-integration-conflicts update-fixtures
2
2
 
3
3
  ifdef UV
4
4
  PIP := uv pip
@@ -81,6 +81,25 @@ test: hidec
81
81
  test-fast:
82
82
  python -m unittest --failfast
83
83
 
84
+ BRANCH_BASE ?= main
85
+
86
+ test-branch:
87
+ @changed_main=$$({ git diff origin/$(BRANCH_BASE)...HEAD --name-only 2>/dev/null; git diff HEAD --name-only; git diff --cached --name-only; } \
88
+ | sort -u | grep '^tests/.*\.py$$' | grep -v '__init__' | sed 's/\.py$$//' | tr '/' '.'); \
89
+ changed_int=$$({ git -C sqlglot-integration-tests log --name-only --format='' origin/HEAD..HEAD 2>/dev/null; git -C sqlglot-integration-tests diff HEAD --name-only 2>/dev/null; } \
90
+ | sort -u | grep '^tests/sqlglot/.*\.py$$' | grep -v '__init__'); \
91
+ if [ -z "$$changed_main" ] && [ -z "$$changed_int" ]; then \
92
+ echo "No test files changed vs $(BRANCH_BASE)"; exit 0; \
93
+ fi; \
94
+ if [ -n "$$changed_main" ]; then \
95
+ echo "Main tests:"; echo "$$changed_main" | tr ' ' '\n' | sed 's/^/ /'; \
96
+ python -m unittest $$changed_main || exit 1; \
97
+ fi; \
98
+ if [ -n "$$changed_int" ]; then \
99
+ echo "Integration tests:"; echo "$$changed_int" | tr ' ' '\n' | sed 's/^/ /'; \
100
+ cd sqlglot-integration-tests && PYTHONPATH=. pytest $$changed_int; \
101
+ fi
102
+
84
103
  unit: hidec
85
104
  trap '$(MAKE) showc' EXIT; SKIP_INTEGRATION=1 python -m unittest
86
105
 
@@ -95,7 +114,10 @@ leakcheck: install-devc
95
114
 
96
115
  style:
97
116
  pre-commit run --all-files
98
- @if [ -f sqlglot-integration-tests/Makefile ]; then $(MAKE) -C sqlglot-integration-tests check-submodule; fi
117
+ @if [ -f sqlglot-integration-tests/Makefile ]; then \
118
+ MYPYPATH=$(abspath .) $(MAKE) -C sqlglot-integration-tests style && \
119
+ $(MAKE) -C sqlglot-integration-tests check-submodule; \
120
+ fi
99
121
 
100
122
  check: style test testc
101
123
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlglot
3
- Version: 30.8.0
3
+ Version: 30.10.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>=1.20.0.post6; python_version >= "3.10" and extra == "dev"
22
+ Requires-Dist: sqlglot-mypy>=2.1.0.post2; 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.8.0; python_version >= "3.10" and extra == "c"
37
+ Requires-Dist: sqlglotc==30.10.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.8.0; python_version >= "3.10" and extra == "rs"
40
+ Requires-Dist: sqlglotc==30.10.0; python_version >= "3.10" and extra == "rs"
41
41
  Dynamic: license-file
42
42
  Dynamic: provides-extra
43
43
 
@@ -9,7 +9,7 @@ setup(
9
9
  "duckdb>=0.6",
10
10
  # sqlglot-mypy 1.20+ 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 >= 1.20.0.post6; python_version >= '3.10'",
12
+ "sqlglot-mypy >= 2.1.0.post2; python_version >= '3.10'",
13
13
  "mypy; python_version < '3.10'",
14
14
  "setuptools_scm",
15
15
  "pandas",
@@ -4,9 +4,9 @@ import typing as t
4
4
  from collections.abc import Mapping, Sequence
5
5
 
6
6
  if t.TYPE_CHECKING:
7
- from typing_extensions import ParamSpec
8
-
9
7
  import sqlglot
8
+ from sqlglot import exp
9
+ from typing_extensions import ParamSpec
10
10
  from sqlglot.dialects.dialect import DialectType
11
11
  from sqlglot.errors import ErrorLevel
12
12
 
@@ -32,6 +32,15 @@ class ParserNoDialectArgs(t.TypedDict, total=False):
32
32
  max_nodes: int
33
33
 
34
34
 
35
+ class DataTypeArgs(ParserNoDialectArgs, total=False):
36
+ expressions: list[exp.Expr] | None
37
+ nested: bool
38
+ values: list[exp.Expr] | None
39
+ kind: exp.Expr | str
40
+ nullable: bool
41
+ collate: exp.Identifier | exp.Column
42
+
43
+
35
44
  class ParserArgs(ParserNoDialectArgs, _DialectArg, total=False):
36
45
  pass
37
46
 
@@ -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.8.0'
22
- __version_tuple__ = version_tuple = (30, 8, 0)
21
+ __version__ = version = '30.10.0'
22
+ __version_tuple__ = version_tuple = (30, 10, 0)
23
23
 
24
- __commit_id__ = commit_id = 'g9e37283ab'
24
+ __commit_id__ = commit_id = 'g982bd166d'
@@ -72,18 +72,28 @@ class BigQuery(Dialect):
72
72
  }
73
73
 
74
74
  FORMAT_MAPPING = {
75
+ "dd": "%d",
75
76
  "DD": "%d",
77
+ "mm": "%m",
76
78
  "MM": "%m",
79
+ "mon": "%b",
77
80
  "MON": "%b",
81
+ "month": "%B",
78
82
  "MONTH": "%B",
83
+ "yyyy": "%Y",
79
84
  "YYYY": "%Y",
85
+ "yy": "%y",
80
86
  "YY": "%y",
81
87
  "HH": "%I",
82
88
  "HH12": "%I",
89
+ "hh24": "%H",
83
90
  "HH24": "%H",
91
+ "mi": "%M",
84
92
  "MI": "%M",
93
+ "ss": "%S",
85
94
  "SS": "%S",
86
95
  "SSSSS": "%f",
96
+ "tzh": "%z",
87
97
  "TZH": "%z",
88
98
  }
89
99
 
@@ -525,6 +525,11 @@ class Dialect(metaclass=_Dialect):
525
525
  Whether ORDER BY ALL is supported (expands to all the selected columns) as in DuckDB, Spark3/Databricks
526
526
  """
527
527
 
528
+ SUPPORTS_LIMIT_ALL = False
529
+ """
530
+ Whether LIMIT ALL is supported (equivalent to no limit) as in Postgres.
531
+ """
532
+
528
533
  PROJECTION_ALIASES_SHADOW_SOURCE_NAMES = False
529
534
  """
530
535
  Whether projection alias names can shadow table/source names in GROUP BY and HAVING clauses.
@@ -21,6 +21,7 @@ class DuckDB(Dialect):
21
21
  CONCAT_COALESCE = True
22
22
  CONCAT_WS_COALESCE = True
23
23
  SUPPORTS_ORDER_BY_ALL = True
24
+ SUPPORTS_LIMIT_ALL = True
24
25
  SUPPORTS_FIXED_SIZE_ARRAYS = True
25
26
  STRICT_JSON_PATH_SYNTAX = False
26
27
  NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
@@ -70,6 +70,8 @@ class Oracle(Dialect):
70
70
  KEYWORDS = {
71
71
  **tokens.Tokenizer.KEYWORDS,
72
72
  "(+)": TokenType.JOIN_MARKER,
73
+ # https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Comparison-Conditions.html
74
+ "^=": TokenType.NEQ,
73
75
  "BINARY_DOUBLE": TokenType.DOUBLE,
74
76
  "BINARY_FLOAT": TokenType.FLOAT,
75
77
  "BULK COLLECT INTO": TokenType.BULK_COLLECT_INTO,
@@ -5,14 +5,17 @@ from sqlglot.dialects.dialect import Dialect
5
5
  from sqlglot.generators.postgres import PostgresGenerator
6
6
  from sqlglot.parsers.postgres import PostgresParser
7
7
  from sqlglot.tokens import TokenType
8
+ from sqlglot.typing.postgres import EXPRESSION_METADATA
8
9
 
9
10
 
10
11
  class Postgres(Dialect):
12
+ EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
11
13
  INDEX_OFFSET = 1
12
14
  TYPED_DIVISION = True
13
15
  CONCAT_COALESCE = True
14
16
  CONCAT_WS_COALESCE = True
15
17
  NULL_ORDERING = "nulls_are_large"
18
+ SUPPORTS_LIMIT_ALL = True
16
19
  TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
17
20
  TABLESAMPLE_SIZE_IS_PERCENT = True
18
21
  TABLES_REFERENCEABLE_AS_COLUMNS = True
@@ -22,6 +22,7 @@ class Presto(Dialect):
22
22
  TYPED_DIVISION = True
23
23
  TABLESAMPLE_SIZE_IS_PERCENT = True
24
24
  LOG_BASE_FIRST: bool | None = None
25
+ SUPPORTS_LIMIT_ALL = True
25
26
  SUPPORTS_VALUES_DEFAULT = False
26
27
  LEAST_GREATEST_IGNORES_NULLS = False
27
28
  UUID_IS_STRING_TYPE = False
@@ -11,6 +11,7 @@ from sqlglot.typing.spark import EXPRESSION_METADATA
11
11
 
12
12
  class Spark(Spark2):
13
13
  SUPPORTS_ORDER_BY_ALL = True
14
+ SUPPORTS_LIMIT_ALL = True
14
15
  SUPPORTS_NULL_TYPE = True
15
16
  ARRAY_FUNCS_PROPAGATES_NULLS = True
16
17
  EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
@@ -208,7 +208,7 @@ class NthValue(Expression, AggFunc):
208
208
 
209
209
 
210
210
  class ObjectAgg(Expression, AggFunc):
211
- arg_types = {"this": True, "expression": True}
211
+ arg_types = {"this": True, "expression": False}
212
212
 
213
213
 
214
214
  class PercentileCont(Expression, AggFunc):
@@ -88,6 +88,7 @@ class Expr:
88
88
  _hash_raw_args: t.ClassVar[bool] = False
89
89
  is_subquery: t.ClassVar[bool] = False
90
90
  is_cast: t.ClassVar[bool] = False
91
+ is_data_type: t.ClassVar[bool] = False
91
92
 
92
93
  args: dict[str, t.Any]
93
94
  parent: Expr | None
@@ -837,26 +838,35 @@ class Expression(Expr):
837
838
  def __hash__(self) -> int:
838
839
  if self._hash is None:
839
840
  nodes: list[Expr] = []
840
- queue: deque[Expr] = deque()
841
- queue.append(self)
841
+ stack: list[Expr] = [self]
842
842
 
843
- while queue:
844
- node = queue.popleft()
843
+ # Collect nodes, finding child expressions inline instead of via the
844
+ # iter_expressions generator (whose per-node generator object dominates the
845
+ # hash's cost). reversed(nodes) is a valid post-order regardless of DFS/BFS.
846
+ while stack:
847
+ node = stack.pop()
845
848
  nodes.append(node)
846
849
 
847
- for child in node.iter_expressions():
848
- if child._hash is None:
849
- queue.append(child)
850
+ for v in node.args.values():
851
+ if isinstance(v, Expr):
852
+ if v._hash is None:
853
+ stack.append(v)
854
+ elif type(v) is list:
855
+ for x in v:
856
+ if isinstance(x, Expr) and x._hash is None:
857
+ stack.append(x)
850
858
 
851
859
  for node in reversed(nodes):
852
860
  hash_ = hash(node.key)
853
861
 
854
862
  if node._hash_raw_args:
855
- for k, v in sorted(node.args.items()):
863
+ for k in sorted(node.args):
864
+ v = node.args[k]
856
865
  if v:
857
866
  hash_ = hash((hash_, k, v))
858
867
  else:
859
- for k, v in sorted(node.args.items()):
868
+ for k in sorted(node.args):
869
+ v = node.args[k]
860
870
  vt = type(v)
861
871
 
862
872
  if vt is list:
@@ -953,6 +963,8 @@ class Expression(Expr):
953
963
 
954
964
  @property
955
965
  def type(self) -> DataType | None:
966
+ if self.is_data_type:
967
+ return self # type: ignore[return-value]
956
968
  if self.is_cast:
957
969
  return self._type or self.to # type: ignore[attr-defined]
958
970
  return self._type
@@ -1039,6 +1051,11 @@ class Expression(Expr):
1039
1051
  return comments
1040
1052
 
1041
1053
  def append(self, arg_key: str, value: t.Any) -> None:
1054
+ node: Expr | None = self
1055
+ while node and node._hash is not None:
1056
+ node._hash = None
1057
+ node = node.parent
1058
+
1042
1059
  if type(self.args.get(arg_key)) is not list:
1043
1060
  self.args[arg_key] = []
1044
1061
  self._set_parent(arg_key, value)
@@ -2118,6 +2135,10 @@ class Distance(Expression, Binary):
2118
2135
  pass
2119
2136
 
2120
2137
 
2138
+ class DistanceNd(Expression, Binary):
2139
+ pass
2140
+
2141
+
2121
2142
  class Escape(Expression, Binary):
2122
2143
  pass
2123
2144
 
@@ -2269,8 +2290,7 @@ class Or(Expression, Connector, Func):
2269
2290
 
2270
2291
 
2271
2292
  class Xor(Expression, Connector, Func):
2272
- arg_types = {"this": False, "expression": False, "expressions": False, "round_input": False}
2273
- is_var_len_args = True
2293
+ arg_types = {"this": True, "expression": True, "round_input": False}
2274
2294
 
2275
2295
 
2276
2296
  class Pow(Expression, Binary, Func):
@@ -2428,6 +2448,7 @@ QUERY_MODIFIERS = {
2428
2448
  "settings": False,
2429
2449
  "format": False,
2430
2450
  "options": False,
2451
+ "for_": False,
2431
2452
  }
2432
2453
 
2433
2454
 
@@ -2534,7 +2555,7 @@ def _to_s(node: t.Any, verbose: bool = False, level: int = 0, repr_str: bool = F
2534
2555
  if isinstance(node, Expr):
2535
2556
  args = {k: v for k, v in node.args.items() if (v is not None and v != []) or verbose}
2536
2557
 
2537
- if (node.type or verbose) and type(node).__name__ != "DataType":
2558
+ if (node.type or verbose) and not node.is_data_type:
2538
2559
  args["_type"] = node.type
2539
2560
  if node.comments or verbose:
2540
2561
  args["_comments"] = node.comments