1
0
Fork 0

Adding upstream version 26.17.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-12 06:50:57 +02:00
parent 4362133ee5
commit 873e685933
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
63 changed files with 16004 additions and 15816 deletions

View file

@ -1,6 +1,14 @@
Changelog
=========
## [v26.16.4] - 2025-05-02
### :bug: Bug Fixes
- [`52e068f`](https://github.com/tobymao/sqlglot/commit/52e068f74bd6844d0273ddcc7637d249e6ed51c1) - **databricks**: Preserve colon operators in TRY_CAST *(PR [#5028](https://github.com/tobymao/sqlglot/pull/5028) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#5027](https://github.com/tobymao/sqlglot/issues/5027) opened by [@aersam](https://github.com/aersam)*
- [`91e5036`](https://github.com/tobymao/sqlglot/commit/91e5036831b87fd4670424e6a49e81efead432f2) - **parser**: Do not parse set ops if input expr is None *(PR [#5030](https://github.com/tobymao/sqlglot/pull/5030) by [@VaggelisD](https://github.com/VaggelisD))*
- [`8f77b30`](https://github.com/tobymao/sqlglot/commit/8f77b301a267eadb4c4792201e112159db554d1c) - **snowflake**: get function *(commit by [@tobymao](https://github.com/tobymao))*
## [v26.16.3] - 2025-05-01
### :boom: BREAKING CHANGES
- due to [`f5358d8`](https://github.com/tobymao/sqlglot/commit/f5358d8a3e2743b5ac0d540f10502d333ad4e082) - add support for GET statements *(PR [#5019](https://github.com/tobymao/sqlglot/pull/5019) by [@eruditmorina](https://github.com/eruditmorina))*:
@ -6487,3 +6495,4 @@ Changelog
[v26.16.1]: https://github.com/tobymao/sqlglot/compare/v26.16.0...v26.16.1
[v26.16.2]: https://github.com/tobymao/sqlglot/compare/v26.16.1...v26.16.2
[v26.16.3]: https://github.com/tobymao/sqlglot/compare/v26.16.2...v26.16.3
[v26.16.4]: https://github.com/tobymao/sqlglot/compare/v26.16.3...v26.16.4

File diff suppressed because one or more lines are too long

View file

@ -84,8 +84,8 @@
</span><span id="L-17"><a href="#L-17"><span class="linenos">17</span></a><span class="n">__version_tuple__</span><span class="p">:</span> <span class="n">VERSION_TUPLE</span>
</span><span id="L-18"><a href="#L-18"><span class="linenos">18</span></a><span class="n">version_tuple</span><span class="p">:</span> <span class="n">VERSION_TUPLE</span>
</span><span id="L-19"><a href="#L-19"><span class="linenos">19</span></a>
</span><span id="L-20"><a href="#L-20"><span class="linenos">20</span></a><span class="n">__version__</span> <span class="o">=</span> <span class="n">version</span> <span class="o">=</span> <span class="s1">&#39;26.16.3&#39;</span>
</span><span id="L-21"><a href="#L-21"><span class="linenos">21</span></a><span class="n">__version_tuple__</span> <span class="o">=</span> <span class="n">version_tuple</span> <span class="o">=</span> <span class="p">(</span><span class="mi">26</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
</span><span id="L-20"><a href="#L-20"><span class="linenos">20</span></a><span class="n">__version__</span> <span class="o">=</span> <span class="n">version</span> <span class="o">=</span> <span class="s1">&#39;26.16.4&#39;</span>
</span><span id="L-21"><a href="#L-21"><span class="linenos">21</span></a><span class="n">__version_tuple__</span> <span class="o">=</span> <span class="n">version_tuple</span> <span class="o">=</span> <span class="p">(</span><span class="mi">26</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
</span></pre></div>
@ -93,7 +93,7 @@
<section id="__version__">
<div class="attr variable">
<span class="name">__version__</span><span class="annotation">: str</span> =
<span class="default_value">&#39;26.16.3&#39;</span>
<span class="default_value">&#39;26.16.4&#39;</span>
</div>
@ -105,7 +105,7 @@
<section id="__version_tuple__">
<div class="attr variable">
<span class="name">__version_tuple__</span><span class="annotation">: object</span> =
<span class="default_value">(26, 16, 3)</span>
<span class="default_value">(26, 16, 4)</span>
</div>
@ -117,7 +117,7 @@
<section id="version">
<div class="attr variable">
<span class="name">version</span><span class="annotation">: str</span> =
<span class="default_value">&#39;26.16.3&#39;</span>
<span class="default_value">&#39;26.16.4&#39;</span>
</div>
@ -129,7 +129,7 @@
<section id="version_tuple">
<div class="attr variable">
<span class="name">version_tuple</span><span class="annotation">: object</span> =
<span class="default_value">(26, 16, 3)</span>
<span class="default_value">(26, 16, 4)</span>
</div>

View file

@ -359,7 +359,7 @@ dialect implementations in order to understand how their various components can
<section id="Athena">
<div class="attr variable">
<span class="name">Athena</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223654967424&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930512520240&#39;&gt;</span>
</div>
@ -371,7 +371,7 @@ dialect implementations in order to understand how their various components can
<section id="BigQuery">
<div class="attr variable">
<span class="name">BigQuery</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223656927360&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930514521152&#39;&gt;</span>
</div>
@ -383,7 +383,7 @@ dialect implementations in order to understand how their various components can
<section id="ClickHouse">
<div class="attr variable">
<span class="name">ClickHouse</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223660767264&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930519272080&#39;&gt;</span>
</div>
@ -395,7 +395,7 @@ dialect implementations in order to understand how their various components can
<section id="Databricks">
<div class="attr variable">
<span class="name">Databricks</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223662982864&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930516854800&#39;&gt;</span>
</div>
@ -407,7 +407,7 @@ dialect implementations in order to understand how their various components can
<section id="Doris">
<div class="attr variable">
<span class="name">Doris</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223660478944&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930519102672&#39;&gt;</span>
</div>
@ -419,7 +419,7 @@ dialect implementations in order to understand how their various components can
<section id="Drill">
<div class="attr variable">
<span class="name">Drill</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223666653216&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930524552784&#39;&gt;</span>
</div>
@ -431,7 +431,7 @@ dialect implementations in order to understand how their various components can
<section id="Druid">
<div class="attr variable">
<span class="name">Druid</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223666655952&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930524553696&#39;&gt;</span>
</div>
@ -443,7 +443,7 @@ dialect implementations in order to understand how their various components can
<section id="DuckDB">
<div class="attr variable">
<span class="name">DuckDB</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223670315872&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527083072&#39;&gt;</span>
</div>
@ -455,7 +455,7 @@ dialect implementations in order to understand how their various components can
<section id="Dune">
<div class="attr variable">
<span class="name">Dune</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223670305216&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527085136&#39;&gt;</span>
</div>
@ -467,7 +467,7 @@ dialect implementations in order to understand how their various components can
<section id="Hive">
<div class="attr variable">
<span class="name">Hive</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223657243648&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930514780800&#39;&gt;</span>
</div>
@ -479,7 +479,7 @@ dialect implementations in order to understand how their various components can
<section id="Materialize">
<div class="attr variable">
<span class="name">Materialize</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223657238608&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930514770240&#39;&gt;</span>
</div>
@ -491,7 +491,7 @@ dialect implementations in order to understand how their various components can
<section id="MySQL">
<div class="attr variable">
<span class="name">MySQL</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223665565472&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930523412528&#39;&gt;</span>
</div>
@ -503,7 +503,7 @@ dialect implementations in order to understand how their various components can
<section id="Oracle">
<div class="attr variable">
<span class="name">Oracle</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223662411296&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930520980592&#39;&gt;</span>
</div>
@ -515,7 +515,7 @@ dialect implementations in order to understand how their various components can
<section id="Postgres">
<div class="attr variable">
<span class="name">Postgres</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223661003184&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930519622016&#39;&gt;</span>
</div>
@ -527,7 +527,7 @@ dialect implementations in order to understand how their various components can
<section id="Presto">
<div class="attr variable">
<span class="name">Presto</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223666522720&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930524419936&#39;&gt;</span>
</div>
@ -539,7 +539,7 @@ dialect implementations in order to understand how their various components can
<section id="PRQL">
<div class="attr variable">
<span class="name">PRQL</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223666526416&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930524423920&#39;&gt;</span>
</div>
@ -551,7 +551,7 @@ dialect implementations in order to understand how their various components can
<section id="Redshift">
<div class="attr variable">
<span class="name">Redshift</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223669060368&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527795088&#39;&gt;</span>
</div>
@ -563,7 +563,7 @@ dialect implementations in order to understand how their various components can
<section id="RisingWave">
<div class="attr variable">
<span class="name">RisingWave</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223669070016&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930520236048&#39;&gt;</span>
</div>
@ -575,7 +575,7 @@ dialect implementations in order to understand how their various components can
<section id="Snowflake">
<div class="attr variable">
<span class="name">Snowflake</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223661514208&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930520224528&#39;&gt;</span>
</div>
@ -587,7 +587,7 @@ dialect implementations in order to understand how their various components can
<section id="Spark">
<div class="attr variable">
<span class="name">Spark</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223668511184&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527493296&#39;&gt;</span>
</div>
@ -599,7 +599,7 @@ dialect implementations in order to understand how their various components can
<section id="Spark2">
<div class="attr variable">
<span class="name">Spark2</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223668508640&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527460000&#39;&gt;</span>
</div>
@ -611,7 +611,7 @@ dialect implementations in order to understand how their various components can
<section id="SQLite">
<div class="attr variable">
<span class="name">SQLite</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223670717072&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527452656&#39;&gt;</span>
</div>
@ -623,7 +623,7 @@ dialect implementations in order to understand how their various components can
<section id="StarRocks">
<div class="attr variable">
<span class="name">StarRocks</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223665043152&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930527588624&#39;&gt;</span>
</div>
@ -635,7 +635,7 @@ dialect implementations in order to understand how their various components can
<section id="Tableau">
<div class="attr variable">
<span class="name">Tableau</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223670678480&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930522889920&#39;&gt;</span>
</div>
@ -647,7 +647,7 @@ dialect implementations in order to understand how their various components can
<section id="Teradata">
<div class="attr variable">
<span class="name">Teradata</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223661583152&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930520249984&#39;&gt;</span>
</div>
@ -659,7 +659,7 @@ dialect implementations in order to understand how their various components can
<section id="Trino">
<div class="attr variable">
<span class="name">Trino</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223661585888&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930520246240&#39;&gt;</span>
</div>
@ -671,7 +671,7 @@ dialect implementations in order to understand how their various components can
<section id="TSQL">
<div class="attr variable">
<span class="name">TSQL</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223666222752&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930524096960&#39;&gt;</span>
</div>
@ -683,7 +683,7 @@ dialect implementations in order to understand how their various components can
<section id="Dialect">
<div class="attr variable">
<span class="name">Dialect</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223657831024&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930515373024&#39;&gt;</span>
</div>
@ -695,7 +695,7 @@ dialect implementations in order to understand how their various components can
<section id="Dialects">
<div class="attr variable">
<span class="name">Dialects</span> =
<span class="default_value">&lt;MagicMock id=&#39;140223657831648&#39;&gt;</span>
<span class="default_value">&lt;MagicMock id=&#39;139930515369760&#39;&gt;</span>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -63109,7 +63109,7 @@ Otherwise, this resets the expressions.</li>
<div id="DataType.STRUCT_TYPES" class="classattr">
<div class="attr variable">
<span class="name">STRUCT_TYPES</span> =
<span class="default_value">{&lt;Type.UNION: &#39;UNION&#39;&gt;, &lt;Type.NESTED: &#39;NESTED&#39;&gt;, &lt;Type.STRUCT: &#39;STRUCT&#39;&gt;, &lt;Type.OBJECT: &#39;OBJECT&#39;&gt;}</span>
<span class="default_value">{&lt;Type.NESTED: &#39;NESTED&#39;&gt;, &lt;Type.UNION: &#39;UNION&#39;&gt;, &lt;Type.OBJECT: &#39;OBJECT&#39;&gt;, &lt;Type.STRUCT: &#39;STRUCT&#39;&gt;}</span>
</div>
@ -63134,7 +63134,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">NESTED_TYPES</span> =
<input id="DataType.NESTED_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.NESTED_TYPES-view-value"></label><span class="default_value">{&lt;Type.STRUCT: &#39;STRUCT&#39;&gt;, &lt;Type.OBJECT: &#39;OBJECT&#39;&gt;, &lt;Type.NESTED: &#39;NESTED&#39;&gt;, &lt;Type.UNION: &#39;UNION&#39;&gt;, &lt;Type.LIST: &#39;LIST&#39;&gt;, &lt;Type.ARRAY: &#39;ARRAY&#39;&gt;, &lt;Type.MAP: &#39;MAP&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.NESTED_TYPES-view-value"></label><span class="default_value">{&lt;Type.NESTED: &#39;NESTED&#39;&gt;, &lt;Type.LIST: &#39;LIST&#39;&gt;, &lt;Type.OBJECT: &#39;OBJECT&#39;&gt;, &lt;Type.STRUCT: &#39;STRUCT&#39;&gt;, &lt;Type.UNION: &#39;UNION&#39;&gt;, &lt;Type.ARRAY: &#39;ARRAY&#39;&gt;, &lt;Type.MAP: &#39;MAP&#39;&gt;}</span>
</div>
@ -63147,7 +63147,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">TEXT_TYPES</span> =
<input id="DataType.TEXT_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.TEXT_TYPES-view-value"></label><span class="default_value">{&lt;Type.TEXT: &#39;TEXT&#39;&gt;, &lt;Type.NAME: &#39;NAME&#39;&gt;, &lt;Type.NCHAR: &#39;NCHAR&#39;&gt;, &lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;Type.CHAR: &#39;CHAR&#39;&gt;, &lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.TEXT_TYPES-view-value"></label><span class="default_value">{&lt;Type.CHAR: &#39;CHAR&#39;&gt;, &lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;Type.NCHAR: &#39;NCHAR&#39;&gt;, &lt;Type.TEXT: &#39;TEXT&#39;&gt;, &lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;Type.NAME: &#39;NAME&#39;&gt;}</span>
</div>
@ -63160,7 +63160,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">SIGNED_INTEGER_TYPES</span> =
<input id="DataType.SIGNED_INTEGER_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.SIGNED_INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.SIGNED_INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;}</span>
</div>
@ -63173,7 +63173,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">UNSIGNED_INTEGER_TYPES</span> =
<input id="DataType.UNSIGNED_INTEGER_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.UNSIGNED_INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.UNSIGNED_INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;}</span>
</div>
@ -63186,7 +63186,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">INTEGER_TYPES</span> =
<input id="DataType.INTEGER_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;, &lt;Type.BIT: &#39;BIT&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.INTEGER_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;, &lt;Type.BIT: &#39;BIT&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;}</span>
</div>
@ -63211,7 +63211,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">REAL_TYPES</span> =
<input id="DataType.REAL_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.REAL_TYPES-view-value"></label><span class="default_value">{&lt;Type.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;, &lt;Type.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;Type.DECIMAL64: &#39;DECIMAL64&#39;&gt;, &lt;Type.DECIMAL256: &#39;DECIMAL256&#39;&gt;, &lt;Type.UDOUBLE: &#39;UDOUBLE&#39;&gt;, &lt;Type.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;Type.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;Type.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;Type.MONEY: &#39;MONEY&#39;&gt;, &lt;Type.DECIMAL32: &#39;DECIMAL32&#39;&gt;, &lt;Type.DECIMAL128: &#39;DECIMAL128&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.REAL_TYPES-view-value"></label><span class="default_value">{&lt;Type.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;Type.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;Type.UDOUBLE: &#39;UDOUBLE&#39;&gt;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;, &lt;Type.DECIMAL64: &#39;DECIMAL64&#39;&gt;, &lt;Type.MONEY: &#39;MONEY&#39;&gt;, &lt;Type.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;Type.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;Type.DECIMAL128: &#39;DECIMAL128&#39;&gt;, &lt;Type.DECIMAL256: &#39;DECIMAL256&#39;&gt;, &lt;Type.DECIMAL32: &#39;DECIMAL32&#39;&gt;, &lt;Type.DOUBLE: &#39;DOUBLE&#39;&gt;}</span>
</div>
@ -63224,7 +63224,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">NUMERIC_TYPES</span> =
<input id="DataType.NUMERIC_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.NUMERIC_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;Type.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;Type.DECIMAL64: &#39;DECIMAL64&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.UDOUBLE: &#39;UDOUBLE&#39;&gt;, &lt;Type.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;Type.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;, &lt;Type.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.DECIMAL32: &#39;DECIMAL32&#39;&gt;, &lt;Type.DECIMAL128: &#39;DECIMAL128&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;, &lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.DECIMAL256: &#39;DECIMAL256&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.MONEY: &#39;MONEY&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;Type.BIT: &#39;BIT&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.NUMERIC_TYPES-view-value"></label><span class="default_value">{&lt;Type.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;Type.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;Type.UINT256: &#39;UINT256&#39;&gt;, &lt;Type.UDOUBLE: &#39;UDOUBLE&#39;&gt;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;, &lt;Type.DECIMAL64: &#39;DECIMAL64&#39;&gt;, &lt;Type.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;Type.INT: &#39;INT&#39;&gt;, &lt;Type.MONEY: &#39;MONEY&#39;&gt;, &lt;Type.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;Type.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;Type.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;Type.INT128: &#39;INT128&#39;&gt;, &lt;Type.DECIMAL128: &#39;DECIMAL128&#39;&gt;, &lt;Type.DECIMAL256: &#39;DECIMAL256&#39;&gt;, &lt;Type.DECIMAL32: &#39;DECIMAL32&#39;&gt;, &lt;Type.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;Type.UINT128: &#39;UINT128&#39;&gt;, &lt;Type.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;Type.UINT: &#39;UINT&#39;&gt;, &lt;Type.BIT: &#39;BIT&#39;&gt;, &lt;Type.INT256: &#39;INT256&#39;&gt;, &lt;Type.BIGINT: &#39;BIGINT&#39;&gt;, &lt;Type.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;Type.TINYINT: &#39;TINYINT&#39;&gt;, &lt;Type.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;Type.UTINYINT: &#39;UTINYINT&#39;&gt;}</span>
</div>
@ -63237,7 +63237,7 @@ Otherwise, this resets the expressions.</li>
<div class="attr variable">
<span class="name">TEMPORAL_TYPES</span> =
<input id="DataType.TEMPORAL_TYPES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DataType.TEMPORAL_TYPES-view-value"></label><span class="default_value">{&lt;Type.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;Type.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;Type.TIMESTAMPNTZ: &#39;TIMESTAMPNTZ&#39;&gt;, &lt;Type.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;Type.DATETIME2: &#39;DATETIME2&#39;&gt;, &lt;Type.DATE: &#39;DATE&#39;&gt;, &lt;Type.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;Type.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;Type.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;Type.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;Type.TIME: &#39;TIME&#39;&gt;, &lt;Type.SMALLDATETIME: &#39;SMALLDATETIME&#39;&gt;, &lt;Type.DATETIME: &#39;DATETIME&#39;&gt;, &lt;Type.DATE32: &#39;DATE32&#39;&gt;, &lt;Type.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DataType.TEMPORAL_TYPES-view-value"></label><span class="default_value">{&lt;Type.SMALLDATETIME: &#39;SMALLDATETIME&#39;&gt;, &lt;Type.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;Type.TIMESTAMPNTZ: &#39;TIMESTAMPNTZ&#39;&gt;, &lt;Type.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;Type.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;Type.DATE32: &#39;DATE32&#39;&gt;, &lt;Type.DATE: &#39;DATE&#39;&gt;, &lt;Type.DATETIME: &#39;DATETIME&#39;&gt;, &lt;Type.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;Type.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;Type.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;Type.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;Type.TIME: &#39;TIME&#39;&gt;, &lt;Type.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;Type.DATETIME2: &#39;DATETIME2&#39;&gt;}</span>
</div>

View file

@ -12249,7 +12249,7 @@ Default: True</li>
<div class="attr variable">
<span class="name">SUPPORTED_JSON_PATH_PARTS</span> =
<input id="Generator.SUPPORTED_JSON_PATH_PARTS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="Generator.SUPPORTED_JSON_PATH_PARTS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="expressions.html#JSONPathRecursive">sqlglot.expressions.JSONPathRecursive</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathFilter">sqlglot.expressions.JSONPathFilter</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathUnion">sqlglot.expressions.JSONPathUnion</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSelector">sqlglot.expressions.JSONPathSelector</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSlice">sqlglot.expressions.JSONPathSlice</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathScript">sqlglot.expressions.JSONPathScript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="Generator.SUPPORTED_JSON_PATH_PARTS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathFilter">sqlglot.expressions.JSONPathFilter</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathUnion">sqlglot.expressions.JSONPathUnion</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSelector">sqlglot.expressions.JSONPathSelector</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSlice">sqlglot.expressions.JSONPathSlice</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathScript">sqlglot.expressions.JSONPathScript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRecursive">sqlglot.expressions.JSONPathRecursive</a>&#39;&gt;}</span>
</div>
@ -12687,7 +12687,7 @@ Default: True</li>
<div id="Generator.PARAMETERIZABLE_TEXT_TYPES" class="classattr">
<div class="attr variable">
<span class="name">PARAMETERIZABLE_TEXT_TYPES</span> =
<span class="default_value">{&lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;Type.CHAR: &#39;CHAR&#39;&gt;, &lt;Type.NCHAR: &#39;NCHAR&#39;&gt;}</span>
<span class="default_value">{&lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;Type.CHAR: &#39;CHAR&#39;&gt;, &lt;Type.NCHAR: &#39;NCHAR&#39;&gt;, &lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;}</span>
</div>

View file

@ -1956,7 +1956,7 @@ belong to some totally-ordered set.</p>
<section id="DATE_UNITS">
<div class="attr variable">
<span class="name">DATE_UNITS</span> =
<span class="default_value">{&#39;year&#39;, &#39;week&#39;, &#39;year_month&#39;, &#39;day&#39;, &#39;month&#39;, &#39;quarter&#39;}</span>
<span class="default_value">{&#39;month&#39;, &#39;year&#39;, &#39;day&#39;, &#39;quarter&#39;, &#39;week&#39;, &#39;year_month&#39;}</span>
</div>

View file

@ -641,7 +641,7 @@
<div class="attr variable">
<span class="name">ALL_JSON_PATH_PARTS</span> =
<input id="ALL_JSON_PATH_PARTS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="ALL_JSON_PATH_PARTS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="expressions.html#JSONPathRecursive">sqlglot.expressions.JSONPathRecursive</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathFilter">sqlglot.expressions.JSONPathFilter</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathUnion">sqlglot.expressions.JSONPathUnion</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSelector">sqlglot.expressions.JSONPathSelector</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSlice">sqlglot.expressions.JSONPathSlice</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathScript">sqlglot.expressions.JSONPathScript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="ALL_JSON_PATH_PARTS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathFilter">sqlglot.expressions.JSONPathFilter</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathUnion">sqlglot.expressions.JSONPathUnion</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSelector">sqlglot.expressions.JSONPathSelector</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathSlice">sqlglot.expressions.JSONPathSlice</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathScript">sqlglot.expressions.JSONPathScript</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;, &lt;class &#39;<a href="expressions.html#JSONPathRecursive">sqlglot.expressions.JSONPathRecursive</a>&#39;&gt;}</span>
</div>

File diff suppressed because one or more lines are too long

View file

@ -581,7 +581,7 @@ queries if it would result in multiple table selects in a single query:</p>
<div class="attr variable">
<span class="name">UNMERGABLE_ARGS</span> =
<input id="UNMERGABLE_ARGS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="UNMERGABLE_ARGS-view-value"></label><span class="default_value">{&#39;match&#39;, &#39;pivots&#39;, &#39;distinct&#39;, &#39;with&#39;, &#39;limit&#39;, &#39;into&#39;, &#39;connect&#39;, &#39;operation_modifiers&#39;, &#39;offset&#39;, &#39;having&#39;, &#39;distribute&#39;, &#39;sort&#39;, &#39;format&#39;, &#39;laterals&#39;, &#39;prewhere&#39;, &#39;locks&#39;, &#39;cluster&#39;, &#39;group&#39;, &#39;windows&#39;, &#39;kind&#39;, &#39;options&#39;, &#39;qualify&#39;, &#39;settings&#39;, &#39;sample&#39;}</span>
<label class="view-value-button pdoc-button" for="UNMERGABLE_ARGS-view-value"></label><span class="default_value">{&#39;match&#39;, &#39;windows&#39;, &#39;locks&#39;, &#39;limit&#39;, &#39;settings&#39;, &#39;laterals&#39;, &#39;pivots&#39;, &#39;group&#39;, &#39;into&#39;, &#39;distinct&#39;, &#39;distribute&#39;, &#39;offset&#39;, &#39;sort&#39;, &#39;with&#39;, &#39;connect&#39;, &#39;cluster&#39;, &#39;operation_modifiers&#39;, &#39;qualify&#39;, &#39;options&#39;, &#39;sample&#39;, &#39;format&#39;, &#39;prewhere&#39;, &#39;having&#39;, &#39;kind&#39;}</span>
</div>

View file

@ -3186,7 +3186,7 @@ prefix are statically known.</p>
<div class="attr variable">
<span class="name">DATETRUNC_COMPARISONS</span> =
<input id="DATETRUNC_COMPARISONS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="DATETRUNC_COMPARISONS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#EQ">sqlglot.expressions.EQ</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#LTE">sqlglot.expressions.LTE</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#GT">sqlglot.expressions.GT</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#In">sqlglot.expressions.In</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#LT">sqlglot.expressions.LT</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#NEQ">sqlglot.expressions.NEQ</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#GTE">sqlglot.expressions.GTE</a>&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="DATETRUNC_COMPARISONS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#In">sqlglot.expressions.In</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#NEQ">sqlglot.expressions.NEQ</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#GTE">sqlglot.expressions.GTE</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#EQ">sqlglot.expressions.EQ</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#LTE">sqlglot.expressions.LTE</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#GT">sqlglot.expressions.GT</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#LT">sqlglot.expressions.LT</a>&#39;&gt;}</span>
</div>
@ -3270,7 +3270,7 @@ prefix are statically known.</p>
<section id="JOINS">
<div class="attr variable">
<span class="name">JOINS</span> =
<span class="default_value">{(&#39;RIGHT&#39;, &#39;&#39;), (&#39;&#39;, &#39;INNER&#39;), (&#39;RIGHT&#39;, &#39;OUTER&#39;), (&#39;&#39;, &#39;&#39;)}</span>
<span class="default_value">{(&#39;&#39;, &#39;INNER&#39;), (&#39;RIGHT&#39;, &#39;&#39;), (&#39;RIGHT&#39;, &#39;OUTER&#39;), (&#39;&#39;, &#39;&#39;)}</span>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -9485,7 +9485,7 @@
<div class="attr variable">
<span class="name">TOKENS_PRECEDING_HINT</span> =
<input id="Tokenizer.TOKENS_PRECEDING_HINT-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="Tokenizer.TOKENS_PRECEDING_HINT-view-value"></label><span class="default_value">{&lt;<a href="#TokenType.DELETE">TokenType.DELETE</a>: &#39;DELETE&#39;&gt;, &lt;<a href="#TokenType.UPDATE">TokenType.UPDATE</a>: &#39;UPDATE&#39;&gt;, &lt;<a href="#TokenType.INSERT">TokenType.INSERT</a>: &#39;INSERT&#39;&gt;, &lt;<a href="#TokenType.SELECT">TokenType.SELECT</a>: &#39;SELECT&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="Tokenizer.TOKENS_PRECEDING_HINT-view-value"></label><span class="default_value">{&lt;<a href="#TokenType.DELETE">TokenType.DELETE</a>: &#39;DELETE&#39;&gt;, &lt;<a href="#TokenType.INSERT">TokenType.INSERT</a>: &#39;INSERT&#39;&gt;, &lt;<a href="#TokenType.SELECT">TokenType.SELECT</a>: &#39;SELECT&#39;&gt;, &lt;<a href="#TokenType.UPDATE">TokenType.UPDATE</a>: &#39;UPDATE&#39;&gt;}</span>
</div>
@ -9524,7 +9524,7 @@
<div class="attr variable">
<span class="name">COMMANDS</span> =
<input id="Tokenizer.COMMANDS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="Tokenizer.COMMANDS-view-value"></label><span class="default_value">{&lt;<a href="#TokenType.FETCH">TokenType.FETCH</a>: &#39;FETCH&#39;&gt;, &lt;<a href="#TokenType.SHOW">TokenType.SHOW</a>: &#39;SHOW&#39;&gt;, &lt;<a href="#TokenType.EXECUTE">TokenType.EXECUTE</a>: &#39;EXECUTE&#39;&gt;, &lt;<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: &#39;COMMAND&#39;&gt;, &lt;<a href="#TokenType.RENAME">TokenType.RENAME</a>: &#39;RENAME&#39;&gt;}</span>
<label class="view-value-button pdoc-button" for="Tokenizer.COMMANDS-view-value"></label><span class="default_value">{&lt;<a href="#TokenType.FETCH">TokenType.FETCH</a>: &#39;FETCH&#39;&gt;, &lt;<a href="#TokenType.EXECUTE">TokenType.EXECUTE</a>: &#39;EXECUTE&#39;&gt;, &lt;<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: &#39;COMMAND&#39;&gt;, &lt;<a href="#TokenType.RENAME">TokenType.RENAME</a>: &#39;RENAME&#39;&gt;, &lt;<a href="#TokenType.SHOW">TokenType.SHOW</a>: &#39;SHOW&#39;&gt;}</span>
</div>

View file

@ -1040,6 +1040,7 @@ class BigQuery(Dialect):
exp.DataType.Type.SMALLINT: "INT64",
exp.DataType.Type.TEXT: "STRING",
exp.DataType.Type.TIMESTAMP: "DATETIME",
exp.DataType.Type.TIMESTAMPNTZ: "DATETIME",
exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPLTZ: "TIMESTAMP",
exp.DataType.Type.TINYINT: "INT64",

View file

@ -498,7 +498,10 @@ class ClickHouse(Dialect):
FUNCTION_PARSERS.pop("MATCH")
PROPERTY_PARSERS = parser.Parser.PROPERTY_PARSERS.copy()
PROPERTY_PARSERS = {
**parser.Parser.PROPERTY_PARSERS,
"ENGINE": lambda self: self._parse_engine_property(),
}
PROPERTY_PARSERS.pop("DYNAMIC")
NO_PAREN_FUNCTION_PARSERS = parser.Parser.NO_PAREN_FUNCTION_PARSERS.copy()
@ -568,6 +571,13 @@ class ClickHouse(Dialect):
TokenType.L_BRACE: lambda self: self._parse_query_parameter(),
}
def _parse_engine_property(self) -> exp.EngineProperty:
self._match(TokenType.EQ)
return self.expression(
exp.EngineProperty,
this=self._parse_field(any_token=True, anonymous_func=True),
)
# https://clickhouse.com/docs/en/sql-reference/statements/create/function
def _parse_user_defined_function_expression(self) -> t.Optional[exp.Expression]:
return self._parse_lambda()
@ -1006,6 +1016,7 @@ class ClickHouse(Dialect):
exp.DataType.Type.DECIMAL128: "Decimal128",
exp.DataType.Type.DECIMAL256: "Decimal256",
exp.DataType.Type.TIMESTAMP: "DateTime",
exp.DataType.Type.TIMESTAMPNTZ: "DateTime",
exp.DataType.Type.TIMESTAMPTZ: "DateTime",
exp.DataType.Type.DOUBLE: "Float64",
exp.DataType.Type.ENUM: "Enum",

View file

@ -321,6 +321,7 @@ class DuckDB(Dialect):
"BPCHAR": TokenType.TEXT,
"CHAR": TokenType.TEXT,
"CHARACTER VARYING": TokenType.TEXT,
"DATETIME": TokenType.TIMESTAMPNTZ,
"DETACH": TokenType.DETACH,
"EXCLUDE": TokenType.EXCEPT,
"LOGICAL": TokenType.BOOLEAN,
@ -330,6 +331,7 @@ class DuckDB(Dialect):
"SIGNED": TokenType.INT,
"STRING": TokenType.TEXT,
"SUMMARIZE": TokenType.SUMMARIZE,
"TIMESTAMP": TokenType.TIMESTAMPNTZ,
"TIMESTAMP_S": TokenType.TIMESTAMP_S,
"TIMESTAMP_MS": TokenType.TIMESTAMP_MS,
"TIMESTAMP_NS": TokenType.TIMESTAMP_NS,

View file

@ -503,6 +503,7 @@ class Hive(Dialect):
exp.DataType.Type.ROWVERSION: "BINARY",
exp.DataType.Type.TEXT: "STRING",
exp.DataType.Type.TIME: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPNTZ: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
exp.DataType.Type.UTINYINT: "SMALLINT",
exp.DataType.Type.VARBINARY: "BINARY",

View file

@ -818,6 +818,7 @@ class MySQL(Dialect):
exp.DataType.Type.DATETIME2: "DATETIME",
exp.DataType.Type.SMALLDATETIME: "DATETIME",
exp.DataType.Type.TIMESTAMP: "DATETIME",
exp.DataType.Type.TIMESTAMPNTZ: "DATETIME",
exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPLTZ: "TIMESTAMP",
}

View file

@ -266,6 +266,7 @@ class Oracle(Dialect):
exp.DataType.Type.NCHAR: "NCHAR",
exp.DataType.Type.TEXT: "CLOB",
exp.DataType.Type.TIMETZ: "TIME",
exp.DataType.Type.TIMESTAMPNTZ: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
exp.DataType.Type.BINARY: "BLOB",
exp.DataType.Type.VARBINARY: "BLOB",

View file

@ -539,6 +539,7 @@ class Postgres(Dialect):
exp.DataType.Type.VARBINARY: "BYTEA",
exp.DataType.Type.ROWVERSION: "BYTEA",
exp.DataType.Type.DATETIME: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPNTZ: "TIMESTAMP",
exp.DataType.Type.BLOB: "BYTEA",
}

View file

@ -330,6 +330,8 @@ class Presto(Dialect):
"DATE_PARSE": build_formatted_time(exp.StrToTime, "presto"),
"DATE_TRUNC": date_trunc_to_time,
"DAY_OF_WEEK": exp.DayOfWeekIso.from_arg_list,
"DOW": exp.DayOfWeekIso.from_arg_list,
"DOY": exp.DayOfYear.from_arg_list,
"ELEMENT_AT": lambda args: exp.Bracket(
this=seq_get(args, 0), expressions=[seq_get(args, 1)], offset=1, safe=True
),

View file

@ -1032,6 +1032,7 @@ class Snowflake(Dialect):
exp.DateStrToDate: datestrtodate_sql,
exp.DayOfMonth: rename_func("DAYOFMONTH"),
exp.DayOfWeek: rename_func("DAYOFWEEK"),
exp.DayOfWeekIso: rename_func("DAYOFWEEKISO"),
exp.DayOfYear: rename_func("DAYOFYEAR"),
exp.Explode: rename_func("FLATTEN"),
exp.Extract: rename_func("DATE_PART"),

View file

@ -910,6 +910,7 @@ class TSQL(Dialect):
COPY_PARAMS_EQ_REQUIRED = True
PARSE_JSON_NAME = None
EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE = False
ALTER_SET_TYPE = ""
EXPRESSIONS_WITHOUT_NESTED_CTES = {
exp.Create,

View file

@ -2869,6 +2869,10 @@ class LanguageProperty(Property):
arg_types = {"this": True}
class EnviromentProperty(Property):
arg_types = {"expressions": True}
# spark ddl
class ClusteredByProperty(Property):
arg_types = {"expressions": True, "sorted_by": False, "buckets": True}

View file

@ -139,6 +139,7 @@ class Generator(metaclass=_Generator):
exp.DynamicProperty: lambda *_: "DYNAMIC",
exp.EmptyProperty: lambda *_: "EMPTY",
exp.EncodeColumnConstraint: lambda self, e: f"ENCODE {self.sql(e, 'this')}",
exp.EnviromentProperty: lambda self, e: f"ENVIRONMENT ({self.expressions(e, flat=True)})",
exp.EphemeralColumnConstraint: lambda self,
e: f"EPHEMERAL{(' ' + self.sql(e, 'this')) if e.this else ''}",
exp.ExcludeColumnConstraint: lambda self, e: f"EXCLUDE {self.sql(e, 'this').lstrip()}",
@ -543,6 +544,7 @@ class Generator(metaclass=_Generator):
exp.EmptyProperty: exp.Properties.Location.POST_SCHEMA,
exp.EncodeProperty: exp.Properties.Location.POST_EXPRESSION,
exp.EngineProperty: exp.Properties.Location.POST_SCHEMA,
exp.EnviromentProperty: exp.Properties.Location.POST_SCHEMA,
exp.ExecuteAsProperty: exp.Properties.Location.POST_SCHEMA,
exp.ExternalProperty: exp.Properties.Location.POST_CREATE,
exp.FallbackProperty: exp.Properties.Location.POST_NAME,
@ -1349,7 +1351,11 @@ class Generator(metaclass=_Generator):
return f"{left_quote}{this}{right_quote}{escape_sql}"
def rawstring_sql(self, expression: exp.RawString) -> str:
string = self.escape_str(expression.this.replace("\\", "\\\\"), escape_backslash=False)
string = expression.this
if "\\" in self.dialect.tokenizer_class.STRING_ESCAPES:
string = string.replace("\\", "\\\\")
string = self.escape_str(string, escape_backslash=False)
return f"{self.dialect.QUOTE_START}{string}{self.dialect.QUOTE_END}"
def datatypeparam_sql(self, expression: exp.DataTypeParam) -> str:
@ -3340,7 +3346,8 @@ class Generator(metaclass=_Generator):
collate = f" COLLATE {collate}" if collate else ""
using = self.sql(expression, "using")
using = f" USING {using}" if using else ""
return f"ALTER COLUMN {this} {self.ALTER_SET_TYPE} {dtype}{collate}{using}"
alter_set_type = self.ALTER_SET_TYPE + " " if self.ALTER_SET_TYPE else ""
return f"ALTER COLUMN {this} {alter_set_type}{dtype}{collate}{using}"
default = self.sql(expression, "default")
if default:

View file

@ -2,6 +2,7 @@ from sqlglot import exp
from sqlglot.optimizer.normalize import normalized
from sqlglot.optimizer.scope import build_scope, find_in_scope
from sqlglot.optimizer.simplify import simplify
from sqlglot import Dialect
def pushdown_predicates(expression, dialect=None):
@ -20,8 +21,13 @@ def pushdown_predicates(expression, dialect=None):
Returns:
sqlglot.Expression: optimized expression
"""
from sqlglot.dialects.presto import Presto
root = build_scope(expression)
dialect = Dialect.get_or_raise(dialect)
unnest_requires_cross_join = isinstance(dialect, Presto)
if root:
scope_ref_count = root.ref_count()
@ -35,13 +41,20 @@ def pushdown_predicates(expression, dialect=None):
}
# a right join can only push down to itself and not the source FROM table
# presto, trino and athena don't support inner joins where the RHS is an UNNEST expression
pushdown_allowed = True
for k, (node, source) in selected_sources.items():
parent = node.find_ancestor(exp.Join, exp.From)
if isinstance(parent, exp.Join) and parent.side == "RIGHT":
selected_sources = {k: (node, source)}
break
if isinstance(parent, exp.Join):
if parent.side == "RIGHT":
selected_sources = {k: (node, source)}
break
if isinstance(node, exp.Unnest) and unnest_requires_cross_join:
pushdown_allowed = False
break
pushdown(where.this, selected_sources, scope_ref_count, dialect, join_index)
if pushdown_allowed:
pushdown(where.this, selected_sources, scope_ref_count, dialect, join_index)
# joins should only pushdown into itself, not to other joins
# so we limit the selected sources to only itself

View file

@ -963,6 +963,9 @@ class Parser(metaclass=_Parser):
"DISTSTYLE": lambda self: self._parse_property_assignment(exp.DistStyleProperty),
"EMPTY": lambda self: self.expression(exp.EmptyProperty),
"ENGINE": lambda self: self._parse_property_assignment(exp.EngineProperty),
"ENVIRONMENT": lambda self: self.expression(
exp.EnviromentProperty, expressions=self._parse_wrapped_csv(self._parse_assignment)
),
"EXECUTE": lambda self: self._parse_property_assignment(exp.ExecuteAsProperty),
"EXTERNAL": lambda self: self.expression(exp.ExternalProperty),
"FALLBACK": lambda self, **kwargs: self._parse_fallback(**kwargs),

View file

@ -926,17 +926,27 @@ def eliminate_join_marks(expression: exp.Expression) -> exp.Expression:
else:
predicate_parent.replace(predicate_parent.left)
only_old_join_sources = old_joins.keys() - new_joins.keys()
if query_from.alias_or_name in new_joins:
only_old_joins = old_joins.keys() - new_joins.keys()
assert (
len(only_old_joins) >= 1
len(only_old_join_sources) >= 1
), "Cannot determine which table to use in the new FROM clause"
new_from_name = list(only_old_joins)[0]
query.set("from", exp.From(this=old_joins[new_from_name].this))
new_from_name = list(only_old_join_sources)[0]
query.set("from", exp.From(this=old_joins.pop(new_from_name).this))
only_old_join_sources.remove(new_from_name)
if new_joins:
query.set("joins", list(new_joins.values()))
only_old_join_expressions = []
for old_join_source in only_old_join_sources:
old_join_expression = old_joins[old_join_source]
if not old_join_expression.kind:
old_join_expression.set("kind", "CROSS")
only_old_join_expressions.append(old_join_expression)
query.set("joins", list(new_joins.values()) + only_old_join_expressions)
if not where.this:
where.pop()

View file

@ -236,6 +236,10 @@ LANGUAGE js AS
self.validate_identity(
"CREATE OR REPLACE VIEW test (tenant_id OPTIONS (description='Test description on table creation')) AS SELECT 1 AS tenant_id, 1 AS customer_id",
)
self.validate_identity(
'SELECT r"\\t"',
"SELECT '\\\\t'",
)
self.validate_identity(
"ARRAY(SELECT AS STRUCT e.x AS y, e.z AS bla FROM UNNEST(bob))::ARRAY<STRUCT<y STRING, bro NUMERIC>>",
"CAST(ARRAY(SELECT AS STRUCT e.x AS y, e.z AS bla FROM UNNEST(bob)) AS ARRAY<STRUCT<y STRING, bro NUMERIC>>)",
@ -1023,8 +1027,8 @@ LANGUAGE js AS
r'r"""/\*.*\*/"""',
write={
"bigquery": r"'/\\*.*\\*/'",
"duckdb": r"'/\\*.*\\*/'",
"presto": r"'/\\*.*\\*/'",
"duckdb": r"'/\*.*\*/'",
"presto": r"'/\*.*\*/'",
"hive": r"'/\\*.*\\*/'",
"spark": r"'/\\*.*\\*/'",
},
@ -1033,8 +1037,8 @@ LANGUAGE js AS
r'R"""/\*.*\*/"""',
write={
"bigquery": r"'/\\*.*\\*/'",
"duckdb": r"'/\\*.*\\*/'",
"presto": r"'/\\*.*\\*/'",
"duckdb": r"'/\*.*\*/'",
"presto": r"'/\*.*\*/'",
"hive": r"'/\\*.*\\*/'",
"spark": r"'/\\*.*\\*/'",
},

View file

@ -167,6 +167,7 @@ class TestClickhouse(Validator):
self.validate_identity(
"CREATE MATERIALIZED VIEW test_view ON CLUSTER '{cluster}' (id UInt8) ENGINE=AggregatingMergeTree() ORDER BY tuple() AS SELECT * FROM test_data"
)
self.validate_identity("CREATE TABLE test (id UInt8) ENGINE=Null()")
self.validate_identity(
"CREATE MATERIALIZED VIEW test_view ON CLUSTER cl1 TO table1 AS SELECT * FROM test_data"
)

View file

@ -338,3 +338,8 @@ class TestDatabricks(Validator):
self.validate_identity(
"ANALYZE TABLE ctlg.db.tbl PARTITION(foo = 'foo', bar = 'bar') COMPUTE STATISTICS NOSCAN"
)
def test_udf_environment_property(self):
self.validate_identity(
"""CREATE FUNCTION a() ENVIRONMENT (dependencies = '["foo1==1", "foo2==2"]', environment_version = 'None')"""
)

View file

@ -428,6 +428,7 @@ class TestDuckDB(Validator):
"SELECT STRFTIME(CAST('2020-01-01' AS TIMESTAMP), CONCAT('%Y', '%m'))",
write={
"duckdb": "SELECT STRFTIME(CAST('2020-01-01' AS TIMESTAMP), CONCAT('%Y', '%m'))",
"spark": "SELECT DATE_FORMAT(CAST('2020-01-01' AS TIMESTAMP_NTZ), CONCAT(COALESCE('yyyy', ''), COALESCE('MM', '')))",
"tsql": "SELECT FORMAT(CAST('2020-01-01' AS DATETIME2), CONCAT('yyyy', 'MM'))",
},
)
@ -1110,6 +1111,28 @@ class TestDuckDB(Validator):
},
)
self.validate_all(
"SELECT TIMESTAMP 'foo'",
write={
"duckdb": "SELECT CAST('foo' AS TIMESTAMP)",
"hive": "SELECT CAST('foo' AS TIMESTAMP)",
"spark2": "SELECT CAST('foo' AS TIMESTAMP)",
"spark": "SELECT CAST('foo' AS TIMESTAMP_NTZ)",
"postgres": "SELECT CAST('foo' AS TIMESTAMP)",
"mysql": "SELECT CAST('foo' AS DATETIME)",
"clickhouse": "SELECT CAST('foo' AS Nullable(DateTime))",
"databricks": "SELECT CAST('foo' AS TIMESTAMP_NTZ)",
"snowflake": "SELECT CAST('foo' AS TIMESTAMPNTZ)",
"redshift": "SELECT CAST('foo' AS TIMESTAMP)",
"tsql": "SELECT CAST('foo' AS DATETIME2)",
"presto": "SELECT CAST('foo' AS TIMESTAMP)",
"trino": "SELECT CAST('foo' AS TIMESTAMP)",
"oracle": "SELECT CAST('foo' AS TIMESTAMP)",
"bigquery": "SELECT CAST('foo' AS DATETIME)",
"starrocks": "SELECT CAST('foo' AS DATETIME)",
},
)
def test_sample(self):
self.validate_identity(
"SELECT * FROM tbl USING SAMPLE 5",

View file

@ -1311,7 +1311,7 @@ COMMENT='客户账户表'"""
def test_timestamp_trunc(self):
hive_dialects = ("spark", "databricks")
for dialect in ("postgres", "snowflake", "duckdb", *hive_dialects):
for dialect in ("postgres", "snowflake", *hive_dialects):
for unit in (
"SECOND",
"DAY",

View file

@ -1022,6 +1022,39 @@ class TestSnowflake(Validator):
},
)
self.validate_all(
"DAYOFWEEKISO(foo)",
read={
"presto": "DAY_OF_WEEK(foo)",
"trino": "DAY_OF_WEEK(foo)",
},
write={
"snowflake": "DAYOFWEEKISO(foo)",
},
)
self.validate_all(
"DAYOFWEEKISO(foo)",
read={
"presto": "DOW(foo)",
"trino": "DOW(foo)",
},
write={
"snowflake": "DAYOFWEEKISO(foo)",
},
)
self.validate_all(
"DAYOFYEAR(foo)",
read={
"presto": "DOY(foo)",
"trino": "DOY(foo)",
},
write={
"snowflake": "DAYOFYEAR(foo)",
},
)
def test_null_treatment(self):
self.validate_all(
r"SELECT FIRST_VALUE(TABLE1.COLUMN1) OVER (PARTITION BY RANDOM_COLUMN1, RANDOM_COLUMN2 ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS MY_ALIAS FROM TABLE1",

View file

@ -1062,6 +1062,16 @@ WHERE
"tsql": "ALTER TABLE a ADD b INTEGER, c INTEGER",
},
)
self.validate_all(
"ALTER TABLE a ALTER COLUMN b INTEGER",
read={
"": "ALTER TABLE a ALTER COLUMN b INT",
},
write={
"": "ALTER TABLE a ALTER COLUMN b SET DATA TYPE INT",
"tsql": "ALTER TABLE a ALTER COLUMN b INTEGER",
},
)
self.validate_all(
"CREATE TABLE #mytemp (a INTEGER, b CHAR(2), c TIME(4), d FLOAT(24))",
write={

View file

@ -44,3 +44,30 @@ SELECT x.cnt AS cnt FROM (SELECT COUNT(1) AS cnt FROM x AS x HAVING COUNT(1) > 0
-- Pushdown predicate to HAVING (DNF)
SELECT x.cnt AS cnt FROM (SELECT COUNT(1) AS cnt, COUNT(x.a) AS cnt_a, COUNT(x.b) AS cnt_b FROM x AS x) AS x WHERE (x.cnt_a > 0 AND x.cnt_b > 0) OR x.cnt > 0;
SELECT x.cnt AS cnt FROM (SELECT COUNT(1) AS cnt, COUNT(x.a) AS cnt_a, COUNT(x.b) AS cnt_b FROM x AS x HAVING COUNT(1) > 0 OR (COUNT(x.a) > 0 AND COUNT(x.b) > 0)) AS x WHERE x.cnt > 0 OR (x.cnt_a > 0 AND x.cnt_b > 0);
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
SELECT x.a, u.val FROM x AS x JOIN UNNEST(ARRAY(0, 1)) AS u("val") ON u.val < x.a WHERE TRUE;
# dialect: presto
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
# dialect: trino
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
# dialect: athena
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
SELECT x.a, u.val FROM x AS x CROSS JOIN UNNEST(ARRAY[0, 1]) AS u("val") WHERE x.a > u.val;
# dialect: presto
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") CROSS JOIN x AS x WHERE x.a > u.val;
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") JOIN x AS x ON u.val < x.a WHERE TRUE;
# dialect: trino
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") CROSS JOIN x AS x WHERE x.a > u.val;
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") JOIN x AS x ON u.val < x.a WHERE TRUE;
# dialect: athena
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") CROSS JOIN x AS x WHERE x.a > u.val;
SELECT x.a, u.val FROM UNNEST(ARRAY[0, 1]) AS u("val") JOIN x AS x ON u.val < x.a WHERE TRUE;

View file

@ -248,6 +248,13 @@ class TestTransforms(unittest.TestCase):
"SELECT * FROM table1 LEFT JOIN table2 ON table1.col = table2.col1 + 25",
dialect,
)
# eliminate join mark while preserving non-participating joins
self.validate(
eliminate_join_marks,
"SELECT * FROM a, b, c WHERE a.id = b.id AND b.id(+) = c.id",
"SELECT * FROM a LEFT JOIN b ON b.id = c.id CROSS JOIN c WHERE a.id = b.id",
dialect,
)
alias = "AS " if dialect != "oracle" else ""
self.validate(