sqlglot 27.3.0__tar.gz → 27.3.1__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 (226) hide show
  1. {sqlglot-27.3.0 → sqlglot-27.3.1}/CHANGELOG.md +177 -0
  2. {sqlglot-27.3.0 → sqlglot-27.3.1}/PKG-INFO +1 -1
  3. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/_version.py +2 -2
  4. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/__init__.py +1 -0
  5. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/fabric.py +50 -1
  6. sqlglot-27.3.1/sqlglot/dialects/singlestore.py +5 -0
  7. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/tsql.py +0 -38
  8. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.egg-info/PKG-INFO +1 -1
  9. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.egg-info/SOURCES.txt +2 -0
  10. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_fabric.py +37 -0
  11. sqlglot-27.3.1/tests/dialects/test_singlestore.py +20 -0
  12. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_tsql.py +0 -36
  13. {sqlglot-27.3.0 → sqlglot-27.3.1}/.gitignore +0 -0
  14. {sqlglot-27.3.0 → sqlglot-27.3.1}/.gitpod.yml +0 -0
  15. {sqlglot-27.3.0 → sqlglot-27.3.1}/.pre-commit-config.yaml +0 -0
  16. {sqlglot-27.3.0 → sqlglot-27.3.1}/CONTRIBUTING.md +0 -0
  17. {sqlglot-27.3.0 → sqlglot-27.3.1}/LICENSE +0 -0
  18. {sqlglot-27.3.0 → sqlglot-27.3.1}/MANIFEST.in +0 -0
  19. {sqlglot-27.3.0 → sqlglot-27.3.1}/Makefile +0 -0
  20. {sqlglot-27.3.0 → sqlglot-27.3.1}/README.md +0 -0
  21. {sqlglot-27.3.0 → sqlglot-27.3.1}/pyproject.toml +0 -0
  22. {sqlglot-27.3.0 → sqlglot-27.3.1}/setup.cfg +0 -0
  23. {sqlglot-27.3.0 → sqlglot-27.3.1}/setup.py +0 -0
  24. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/__init__.py +0 -0
  25. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/__main__.py +0 -0
  26. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/_typing.py +0 -0
  27. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/athena.py +0 -0
  28. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/bigquery.py +0 -0
  29. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/clickhouse.py +0 -0
  30. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/databricks.py +0 -0
  31. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/dialect.py +0 -0
  32. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/doris.py +0 -0
  33. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/dremio.py +0 -0
  34. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/drill.py +0 -0
  35. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/druid.py +0 -0
  36. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/duckdb.py +0 -0
  37. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/dune.py +0 -0
  38. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/exasol.py +0 -0
  39. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/hive.py +0 -0
  40. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/materialize.py +0 -0
  41. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/mysql.py +0 -0
  42. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/oracle.py +0 -0
  43. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/postgres.py +0 -0
  44. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/presto.py +0 -0
  45. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/prql.py +0 -0
  46. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/redshift.py +0 -0
  47. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/risingwave.py +0 -0
  48. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/snowflake.py +0 -0
  49. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/spark.py +0 -0
  50. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/spark2.py +0 -0
  51. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/sqlite.py +0 -0
  52. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/starrocks.py +0 -0
  53. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/tableau.py +0 -0
  54. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/teradata.py +0 -0
  55. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/dialects/trino.py +0 -0
  56. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/diff.py +0 -0
  57. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/errors.py +0 -0
  58. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/executor/__init__.py +0 -0
  59. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/executor/context.py +0 -0
  60. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/executor/env.py +0 -0
  61. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/executor/python.py +0 -0
  62. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/executor/table.py +0 -0
  63. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/expressions.py +0 -0
  64. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/generator.py +0 -0
  65. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/helper.py +0 -0
  66. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/jsonpath.py +0 -0
  67. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/lineage.py +0 -0
  68. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/__init__.py +0 -0
  69. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/annotate_types.py +0 -0
  70. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/canonicalize.py +0 -0
  71. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/eliminate_ctes.py +0 -0
  72. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/eliminate_joins.py +0 -0
  73. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
  74. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/isolate_table_selects.py +0 -0
  75. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/merge_subqueries.py +0 -0
  76. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/normalize.py +0 -0
  77. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/normalize_identifiers.py +0 -0
  78. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/optimize_joins.py +0 -0
  79. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/optimizer.py +0 -0
  80. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/pushdown_predicates.py +0 -0
  81. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/pushdown_projections.py +0 -0
  82. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/qualify.py +0 -0
  83. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/qualify_columns.py +0 -0
  84. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/qualify_tables.py +0 -0
  85. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/scope.py +0 -0
  86. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/simplify.py +0 -0
  87. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/optimizer/unnest_subqueries.py +0 -0
  88. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/parser.py +0 -0
  89. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/planner.py +0 -0
  90. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/py.typed +0 -0
  91. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/schema.py +0 -0
  92. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/serde.py +0 -0
  93. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/time.py +0 -0
  94. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/tokens.py +0 -0
  95. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/transforms.py +0 -0
  96. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot/trie.py +0 -0
  97. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.egg-info/dependency_links.txt +0 -0
  98. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.egg-info/requires.txt +0 -0
  99. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.egg-info/top_level.txt +0 -0
  100. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglot.png +0 -0
  101. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/Cargo.lock +0 -0
  102. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/Cargo.toml +0 -0
  103. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/benches/dialect_settings.json +0 -0
  104. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/benches/long.rs +0 -0
  105. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/benches/token_type_settings.json +0 -0
  106. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/benches/tokenizer_dialect_settings.json +0 -0
  107. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/benches/tokenizer_settings.json +0 -0
  108. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/pyproject.toml +0 -0
  109. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/src/lib.rs +0 -0
  110. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/src/settings.rs +0 -0
  111. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/src/token.rs +0 -0
  112. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/src/tokenizer.rs +0 -0
  113. {sqlglot-27.3.0 → sqlglot-27.3.1}/sqlglotrs/src/trie.rs +0 -0
  114. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/__init__.py +0 -0
  115. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/__init__.py +0 -0
  116. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_athena.py +0 -0
  117. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_bigquery.py +0 -0
  118. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_clickhouse.py +0 -0
  119. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_databricks.py +0 -0
  120. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_dialect.py +0 -0
  121. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_doris.py +0 -0
  122. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_dremio.py +0 -0
  123. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_drill.py +0 -0
  124. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_druid.py +0 -0
  125. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_duckdb.py +0 -0
  126. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_dune.py +0 -0
  127. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_exasol.py +0 -0
  128. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_hive.py +0 -0
  129. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_materialize.py +0 -0
  130. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_mysql.py +0 -0
  131. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_oracle.py +0 -0
  132. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_pipe_syntax.py +0 -0
  133. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_postgres.py +0 -0
  134. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_presto.py +0 -0
  135. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_prql.py +0 -0
  136. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_redshift.py +0 -0
  137. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_risingwave.py +0 -0
  138. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_snowflake.py +0 -0
  139. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_spark.py +0 -0
  140. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_sqlite.py +0 -0
  141. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_starrocks.py +0 -0
  142. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_tableau.py +0 -0
  143. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_teradata.py +0 -0
  144. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/dialects/test_trino.py +0 -0
  145. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/identity.sql +0 -0
  146. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/jsonpath/LICENSE +0 -0
  147. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/jsonpath/cts.json +0 -0
  148. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/annotate_functions.sql +0 -0
  149. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/annotate_types.sql +0 -0
  150. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/canonicalize.sql +0 -0
  151. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
  152. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
  153. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
  154. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
  155. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
  156. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/normalize.sql +0 -0
  157. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
  158. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
  159. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/optimizer.sql +0 -0
  160. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
  161. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
  162. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
  163. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/qualify_columns.sql +0 -0
  164. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
  165. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
  166. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
  167. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
  168. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
  169. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/simplify.sql +0 -0
  170. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
  171. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
  172. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
  173. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
  174. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
  175. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
  176. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
  177. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
  178. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
  179. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
  180. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
  181. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
  182. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
  183. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
  184. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
  185. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
  186. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
  187. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
  188. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
  189. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
  190. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
  191. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
  192. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
  193. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
  194. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
  195. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
  196. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
  197. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
  198. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
  199. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
  200. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
  201. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
  202. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
  203. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
  204. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
  205. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/partial.sql +0 -0
  206. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/fixtures/pretty.sql +0 -0
  207. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/gen_fixtures.py +0 -0
  208. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/helpers.py +0 -0
  209. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_build.py +0 -0
  210. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_dialect_imports.py +0 -0
  211. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_diff.py +0 -0
  212. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_docs.py +0 -0
  213. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_executor.py +0 -0
  214. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_expressions.py +0 -0
  215. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_generator.py +0 -0
  216. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_helper.py +0 -0
  217. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_jsonpath.py +0 -0
  218. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_lineage.py +0 -0
  219. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_optimizer.py +0 -0
  220. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_parser.py +0 -0
  221. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_schema.py +0 -0
  222. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_serde.py +0 -0
  223. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_time.py +0 -0
  224. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_tokens.py +0 -0
  225. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_transforms.py +0 -0
  226. {sqlglot-27.3.0 → sqlglot-27.3.1}/tests/test_transpile.py +0 -0
@@ -1,6 +1,182 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [v27.3.0] - 2025-07-24
5
+ ### :boom: BREAKING CHANGES
6
+ - due to [`d7ccb48`](https://github.com/tobymao/sqlglot/commit/d7ccb48e542c49258e31cc4df45f49beebc2e238) - week/quarter support *(PR [#5374](https://github.com/tobymao/sqlglot/pull/5374) by [@eakmanrq](https://github.com/eakmanrq))*:
7
+
8
+ week/quarter support (#5374)
9
+
10
+ - due to [`b368fba`](https://github.com/tobymao/sqlglot/commit/b368fba59b606e038d445b2ca2d8436e115af3d6) - parse and annotate type for ASCII *(PR [#5377](https://github.com/tobymao/sqlglot/pull/5377) by [@geooo109](https://github.com/geooo109))*:
11
+
12
+ parse and annotate type for ASCII (#5377)
13
+
14
+ - due to [`7f19b31`](https://github.com/tobymao/sqlglot/commit/7f19b31ebd7981e53a8f8ba343b4f3222fe160c7) - annotate type for UNICODE *(PR [#5381](https://github.com/tobymao/sqlglot/pull/5381) by [@geooo109](https://github.com/geooo109))*:
15
+
16
+ annotate type for UNICODE (#5381)
17
+
18
+ - due to [`9e8d3ab`](https://github.com/tobymao/sqlglot/commit/9e8d3abedcffb1c267ed0e6a8332af3b52105d41) - Preserve struct-column parentheses for RisingWave dialect *(PR [#5376](https://github.com/tobymao/sqlglot/pull/5376) by [@MisterWheatley](https://github.com/MisterWheatley))*:
19
+
20
+ Added dialect as argument to `simplify_parens` function
21
+ * style: Ran formatter and tests. Fixed type annotation for simplify_parens
22
+ * Fix: Make dialect in `simplify_parens` optional.
23
+ Co-authored-by: Jo <46752250+georgesittas@users.noreply.github.com>
24
+ * Fix(optimizer): Tweaks to make simple non-nested star expand pass unit test for RW
25
+ * Fix(optimizer): Added test for deep nested unpacking for BigQuery and RisingWave
26
+ * style: Ran formatting check
27
+ * fix: Remove unuses function from RisingWave dialect test
28
+ * docs: updated docstring of new _expand_struct_stars_risingwave internal function
29
+ * fix: apply suggestions from code review 2
30
+ Co-authored-by: Jo <46752250+georgesittas@users.noreply.github.com>
31
+ * fix(optimizer,risingwave): Ensure that struct star-expansion to the correct level for RisingWave
32
+ Updated logic for expanding (struct_col).* expressions in RisingWave to correctly handle the level of nesting.
33
+ Moved struct expansion tests to tests/fixtures/qualify_columns.sql on behest of maintainers.
34
+ ---------
35
+
36
+ - due to [`3223e63`](https://github.com/tobymao/sqlglot/commit/3223e6394fdd3f8e48c68bbb940b661ff8e76fd8) - cast datetimeoffset to datetime2 *(PR [#5385](https://github.com/tobymao/sqlglot/pull/5385) by [@mattiasthalen](https://github.com/mattiasthalen))*:
37
+
38
+ cast datetimeoffset to datetime2 (#5385)
39
+
40
+ - due to [`06cea31`](https://github.com/tobymao/sqlglot/commit/06cea310bd9fd3a9a9fa0ba008596e878a430df8) - support KEY related locks *(PR [#5397](https://github.com/tobymao/sqlglot/pull/5397) by [@geooo109](https://github.com/geooo109))*:
41
+
42
+ support KEY related locks (#5397)
43
+
44
+ - due to [`1014a67`](https://github.com/tobymao/sqlglot/commit/1014a6759b0917ef1bf5af0dbbdcca72214a8dea) - remove redundant todate in dayofweek closes [#5398](https://github.com/tobymao/sqlglot/pull/5398) *(PR [#5399](https://github.com/tobymao/sqlglot/pull/5399) by [@tobymao](https://github.com/tobymao))*:
45
+
46
+ remove redundant todate in dayofweek closes #5398 (#5399)
47
+
48
+ - due to [`b2631ae`](https://github.com/tobymao/sqlglot/commit/b2631aec8d1bdb08decb201b6bd2ba5d927bb121) - annotate type for bigquery BIT_AND, BIT_OR, BIT_XOR, BIT_COUNT *(PR [#5405](https://github.com/tobymao/sqlglot/pull/5405) by [@geooo109](https://github.com/geooo109))*:
49
+
50
+ annotate type for bigquery BIT_AND, BIT_OR, BIT_XOR, BIT_COUNT (#5405)
51
+
52
+ - due to [`5835b8d`](https://github.com/tobymao/sqlglot/commit/5835b8d6c7fe77d9645691bb88021af137ed0bac) - make bracket parsing aware of duckdb MAP func *(PR [#5423](https://github.com/tobymao/sqlglot/pull/5423) by [@geooo109](https://github.com/geooo109))*:
53
+
54
+ make bracket parsing aware of duckdb MAP func (#5423)
55
+
56
+ - due to [`489dc5c`](https://github.com/tobymao/sqlglot/commit/489dc5c2f7506e0fe4de549384dd0f816e9fd12f) - parse and annotate type support for JSON_ARRAY *(PR [#5424](https://github.com/tobymao/sqlglot/pull/5424) by [@geooo109](https://github.com/geooo109))*:
57
+
58
+ parse and annotate type support for JSON_ARRAY (#5424)
59
+
60
+ - due to [`0ed518c`](https://github.com/tobymao/sqlglot/commit/0ed518c67042002ee0af91bee0b9e7093c85f926) - annotate type for bigquery JSON_VALUE *(PR [#5427](https://github.com/tobymao/sqlglot/pull/5427) by [@geooo109](https://github.com/geooo109))*:
61
+
62
+ annotate type for bigquery JSON_VALUE (#5427)
63
+
64
+ - due to [`6091617`](https://github.com/tobymao/sqlglot/commit/6091617067c263e3e834e579b37aa1c601b1ddc7) - annotate type for bigquery JSON_VALUE_ARRAY *(PR [#5428](https://github.com/tobymao/sqlglot/pull/5428) by [@geooo109](https://github.com/geooo109))*:
65
+
66
+ annotate type for bigquery JSON_VALUE_ARRAY (#5428)
67
+
68
+ - due to [`631c851`](https://github.com/tobymao/sqlglot/commit/631c851cbbfbf55cb66a79c2549aeeb443fcab83) - parse and annotate type support for bigquery JSON_TYPE *(PR [#5430](https://github.com/tobymao/sqlglot/pull/5430) by [@geooo109](https://github.com/geooo109))*:
69
+
70
+ parse and annotate type support for bigquery JSON_TYPE (#5430)
71
+
72
+ - due to [`6268f6f`](https://github.com/tobymao/sqlglot/commit/6268f6f39dda1ca5cf2ad0403e219b49c5c9593a) - add default precision to CHAR/VARCHAR create expressions *(PR [#5434](https://github.com/tobymao/sqlglot/pull/5434) by [@mattiasthalen](https://github.com/mattiasthalen))*:
73
+
74
+ add default precision to CHAR/VARCHAR create expressions (#5434)
75
+
76
+ - due to [`8467bad`](https://github.com/tobymao/sqlglot/commit/8467bad405e27c842c989e71588adc39cf2383fc) - add parsing/generating for BigQuery `DECLARE` *(PR [#5442](https://github.com/tobymao/sqlglot/pull/5442) by [@plaflamme](https://github.com/plaflamme))*:
77
+
78
+ add parsing/generating for BigQuery `DECLARE` (#5442)
79
+
80
+ - due to [`79c5c30`](https://github.com/tobymao/sqlglot/commit/79c5c30f3802c6959376b3b0f3c4d055a30b6b43) - transpile STRING_AGG *(PR [#5449](https://github.com/tobymao/sqlglot/pull/5449) by [@geooo109](https://github.com/geooo109))*:
81
+
82
+ transpile STRING_AGG (#5449)
83
+
84
+ - due to [`190f8ab`](https://github.com/tobymao/sqlglot/commit/190f8abe3d3bbda09e2f945287398d2aa9d6a863) - improve BigQuery `UNNEST` transpilation *(PR [#5451](https://github.com/tobymao/sqlglot/pull/5451) by [@georgesittas](https://github.com/georgesittas))*:
85
+
86
+ improve BigQuery `UNNEST` transpilation (#5451)
87
+
88
+ - due to [`3590e75`](https://github.com/tobymao/sqlglot/commit/3590e75c1df2d572e2fea664893dba5565a17e05) - support ? placeholder *(PR [#5455](https://github.com/tobymao/sqlglot/pull/5455) by [@geooo109](https://github.com/geooo109))*:
89
+
90
+ support ? placeholder (#5455)
91
+
92
+ - due to [`cdbf595`](https://github.com/tobymao/sqlglot/commit/cdbf5953171c8d4c8e4a24262f278c6f7d74e057) - Wrap GET_PATH value with PARSE_JSON preemptively *(PR [#5458](https://github.com/tobymao/sqlglot/pull/5458) by [@VaggelisD](https://github.com/VaggelisD))*:
93
+
94
+ Wrap GET_PATH value with PARSE_JSON preemptively (#5458)
95
+
96
+ - due to [`bee82f3`](https://github.com/tobymao/sqlglot/commit/bee82f37ac537780495ff408738d88871208517a) - Remove `UNKNOWN` type from `TRY_CAST` *(PR [#5466](https://github.com/tobymao/sqlglot/pull/5466) by [@VaggelisD](https://github.com/VaggelisD))*:
97
+
98
+ Remove `UNKNOWN` type from `TRY_CAST` (#5466)
99
+
100
+
101
+ ### :sparkles: New Features
102
+ - [`b368fba`](https://github.com/tobymao/sqlglot/commit/b368fba59b606e038d445b2ca2d8436e115af3d6) - **optimizer**: parse and annotate type for ASCII *(PR [#5377](https://github.com/tobymao/sqlglot/pull/5377) by [@geooo109](https://github.com/geooo109))*
103
+ - [`7f19b31`](https://github.com/tobymao/sqlglot/commit/7f19b31ebd7981e53a8f8ba343b4f3222fe160c7) - **optimizer**: annotate type for UNICODE *(PR [#5381](https://github.com/tobymao/sqlglot/pull/5381) by [@geooo109](https://github.com/geooo109))*
104
+ - [`f035bf0`](https://github.com/tobymao/sqlglot/commit/f035bf0eb582aa07d4ad79e0ed1958ce0d091ad9) - **dremio**: Add TIME_MAPPING for Dremio dialect *(PR [#5378](https://github.com/tobymao/sqlglot/pull/5378) by [@mateuszpoleski](https://github.com/mateuszpoleski))*
105
+ - [`31cfd0f`](https://github.com/tobymao/sqlglot/commit/31cfd0fc3309bc1080b7a2ba8d40b2aba5c098a3) - **exasol**: add to_date and refactored to_char functions with respect to time mapping *(PR [#5379](https://github.com/tobymao/sqlglot/pull/5379) by [@nnamdi16](https://github.com/nnamdi16))*
106
+ - [`bd3776e`](https://github.com/tobymao/sqlglot/commit/bd3776eaa26d40b44c4cebc2f3838b4055653548) - **doris**: add PROPERTIES_LOCATION mapping for Doris dialect *(PR [#5391](https://github.com/tobymao/sqlglot/pull/5391) by [@xinge-ji](https://github.com/xinge-ji))*
107
+ - [`7eaa67a`](https://github.com/tobymao/sqlglot/commit/7eaa67acb216501046c739f56839418b84f244c0) - **doris**: properly supported PROPERTIES and UNIQUE KEY table prop *(commit by [@georgesittas](https://github.com/georgesittas))*
108
+ - [`1e78163`](https://github.com/tobymao/sqlglot/commit/1e78163b829e910e7960c79e7ab118c07d1ecdc3) - **duckdb**: support column access via index *(PR [#5395](https://github.com/tobymao/sqlglot/pull/5395) by [@geooo109](https://github.com/geooo109))*
109
+ - :arrow_lower_right: *addresses issue [#5392](https://github.com/tobymao/sqlglot/issues/5392) opened by [@tekumara](https://github.com/tekumara)*
110
+ - [`1014a67`](https://github.com/tobymao/sqlglot/commit/1014a6759b0917ef1bf5af0dbbdcca72214a8dea) - remove redundant todate in dayofweek closes [#5398](https://github.com/tobymao/sqlglot/pull/5398) *(PR [#5399](https://github.com/tobymao/sqlglot/pull/5399) by [@tobymao](https://github.com/tobymao))*
111
+ - [`be52f78`](https://github.com/tobymao/sqlglot/commit/be52f7866b03e436d103d9201d1a44c6632c643a) - **exasol**: add support for CONVERT_TZ function *(PR [#5401](https://github.com/tobymao/sqlglot/pull/5401) by [@nnamdi16](https://github.com/nnamdi16))*
112
+ - [`d637161`](https://github.com/tobymao/sqlglot/commit/d637161406faf623418f112162268bedb422213b) - **exasol**: add mapping to TIME_TO_STR in exasol dialect *(PR [#5403](https://github.com/tobymao/sqlglot/pull/5403) by [@nnamdi16](https://github.com/nnamdi16))*
113
+ - [`b2631ae`](https://github.com/tobymao/sqlglot/commit/b2631aec8d1bdb08decb201b6bd2ba5d927bb121) - **optimizer**: annotate type for bigquery BIT_AND, BIT_OR, BIT_XOR, BIT_COUNT *(PR [#5405](https://github.com/tobymao/sqlglot/pull/5405) by [@geooo109](https://github.com/geooo109))*
114
+ - [`b81ae62`](https://github.com/tobymao/sqlglot/commit/b81ae629bfb27760ddd832402a86dabe4e65072f) - **exasol**: map STR_TO_TIME to TO_DATE and *(PR [#5407](https://github.com/tobymao/sqlglot/pull/5407) by [@nnamdi16](https://github.com/nnamdi16))*
115
+ - [`c2fb9ab`](https://github.com/tobymao/sqlglot/commit/c2fb9abeb2f077f00278e46efd9573a3806cd218) - add `DateStrToTime` *(PR [#5409](https://github.com/tobymao/sqlglot/pull/5409) by [@betodealmeida](https://github.com/betodealmeida))*
116
+ - [`a95993a`](https://github.com/tobymao/sqlglot/commit/a95993ae4e8aa99969db059a534819a4f0b62b96) - **snowflake**: improve transpilation of queries with UNNEST sources *(PR [#5408](https://github.com/tobymao/sqlglot/pull/5408) by [@georgesittas](https://github.com/georgesittas))*
117
+ - [`7b69f54`](https://github.com/tobymao/sqlglot/commit/7b69f545bbcfeb1e1f2f3b7e0b9757cfd675e4a5) - **snowflake**: Support SEMANTIC_VIEW *(PR [#5414](https://github.com/tobymao/sqlglot/pull/5414) by [@VaggelisD](https://github.com/VaggelisD))*
118
+ - :arrow_lower_right: *addresses issue [#5406](https://github.com/tobymao/sqlglot/issues/5406) opened by [@jkillian](https://github.com/jkillian)*
119
+ - [`7dba6f6`](https://github.com/tobymao/sqlglot/commit/7dba6f64d9a7945bbdef1b6e014d802014567a1e) - **exasol**: map AT TIME ZONE to CONVERT_TZ *(PR [#5416](https://github.com/tobymao/sqlglot/pull/5416) by [@nnamdi16](https://github.com/nnamdi16))*
120
+ - [`25f2c1b`](https://github.com/tobymao/sqlglot/commit/25f2c1bb18f9d073b128150566cb27c0c2da0865) - **postgres**: query placeholders *(PR [#5415](https://github.com/tobymao/sqlglot/pull/5415) by [@geooo109](https://github.com/geooo109))*
121
+ - :arrow_lower_right: *addresses issue [#5412](https://github.com/tobymao/sqlglot/issues/5412) opened by [@aersam](https://github.com/aersam)*
122
+ - [`c309c87`](https://github.com/tobymao/sqlglot/commit/c309c8763a90bf0bce02e21f4088b38d85556cce) - **doris**: support range partitioning *(PR [#5402](https://github.com/tobymao/sqlglot/pull/5402) by [@xinge-ji](https://github.com/xinge-ji))*
123
+ - [`394d3a8`](https://github.com/tobymao/sqlglot/commit/394d3a81ef41d3052c0b0d6e48180c344b7db143) - **dremio**: Add support for DATE_ADD and DATE_SUB *(PR [#5411](https://github.com/tobymao/sqlglot/pull/5411) by [@mateuszpoleski](https://github.com/mateuszpoleski))*
124
+ - [`9cfac4f`](https://github.com/tobymao/sqlglot/commit/9cfac4fb04ce1fd038c3e8cbdb755cc24c052497) - **doris**: enhance partitioning support *(PR [#5421](https://github.com/tobymao/sqlglot/pull/5421) by [@xinge-ji](https://github.com/xinge-ji))*
125
+ - [`a018bea`](https://github.com/tobymao/sqlglot/commit/a018bea159261a3ad4ac082f29e30fe1153995b3) - **exasol**: mapped exp.CurrentUser to exasol CURRENT_USER *(PR [#5422](https://github.com/tobymao/sqlglot/pull/5422) by [@nnamdi16](https://github.com/nnamdi16))*
126
+ - [`489dc5c`](https://github.com/tobymao/sqlglot/commit/489dc5c2f7506e0fe4de549384dd0f816e9fd12f) - **optimizer**: parse and annotate type support for JSON_ARRAY *(PR [#5424](https://github.com/tobymao/sqlglot/pull/5424) by [@geooo109](https://github.com/geooo109))*
127
+ - [`0ed518c`](https://github.com/tobymao/sqlglot/commit/0ed518c67042002ee0af91bee0b9e7093c85f926) - **optimizer**: annotate type for bigquery JSON_VALUE *(PR [#5427](https://github.com/tobymao/sqlglot/pull/5427) by [@geooo109](https://github.com/geooo109))*
128
+ - [`6091617`](https://github.com/tobymao/sqlglot/commit/6091617067c263e3e834e579b37aa1c601b1ddc7) - **optimizer**: annotate type for bigquery JSON_VALUE_ARRAY *(PR [#5428](https://github.com/tobymao/sqlglot/pull/5428) by [@geooo109](https://github.com/geooo109))*
129
+ - [`631c851`](https://github.com/tobymao/sqlglot/commit/631c851cbbfbf55cb66a79c2549aeeb443fcab83) - **optimizer**: parse and annotate type support for bigquery JSON_TYPE *(PR [#5430](https://github.com/tobymao/sqlglot/pull/5430) by [@geooo109](https://github.com/geooo109))*
130
+ - [`732548f`](https://github.com/tobymao/sqlglot/commit/732548ff7a6792cfa38dba8b3b8a73a302532ae7) - **postgresql**: add support for table creation DDL that contains a primary key alongside the INCLUDE keyword *(PR [#5425](https://github.com/tobymao/sqlglot/pull/5425) by [@amosbiras](https://github.com/amosbiras))*
131
+ - [`9f887f1`](https://github.com/tobymao/sqlglot/commit/9f887f14d20cd493b4a0a4489649fc5b9f2ae7fd) - Add support for BETWEEN flags *(PR [#5435](https://github.com/tobymao/sqlglot/pull/5435) by [@mateuszpoleski](https://github.com/mateuszpoleski))*
132
+ - [`edef00a`](https://github.com/tobymao/sqlglot/commit/edef00af9b703ace76871b989d9b94d9c30dcafd) - **duckdb**: Add reset command for duckdb *(PR [#5448](https://github.com/tobymao/sqlglot/pull/5448) by [@themisvaltinos](https://github.com/themisvaltinos))*
133
+ - [`6268f6f`](https://github.com/tobymao/sqlglot/commit/6268f6f39dda1ca5cf2ad0403e219b49c5c9593a) - **tsql**: add default precision to CHAR/VARCHAR create expressions *(PR [#5434](https://github.com/tobymao/sqlglot/pull/5434) by [@mattiasthalen](https://github.com/mattiasthalen))*
134
+ - [`bbf26e9`](https://github.com/tobymao/sqlglot/commit/bbf26e9610bee341d4e6df12a031b05ff6b57861) - **mysql**: Add support for SELECT DISTINCTROW *(PR [#5446](https://github.com/tobymao/sqlglot/pull/5446) by [@VaggelisD](https://github.com/VaggelisD))*
135
+ - :arrow_lower_right: *addresses issue [#5445](https://github.com/tobymao/sqlglot/issues/5445) opened by [@chenweida123](https://github.com/chenweida123)*
136
+ - [`8467bad`](https://github.com/tobymao/sqlglot/commit/8467bad405e27c842c989e71588adc39cf2383fc) - add parsing/generating for BigQuery `DECLARE` *(PR [#5442](https://github.com/tobymao/sqlglot/pull/5442) by [@plaflamme](https://github.com/plaflamme))*
137
+ - [`190f8ab`](https://github.com/tobymao/sqlglot/commit/190f8abe3d3bbda09e2f945287398d2aa9d6a863) - improve BigQuery `UNNEST` transpilation *(PR [#5451](https://github.com/tobymao/sqlglot/pull/5451) by [@georgesittas](https://github.com/georgesittas))*
138
+ - [`dbef44d`](https://github.com/tobymao/sqlglot/commit/dbef44db64d8c80e5000c55c981e0de89054e6eb) - **exasol**: mapped STRPOS to INSTR in exasol dialect *(PR [#5454](https://github.com/tobymao/sqlglot/pull/5454) by [@nnamdi16](https://github.com/nnamdi16))*
139
+ - [`010c34c`](https://github.com/tobymao/sqlglot/commit/010c34c1803df0223cf65263f2fb03b404e5141c) - support `DESC SEMANTIC VIEW` *(PR [#5452](https://github.com/tobymao/sqlglot/pull/5452) by [@betodealmeida](https://github.com/betodealmeida))*
140
+ - [`9795021`](https://github.com/tobymao/sqlglot/commit/9795021ff35bae17ff5a9ba7c5cdb46a75aab63b) - **exasol**: transformed column comments *(PR [#5464](https://github.com/tobymao/sqlglot/pull/5464) by [@nnamdi16](https://github.com/nnamdi16))*
141
+ - [`4c5b687`](https://github.com/tobymao/sqlglot/commit/4c5b68746dcede62ca9d1217bd428f50a1731e2c) - **snowflake**: transpile IS <boolean> (IS can only be used with NULL) *(PR [#5467](https://github.com/tobymao/sqlglot/pull/5467) by [@georgesittas](https://github.com/georgesittas))*
142
+
143
+ ### :bug: Bug Fixes
144
+ - [`d7ccb48`](https://github.com/tobymao/sqlglot/commit/d7ccb48e542c49258e31cc4df45f49beebc2e238) - **duckdb**: week/quarter support *(PR [#5374](https://github.com/tobymao/sqlglot/pull/5374) by [@eakmanrq](https://github.com/eakmanrq))*
145
+ - [`252469d`](https://github.com/tobymao/sqlglot/commit/252469d2d0ed221dbb2fde86043506ad15dbe7e5) - **snowflake**: transpile bigquery CURRENT_DATE with timezone *(PR [#5387](https://github.com/tobymao/sqlglot/pull/5387) by [@geooo109](https://github.com/geooo109))*
146
+ - [`7511853`](https://github.com/tobymao/sqlglot/commit/751185325caf838107ecb4e8f35ad77bf3cc9bf2) - **postgres**: add XML type *(PR [#5396](https://github.com/tobymao/sqlglot/pull/5396) by [@geooo109](https://github.com/geooo109))*
147
+ - :arrow_lower_right: *fixes issue [#5393](https://github.com/tobymao/sqlglot/issues/5393) opened by [@aersam](https://github.com/aersam)*
148
+ - [`9e8d3ab`](https://github.com/tobymao/sqlglot/commit/9e8d3abedcffb1c267ed0e6a8332af3b52105d41) - **optimizer**: Preserve struct-column parentheses for RisingWave dialect *(PR [#5376](https://github.com/tobymao/sqlglot/pull/5376) by [@MisterWheatley](https://github.com/MisterWheatley))*
149
+ - [`3223e63`](https://github.com/tobymao/sqlglot/commit/3223e6394fdd3f8e48c68bbb940b661ff8e76fd8) - **fabric**: cast datetimeoffset to datetime2 *(PR [#5385](https://github.com/tobymao/sqlglot/pull/5385) by [@mattiasthalen](https://github.com/mattiasthalen))*
150
+ - [`12b49dd`](https://github.com/tobymao/sqlglot/commit/12b49dd800951a48ea8bc0f01d7c35340236f559) - remove equal sign from CREATE TABLE comment (doris, starrocks) *(PR [#5390](https://github.com/tobymao/sqlglot/pull/5390) by [@xinge-ji](https://github.com/xinge-ji))*
151
+ - [`06cea31`](https://github.com/tobymao/sqlglot/commit/06cea310bd9fd3a9a9fa0ba008596e878a430df8) - **postgres**: support KEY related locks *(PR [#5397](https://github.com/tobymao/sqlglot/pull/5397) by [@geooo109](https://github.com/geooo109))*
152
+ - :arrow_lower_right: *fixes issue [#5394](https://github.com/tobymao/sqlglot/issues/5394) opened by [@aurimasandriusaitis](https://github.com/aurimasandriusaitis)*
153
+ - [`92d93a6`](https://github.com/tobymao/sqlglot/commit/92d93a624b41df8bb4628c1f2d0cbb8c7844c927) - **parser**: do not consume modifier prefixes in group parser, fixes [#5400](https://github.com/tobymao/sqlglot/pull/5400) *(commit by [@georgesittas](https://github.com/georgesittas))*
154
+ - [`ba0c801`](https://github.com/tobymao/sqlglot/commit/ba0c801e3dab8e08d4b5f7f73247ec6cfdc667e5) - **tsql**: change READ_ONLY to READONLY *(PR [#5410](https://github.com/tobymao/sqlglot/pull/5410) by [@CrispinStichartFNSB](https://github.com/CrispinStichartFNSB))*
155
+ - [`63da895`](https://github.com/tobymao/sqlglot/commit/63da89563fddc13ee7aec06ee36d8a0f74227ee1) - **risingwave**: Fix RisingWave dialect SQL for MAP datatype declaration *(PR [#5418](https://github.com/tobymao/sqlglot/pull/5418) by [@MisterWheatley](https://github.com/MisterWheatley))*
156
+ - [`edacae1`](https://github.com/tobymao/sqlglot/commit/edacae183fe26ea25bffe1bccd335bf57ed34ecb) - **snowflake**: transpile bigquery GENERATE_DATE_ARRAY with column access *(PR [#5388](https://github.com/tobymao/sqlglot/pull/5388) by [@geooo109](https://github.com/geooo109))*
157
+ - [`5835b8d`](https://github.com/tobymao/sqlglot/commit/5835b8d6c7fe77d9645691bb88021af137ed0bac) - **duckdb**: make bracket parsing aware of duckdb MAP func *(PR [#5423](https://github.com/tobymao/sqlglot/pull/5423) by [@geooo109](https://github.com/geooo109))*
158
+ - :arrow_lower_right: *fixes issue [#5417](https://github.com/tobymao/sqlglot/issues/5417) opened by [@MisterWheatley](https://github.com/MisterWheatley)*
159
+ - [`5c59816`](https://github.com/tobymao/sqlglot/commit/5c59816f5572f8adb1de9c97f0007d19091910ec) - **snowflake**: ALTER TABLE ADD with multiple columns *(PR [#5431](https://github.com/tobymao/sqlglot/pull/5431) by [@geooo109](https://github.com/geooo109))*
160
+ - :arrow_lower_right: *fixes issue [#5426](https://github.com/tobymao/sqlglot/issues/5426) opened by [@ca0904](https://github.com/ca0904)*
161
+ - [`9f860a0`](https://github.com/tobymao/sqlglot/commit/9f860a0ce47f74930efa1afcd86fe7668a40c239) - **snowflake**: ALTER TABLE ADD with IF NOT EXISTS *(PR [#5438](https://github.com/tobymao/sqlglot/pull/5438) by [@geooo109](https://github.com/geooo109))*
162
+ - :arrow_lower_right: *fixes issue [#5432](https://github.com/tobymao/sqlglot/issues/5432) opened by [@ca0904](https://github.com/ca0904)*
163
+ - [`d7b3a26`](https://github.com/tobymao/sqlglot/commit/d7b3a261647e4ce675c84bbf72a33d320099fc01) - **postgres**: transpile duckdb LIST_HAS_ANY and LIST_CONTAINS *(PR [#5440](https://github.com/tobymao/sqlglot/pull/5440) by [@geooo109](https://github.com/geooo109))*
164
+ - :arrow_lower_right: *fixes issue [#5437](https://github.com/tobymao/sqlglot/issues/5437) opened by [@aersam](https://github.com/aersam)*
165
+ - [`79c5c30`](https://github.com/tobymao/sqlglot/commit/79c5c30f3802c6959376b3b0f3c4d055a30b6b43) - **spark**: transpile STRING_AGG *(PR [#5449](https://github.com/tobymao/sqlglot/pull/5449) by [@geooo109](https://github.com/geooo109))*
166
+ - :arrow_lower_right: *fixes issue [#5441](https://github.com/tobymao/sqlglot/issues/5441) opened by [@dxaen](https://github.com/dxaen)*
167
+ - [`3590e75`](https://github.com/tobymao/sqlglot/commit/3590e75c1df2d572e2fea664893dba5565a17e05) - **postgres**: support ? placeholder *(PR [#5455](https://github.com/tobymao/sqlglot/pull/5455) by [@geooo109](https://github.com/geooo109))*
168
+ - :arrow_lower_right: *fixes issue [#5453](https://github.com/tobymao/sqlglot/issues/5453) opened by [@jkillian](https://github.com/jkillian)*
169
+ - [`cdbf595`](https://github.com/tobymao/sqlglot/commit/cdbf5953171c8d4c8e4a24262f278c6f7d74e057) - **snowflake**: Wrap GET_PATH value with PARSE_JSON preemptively *(PR [#5458](https://github.com/tobymao/sqlglot/pull/5458) by [@VaggelisD](https://github.com/VaggelisD))*
170
+ - [`8f16f52`](https://github.com/tobymao/sqlglot/commit/8f16f52859b66e3f8b30fff82f0c1679c7e37a25) - restore default `sql_names` for `DecodeCase` *(PR [#5465](https://github.com/tobymao/sqlglot/pull/5465) by [@georgesittas](https://github.com/georgesittas))*
171
+ - [`bee82f3`](https://github.com/tobymao/sqlglot/commit/bee82f37ac537780495ff408738d88871208517a) - **snowflake**: Remove `UNKNOWN` type from `TRY_CAST` *(PR [#5466](https://github.com/tobymao/sqlglot/pull/5466) by [@VaggelisD](https://github.com/VaggelisD))*
172
+
173
+ ### :wrench: Chores
174
+ - [`71b1349`](https://github.com/tobymao/sqlglot/commit/71b1349a26d2b9839899900ef8fdfb1ebc3d68fd) - **postgres, hive**: use ASCII node instead of UNICODE node *(PR [#5380](https://github.com/tobymao/sqlglot/pull/5380) by [@geooo109](https://github.com/geooo109))*
175
+ - [`a5c2245`](https://github.com/tobymao/sqlglot/commit/a5c2245c3e30f5bc3f410edacf3a077ce99f4a80) - improve error msg for PIVOT with missing aggregation *(commit by [@georgesittas](https://github.com/georgesittas))*
176
+ - [`59fd875`](https://github.com/tobymao/sqlglot/commit/59fd875cd4ee1c44f9ca20f701215ae64d669d60) - Refactor PRIMARY KEY ... INCLUDE handling *(PR [#5433](https://github.com/tobymao/sqlglot/pull/5433) by [@VaggelisD](https://github.com/VaggelisD))*
177
+ - [`e9bb3e8`](https://github.com/tobymao/sqlglot/commit/e9bb3e8ccb52c76ed77fc5e7d04cf75230b737fa) - Refactor DECLARE statement *(PR [#5450](https://github.com/tobymao/sqlglot/pull/5450) by [@VaggelisD](https://github.com/VaggelisD))*
178
+
179
+
4
180
  ## [v27.2.0] - 2025-07-22
5
181
  ### :boom: BREAKING CHANGES
6
182
  - due to [`6268f6f`](https://github.com/tobymao/sqlglot/commit/6268f6f39dda1ca5cf2ad0403e219b49c5c9593a) - add default precision to CHAR/VARCHAR create expressions *(PR [#5434](https://github.com/tobymao/sqlglot/pull/5434) by [@mattiasthalen](https://github.com/mattiasthalen))*:
@@ -6114,3 +6290,4 @@ Changelog
6114
6290
  [v27.0.0]: https://github.com/tobymao/sqlglot/compare/v26.21.3...v27.0.0
6115
6291
  [v27.1.0]: https://github.com/tobymao/sqlglot/compare/v26.31.2...v27.1.0
6116
6292
  [v27.2.0]: https://github.com/tobymao/sqlglot/compare/v27.1.0...v27.2.0
6293
+ [v27.3.0]: https://github.com/tobymao/sqlglot/compare/v27.0.1...v27.3.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlglot
3
- Version: 27.3.0
3
+ Version: 27.3.1
4
4
  Summary: An easily customizable SQL parser and transpiler
5
5
  Author-email: Toby Mao <toby.mao@gmail.com>
6
6
  License: MIT License
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '27.3.0'
21
- __version_tuple__ = version_tuple = (27, 3, 0)
20
+ __version__ = version = '27.3.1'
21
+ __version_tuple__ = version_tuple = (27, 3, 1)
@@ -85,6 +85,7 @@ DIALECTS = [
85
85
  "PRQL",
86
86
  "Redshift",
87
87
  "RisingWave",
88
+ "SingleStore",
88
89
  "Snowflake",
89
90
  "Spark",
90
91
  "Spark2",
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
 
4
- from sqlglot import exp
4
+ from sqlglot import exp, transforms
5
5
  from sqlglot.dialects.dialect import NormalizationStrategy
6
6
  from sqlglot.dialects.tsql import TSQL
7
7
  from sqlglot.tokens import TokenType
@@ -27,6 +27,27 @@ def _cap_data_type_precision(expression: exp.DataType, max_precision: int = 6) -
27
27
  )
28
28
 
29
29
 
30
+ def _add_default_precision_to_varchar(expression: exp.Expression) -> exp.Expression:
31
+ """Transform function to add VARCHAR(MAX) or CHAR(MAX) for cross-dialect conversion."""
32
+ if (
33
+ isinstance(expression, exp.Create)
34
+ and expression.kind == "TABLE"
35
+ and isinstance(expression.this, exp.Schema)
36
+ ):
37
+ for column in expression.this.expressions:
38
+ if isinstance(column, exp.ColumnDef):
39
+ column_type = column.kind
40
+ if (
41
+ isinstance(column_type, exp.DataType)
42
+ and column_type.this in (exp.DataType.Type.VARCHAR, exp.DataType.Type.CHAR)
43
+ and not column_type.expressions
44
+ ):
45
+ # For transpilation, VARCHAR/CHAR without precision becomes VARCHAR(MAX)/CHAR(MAX)
46
+ column_type.set("expressions", [exp.var("MAX")])
47
+
48
+ return expression
49
+
50
+
30
51
  class Fabric(TSQL):
31
52
  """
32
53
  Microsoft Fabric Data Warehouse dialect that inherits from T-SQL.
@@ -60,6 +81,29 @@ class Fabric(TSQL):
60
81
  "UTINYINT": TokenType.UTINYINT,
61
82
  }
62
83
 
84
+ class Parser(TSQL.Parser):
85
+ def _parse_create(self) -> exp.Create | exp.Command:
86
+ create = super()._parse_create()
87
+
88
+ if isinstance(create, exp.Create):
89
+ # Transform VARCHAR/CHAR without precision to VARCHAR(1)/CHAR(1)
90
+ if create.kind == "TABLE" and isinstance(create.this, exp.Schema):
91
+ for column in create.this.expressions:
92
+ if isinstance(column, exp.ColumnDef):
93
+ column_type = column.kind
94
+ if (
95
+ isinstance(column_type, exp.DataType)
96
+ and column_type.this
97
+ in (exp.DataType.Type.VARCHAR, exp.DataType.Type.CHAR)
98
+ and not column_type.expressions
99
+ ):
100
+ # Add default precision of 1 to VARCHAR/CHAR without precision
101
+ # When n isn't specified in a data definition or variable declaration statement, the default length is 1.
102
+ # https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-ver17#remarks
103
+ column_type.set("expressions", [exp.Literal.number("1")])
104
+
105
+ return create
106
+
63
107
  class Generator(TSQL.Generator):
64
108
  # Fabric-specific type mappings - override T-SQL types that aren't supported
65
109
  # Reference: https://learn.microsoft.com/en-us/fabric/data-warehouse/data-types
@@ -85,6 +129,11 @@ class Fabric(TSQL):
85
129
  exp.DataType.Type.XML: "VARCHAR",
86
130
  }
87
131
 
132
+ TRANSFORMS = {
133
+ **TSQL.Generator.TRANSFORMS,
134
+ exp.Create: transforms.preprocess([_add_default_precision_to_varchar]),
135
+ }
136
+
88
137
  def datatype_sql(self, expression: exp.DataType) -> str:
89
138
  # Check if this is a temporal type that needs precision handling. Fabric limits temporal
90
139
  # types to max 6 digits precision. When no precision is specified, we default to 6 digits.
@@ -0,0 +1,5 @@
1
+ from sqlglot.dialects.mysql import MySQL
2
+
3
+
4
+ class SingleStore(MySQL):
5
+ SUPPORTS_ORDER_BY_ALL = True
@@ -392,27 +392,6 @@ def _timestrtotime_sql(self: TSQL.Generator, expression: exp.TimeStrToTime):
392
392
  return sql
393
393
 
394
394
 
395
- def _add_default_precision_to_varchar(expression: exp.Expression) -> exp.Expression:
396
- """Transform function to add VARCHAR(MAX) or CHAR(MAX) for cross-dialect conversion."""
397
- if (
398
- isinstance(expression, exp.Create)
399
- and expression.kind == "TABLE"
400
- and isinstance(expression.this, exp.Schema)
401
- ):
402
- for column in expression.this.expressions:
403
- if isinstance(column, exp.ColumnDef):
404
- column_type = column.kind
405
- if (
406
- isinstance(column_type, exp.DataType)
407
- and column_type.this in (exp.DataType.Type.VARCHAR, exp.DataType.Type.CHAR)
408
- and not column_type.expressions
409
- ):
410
- # For transpilation, VARCHAR/CHAR without precision becomes VARCHAR(MAX)/CHAR(MAX)
411
- column_type.set("expressions", [exp.var("MAX")])
412
-
413
- return expression
414
-
415
-
416
395
  def _build_datetrunc(args: t.List) -> exp.TimestampTrunc:
417
396
  unit = seq_get(args, 0)
418
397
  this = seq_get(args, 1)
@@ -890,22 +869,6 @@ class TSQL(Dialect):
890
869
 
891
870
  create.args["properties"].append("expressions", exp.TemporaryProperty())
892
871
 
893
- # Transform VARCHAR/CHAR without precision to VARCHAR(1)/CHAR(1)
894
- if create.kind == "TABLE" and isinstance(create.this, exp.Schema):
895
- for column in create.this.expressions:
896
- if isinstance(column, exp.ColumnDef):
897
- column_type = column.kind
898
- if (
899
- isinstance(column_type, exp.DataType)
900
- and column_type.this
901
- in (exp.DataType.Type.VARCHAR, exp.DataType.Type.CHAR)
902
- and not column_type.expressions
903
- ):
904
- # Add default precision of 1 to VARCHAR/CHAR without precision
905
- # When n isn't specified in a data definition or variable declaration statement, the default length is 1.
906
- # https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-ver17#remarks
907
- column_type.set("expressions", [exp.Literal.number("1")])
908
-
909
872
  return create
910
873
 
911
874
  def _parse_if(self) -> t.Optional[exp.Expression]:
@@ -1043,7 +1006,6 @@ class TSQL(Dialect):
1043
1006
  exp.DateAdd: date_delta_sql("DATEADD"),
1044
1007
  exp.DateDiff: date_delta_sql("DATEDIFF"),
1045
1008
  exp.CTE: transforms.preprocess([qualify_derived_table_outputs]),
1046
- exp.Create: transforms.preprocess([_add_default_precision_to_varchar]),
1047
1009
  exp.CurrentDate: rename_func("GETDATE"),
1048
1010
  exp.CurrentTimestamp: rename_func("GETDATE"),
1049
1011
  exp.CurrentTimestampLTZ: rename_func("SYSDATETIMEOFFSET"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlglot
3
- Version: 27.3.0
3
+ Version: 27.3.1
4
4
  Summary: An easily customizable SQL parser and transpiler
5
5
  Author-email: Toby Mao <toby.mao@gmail.com>
6
6
  License: MIT License
@@ -59,6 +59,7 @@ sqlglot/dialects/presto.py
59
59
  sqlglot/dialects/prql.py
60
60
  sqlglot/dialects/redshift.py
61
61
  sqlglot/dialects/risingwave.py
62
+ sqlglot/dialects/singlestore.py
62
63
  sqlglot/dialects/snowflake.py
63
64
  sqlglot/dialects/spark.py
64
65
  sqlglot/dialects/spark2.py
@@ -151,6 +152,7 @@ tests/dialects/test_presto.py
151
152
  tests/dialects/test_prql.py
152
153
  tests/dialects/test_redshift.py
153
154
  tests/dialects/test_risingwave.py
155
+ tests/dialects/test_singlestore.py
154
156
  tests/dialects/test_snowflake.py
155
157
  tests/dialects/test_spark.py
156
158
  tests/dialects/test_sqlite.py
@@ -95,3 +95,40 @@ class TestFabric(Validator):
95
95
  "UNIX_TO_TIME(column)",
96
96
  "DATEADD(MICROSECONDS, CAST(ROUND(column * 1e6, 0) AS BIGINT), CAST('1970-01-01' AS DATETIME2(6)))",
97
97
  )
98
+
99
+ def test_varchar_precision_inference(self):
100
+ # Test VARCHAR without precision conversion to VARCHAR(1)
101
+ self.validate_identity(
102
+ "CREATE TABLE t (col VARCHAR)",
103
+ "CREATE TABLE t (col VARCHAR(1))",
104
+ )
105
+
106
+ # Test VARCHAR with existing precision should remain unchanged
107
+ self.validate_identity("CREATE TABLE t (col VARCHAR(50))")
108
+
109
+ # Test CHAR without precision conversion to CHAR(1)
110
+ self.validate_identity(
111
+ "CREATE TABLE t (col CHAR)",
112
+ "CREATE TABLE t (col CHAR(1))",
113
+ )
114
+
115
+ # Test CHAR with existing precision should remain unchanged
116
+ self.validate_identity("CREATE TABLE t (col CHAR(10))")
117
+
118
+ # Test cross-dialect conversion: non-TSQL VARCHAR -> TSQL VARCHAR(MAX)
119
+ self.validate_all(
120
+ "CREATE TABLE t (col VARCHAR(MAX))",
121
+ read={
122
+ "postgres": "CREATE TABLE t (col VARCHAR)",
123
+ "tsql": "CREATE TABLE t (col VARCHAR(MAX))",
124
+ },
125
+ )
126
+
127
+ # Test cross-dialect conversion: non-TSQL CHAR -> TSQL CHAR(MAX)
128
+ self.validate_all(
129
+ "CREATE TABLE t (col CHAR(MAX))",
130
+ read={
131
+ "postgres": "CREATE TABLE t (col CHAR)",
132
+ "tsql": "CREATE TABLE t (col CHAR(MAX))",
133
+ },
134
+ )
@@ -0,0 +1,20 @@
1
+ from sqlglot import parse_one
2
+ from sqlglot.optimizer.qualify import qualify
3
+ from tests.dialects.test_dialect import Validator
4
+
5
+
6
+ class TestSingleStore(Validator):
7
+ dialect = "singlestore"
8
+
9
+ def test_basic(self):
10
+ self.validate_identity("SELECT 1")
11
+ self.validate_identity("SELECT * FROM users ORDER BY ALL")
12
+ ast = parse_one(
13
+ "SELECT id AS my_id FROM data WHERE my_id = 1 GROUP BY my_id HAVING my_id = 1",
14
+ dialect=self.dialect,
15
+ )
16
+ ast = qualify(ast, dialect=self.dialect, schema={"data": {"id": "INT", "my_id": "INT"}})
17
+ self.assertEqual(
18
+ "SELECT `data`.`id` AS `my_id` FROM `data` AS `data` WHERE `data`.`my_id` = 1 GROUP BY `data`.`my_id` HAVING `data`.`id` = 1",
19
+ ast.sql(dialect=self.dialect),
20
+ )
@@ -288,42 +288,6 @@ class TestTSQL(Validator):
288
288
  "CREATE TABLE [db].[tbl] ([a] INTEGER)",
289
289
  )
290
290
 
291
- # Test VARCHAR without precision conversion to VARCHAR(1)
292
- self.validate_identity(
293
- "CREATE TABLE t (col VARCHAR)",
294
- "CREATE TABLE t (col VARCHAR(1))",
295
- )
296
-
297
- # Test VARCHAR with existing precision should remain unchanged
298
- self.validate_identity("CREATE TABLE t (col VARCHAR(50))")
299
-
300
- # Test CHAR without precision conversion to CHAR(1)
301
- self.validate_identity(
302
- "CREATE TABLE t (col CHAR)",
303
- "CREATE TABLE t (col CHAR(1))",
304
- )
305
-
306
- # Test CHAR with existing precision should remain unchanged
307
- self.validate_identity("CREATE TABLE t (col CHAR(10))")
308
-
309
- # Test cross-dialect conversion: non-TSQL VARCHAR -> TSQL VARCHAR(MAX)
310
- self.validate_all(
311
- "CREATE TABLE t (col VARCHAR(MAX))",
312
- read={
313
- "postgres": "CREATE TABLE t (col VARCHAR)",
314
- "tsql": "CREATE TABLE t (col VARCHAR(MAX))",
315
- },
316
- )
317
-
318
- # Test cross-dialect conversion: non-TSQL CHAR -> TSQL CHAR(MAX)
319
- self.validate_all(
320
- "CREATE TABLE t (col CHAR(MAX))",
321
- read={
322
- "postgres": "CREATE TABLE t (col CHAR)",
323
- "tsql": "CREATE TABLE t (col CHAR(MAX))",
324
- },
325
- )
326
-
327
291
  self.validate_identity("SELECT a = 1", "SELECT 1 AS a").selects[0].assert_is(
328
292
  exp.Alias
329
293
  ).args["alias"].assert_is(exp.Identifier)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes