summaryrefslogtreecommitdiffstats
path: root/docs/sqlglot/dialects/duckdb.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sqlglot/dialects/duckdb.html')
-rw-r--r--docs/sqlglot/dialects/duckdb.html1313
1 files changed, 789 insertions, 524 deletions
diff --git a/docs/sqlglot/dialects/duckdb.html b/docs/sqlglot/dialects/duckdb.html
index 6b95f91..9a92403 100644
--- a/docs/sqlglot/dialects/duckdb.html
+++ b/docs/sqlglot/dialects/duckdb.html
@@ -190,6 +190,9 @@
<a class="variable" href="#DuckDB.Generator.TYPE_MAPPING">TYPE_MAPPING</a>
</li>
<li>
+ <a class="variable" href="#DuckDB.Generator.RESERVED_KEYWORDS">RESERVED_KEYWORDS</a>
+ </li>
+ <li>
<a class="variable" href="#DuckDB.Generator.UNWRAPPED_INTERVAL_VALUES">UNWRAPPED_INTERVAL_VALUES</a>
</li>
<li>
@@ -663,7 +666,7 @@
</span><span id="L-341"><a href="#L-341"><span class="linenos">341</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> <span class="n">advance</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
</span><span id="L-342"><a href="#L-342"><span class="linenos">342</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_bracket</span><span class="p">())</span>
</span><span id="L-343"><a href="#L-343"><span class="linenos">343</span></a>
-</span><span id="L-344"><a href="#L-344"><span class="linenos">344</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="L-344"><a href="#L-344"><span class="linenos">344</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_assignment</span><span class="p">)</span>
</span><span id="L-345"><a href="#L-345"><span class="linenos">345</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">,</span> <span class="n">keys</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">values</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
</span><span id="L-346"><a href="#L-346"><span class="linenos">346</span></a>
</span><span id="L-347"><a href="#L-347"><span class="linenos">347</span></a> <span class="k">def</span> <span class="nf">_parse_struct_types</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">type_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]:</span>
@@ -825,145 +828,227 @@
</span><span id="L-503"><a href="#L-503"><span class="linenos">503</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="L-504"><a href="#L-504"><span class="linenos">504</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="L-505"><a href="#L-505"><span class="linenos">505</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="L-506"><a href="#L-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
-</span><span id="L-507"><a href="#L-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
-</span><span id="L-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
-</span><span id="L-509"><a href="#L-509"><span class="linenos">509</span></a> <span class="p">}</span>
-</span><span id="L-510"><a href="#L-510"><span class="linenos">510</span></a>
-</span><span id="L-511"><a href="#L-511"><span class="linenos">511</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
-</span><span id="L-512"><a href="#L-512"><span class="linenos">512</span></a>
-</span><span id="L-513"><a href="#L-513"><span class="linenos">513</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="L-514"><a href="#L-514"><span class="linenos">514</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="L-515"><a href="#L-515"><span class="linenos">515</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-516"><a href="#L-516"><span class="linenos">516</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
-</span><span id="L-517"><a href="#L-517"><span class="linenos">517</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
-</span><span id="L-518"><a href="#L-518"><span class="linenos">518</span></a> <span class="p">}</span>
-</span><span id="L-519"><a href="#L-519"><span class="linenos">519</span></a>
-</span><span id="L-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
-</span><span id="L-521"><a href="#L-521"><span class="linenos">521</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
-</span><span id="L-522"><a href="#L-522"><span class="linenos">522</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
-</span><span id="L-523"><a href="#L-523"><span class="linenos">523</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
-</span><span id="L-524"><a href="#L-524"><span class="linenos">524</span></a>
-</span><span id="L-525"><a href="#L-525"><span class="linenos">525</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-526"><a href="#L-526"><span class="linenos">526</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="L-527"><a href="#L-527"><span class="linenos">527</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-528"><a href="#L-528"><span class="linenos">528</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-</span><span id="L-529"><a href="#L-529"><span class="linenos">529</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="L-530"><a href="#L-530"><span class="linenos">530</span></a> <span class="p">)</span>
-</span><span id="L-531"><a href="#L-531"><span class="linenos">531</span></a>
-</span><span id="L-532"><a href="#L-532"><span class="linenos">532</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="L-533"><a href="#L-533"><span class="linenos">533</span></a>
-</span><span id="L-534"><a href="#L-534"><span class="linenos">534</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-535"><a href="#L-535"><span class="linenos">535</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
-</span><span id="L-536"><a href="#L-536"><span class="linenos">536</span></a>
-</span><span id="L-537"><a href="#L-537"><span class="linenos">537</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
-</span><span id="L-538"><a href="#L-538"><span class="linenos">538</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-539"><a href="#L-539"><span class="linenos">539</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
-</span><span id="L-540"><a href="#L-540"><span class="linenos">540</span></a>
-</span><span id="L-541"><a href="#L-541"><span class="linenos">541</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="L-542"><a href="#L-542"><span class="linenos">542</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-543"><a href="#L-543"><span class="linenos">543</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="L-544"><a href="#L-544"><span class="linenos">544</span></a>
-</span><span id="L-545"><a href="#L-545"><span class="linenos">545</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
-</span><span id="L-546"><a href="#L-546"><span class="linenos">546</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
-</span><span id="L-547"><a href="#L-547"><span class="linenos">547</span></a>
-</span><span id="L-548"><a href="#L-548"><span class="linenos">548</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="L-549"><a href="#L-549"><span class="linenos">549</span></a>
-</span><span id="L-550"><a href="#L-550"><span class="linenos">550</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
-</span><span id="L-551"><a href="#L-551"><span class="linenos">551</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-552"><a href="#L-552"><span class="linenos">552</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
-</span><span id="L-553"><a href="#L-553"><span class="linenos">553</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
-</span><span id="L-554"><a href="#L-554"><span class="linenos">554</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-555"><a href="#L-555"><span class="linenos">555</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-556"><a href="#L-556"><span class="linenos">556</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
-</span><span id="L-557"><a href="#L-557"><span class="linenos">557</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
-</span><span id="L-558"><a href="#L-558"><span class="linenos">558</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
-</span><span id="L-559"><a href="#L-559"><span class="linenos">559</span></a>
-</span><span id="L-560"><a href="#L-560"><span class="linenos">560</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
-</span><span id="L-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
-</span><span id="L-562"><a href="#L-562"><span class="linenos">562</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
-</span><span id="L-563"><a href="#L-563"><span class="linenos">563</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
-</span><span id="L-564"><a href="#L-564"><span class="linenos">564</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
-</span><span id="L-565"><a href="#L-565"><span class="linenos">565</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
-</span><span id="L-566"><a href="#L-566"><span class="linenos">566</span></a> <span class="p">)</span>
-</span><span id="L-567"><a href="#L-567"><span class="linenos">567</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
-</span><span id="L-568"><a href="#L-568"><span class="linenos">568</span></a>
-</span><span id="L-569"><a href="#L-569"><span class="linenos">569</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
-</span><span id="L-570"><a href="#L-570"><span class="linenos">570</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
-</span><span id="L-571"><a href="#L-571"><span class="linenos">571</span></a> <span class="p">)</span>
-</span><span id="L-572"><a href="#L-572"><span class="linenos">572</span></a>
-</span><span id="L-573"><a href="#L-573"><span class="linenos">573</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-574"><a href="#L-574"><span class="linenos">574</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="L-575"><a href="#L-575"><span class="linenos">575</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
-</span><span id="L-576"><a href="#L-576"><span class="linenos">576</span></a>
-</span><span id="L-577"><a href="#L-577"><span class="linenos">577</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
-</span><span id="L-578"><a href="#L-578"><span class="linenos">578</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="L-579"><a href="#L-579"><span class="linenos">579</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
-</span><span id="L-580"><a href="#L-580"><span class="linenos">580</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="L-581"><a href="#L-581"><span class="linenos">581</span></a>
-</span><span id="L-582"><a href="#L-582"><span class="linenos">582</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="L-583"><a href="#L-583"><span class="linenos">583</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="L-584"><a href="#L-584"><span class="linenos">584</span></a>
-</span><span id="L-585"><a href="#L-585"><span class="linenos">585</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="L-586"><a href="#L-586"><span class="linenos">586</span></a>
-</span><span id="L-587"><a href="#L-587"><span class="linenos">587</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-588"><a href="#L-588"><span class="linenos">588</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
-</span><span id="L-589"><a href="#L-589"><span class="linenos">589</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-590"><a href="#L-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
-</span><span id="L-591"><a href="#L-591"><span class="linenos">591</span></a>
-</span><span id="L-592"><a href="#L-592"><span class="linenos">592</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-593"><a href="#L-593"><span class="linenos">593</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="L-594"><a href="#L-594"><span class="linenos">594</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
-</span><span id="L-595"><a href="#L-595"><span class="linenos">595</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
-</span><span id="L-596"><a href="#L-596"><span class="linenos">596</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
-</span><span id="L-597"><a href="#L-597"><span class="linenos">597</span></a> <span class="p">):</span>
-</span><span id="L-598"><a href="#L-598"><span class="linenos">598</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="L-599"><a href="#L-599"><span class="linenos">599</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
-</span><span id="L-600"><a href="#L-600"><span class="linenos">600</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="L-506"><a href="#L-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMPNTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="L-507"><a href="#L-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
+</span><span id="L-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
+</span><span id="L-509"><a href="#L-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
+</span><span id="L-510"><a href="#L-510"><span class="linenos">510</span></a> <span class="p">}</span>
+</span><span id="L-511"><a href="#L-511"><span class="linenos">511</span></a>
+</span><span id="L-512"><a href="#L-512"><span class="linenos">512</span></a> <span class="c1"># https://github.com/duckdb/duckdb/blob/ff7f24fd8e3128d94371827523dae85ebaf58713/third_party/libpg_query/grammar/keywords/reserved_keywords.list#L1-L77</span>
+</span><span id="L-513"><a href="#L-513"><span class="linenos">513</span></a> <span class="n">RESERVED_KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-514"><a href="#L-514"><span class="linenos">514</span></a> <span class="s2">&quot;array&quot;</span><span class="p">,</span>
+</span><span id="L-515"><a href="#L-515"><span class="linenos">515</span></a> <span class="s2">&quot;analyse&quot;</span><span class="p">,</span>
+</span><span id="L-516"><a href="#L-516"><span class="linenos">516</span></a> <span class="s2">&quot;union&quot;</span><span class="p">,</span>
+</span><span id="L-517"><a href="#L-517"><span class="linenos">517</span></a> <span class="s2">&quot;all&quot;</span><span class="p">,</span>
+</span><span id="L-518"><a href="#L-518"><span class="linenos">518</span></a> <span class="s2">&quot;when&quot;</span><span class="p">,</span>
+</span><span id="L-519"><a href="#L-519"><span class="linenos">519</span></a> <span class="s2">&quot;in_p&quot;</span><span class="p">,</span>
+</span><span id="L-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="s2">&quot;default&quot;</span><span class="p">,</span>
+</span><span id="L-521"><a href="#L-521"><span class="linenos">521</span></a> <span class="s2">&quot;create_p&quot;</span><span class="p">,</span>
+</span><span id="L-522"><a href="#L-522"><span class="linenos">522</span></a> <span class="s2">&quot;window&quot;</span><span class="p">,</span>
+</span><span id="L-523"><a href="#L-523"><span class="linenos">523</span></a> <span class="s2">&quot;asymmetric&quot;</span><span class="p">,</span>
+</span><span id="L-524"><a href="#L-524"><span class="linenos">524</span></a> <span class="s2">&quot;to&quot;</span><span class="p">,</span>
+</span><span id="L-525"><a href="#L-525"><span class="linenos">525</span></a> <span class="s2">&quot;else&quot;</span><span class="p">,</span>
+</span><span id="L-526"><a href="#L-526"><span class="linenos">526</span></a> <span class="s2">&quot;localtime&quot;</span><span class="p">,</span>
+</span><span id="L-527"><a href="#L-527"><span class="linenos">527</span></a> <span class="s2">&quot;from&quot;</span><span class="p">,</span>
+</span><span id="L-528"><a href="#L-528"><span class="linenos">528</span></a> <span class="s2">&quot;end_p&quot;</span><span class="p">,</span>
+</span><span id="L-529"><a href="#L-529"><span class="linenos">529</span></a> <span class="s2">&quot;select&quot;</span><span class="p">,</span>
+</span><span id="L-530"><a href="#L-530"><span class="linenos">530</span></a> <span class="s2">&quot;current_date&quot;</span><span class="p">,</span>
+</span><span id="L-531"><a href="#L-531"><span class="linenos">531</span></a> <span class="s2">&quot;foreign&quot;</span><span class="p">,</span>
+</span><span id="L-532"><a href="#L-532"><span class="linenos">532</span></a> <span class="s2">&quot;with&quot;</span><span class="p">,</span>
+</span><span id="L-533"><a href="#L-533"><span class="linenos">533</span></a> <span class="s2">&quot;grant&quot;</span><span class="p">,</span>
+</span><span id="L-534"><a href="#L-534"><span class="linenos">534</span></a> <span class="s2">&quot;session_user&quot;</span><span class="p">,</span>
+</span><span id="L-535"><a href="#L-535"><span class="linenos">535</span></a> <span class="s2">&quot;or&quot;</span><span class="p">,</span>
+</span><span id="L-536"><a href="#L-536"><span class="linenos">536</span></a> <span class="s2">&quot;except&quot;</span><span class="p">,</span>
+</span><span id="L-537"><a href="#L-537"><span class="linenos">537</span></a> <span class="s2">&quot;references&quot;</span><span class="p">,</span>
+</span><span id="L-538"><a href="#L-538"><span class="linenos">538</span></a> <span class="s2">&quot;fetch&quot;</span><span class="p">,</span>
+</span><span id="L-539"><a href="#L-539"><span class="linenos">539</span></a> <span class="s2">&quot;limit&quot;</span><span class="p">,</span>
+</span><span id="L-540"><a href="#L-540"><span class="linenos">540</span></a> <span class="s2">&quot;group_p&quot;</span><span class="p">,</span>
+</span><span id="L-541"><a href="#L-541"><span class="linenos">541</span></a> <span class="s2">&quot;leading&quot;</span><span class="p">,</span>
+</span><span id="L-542"><a href="#L-542"><span class="linenos">542</span></a> <span class="s2">&quot;into&quot;</span><span class="p">,</span>
+</span><span id="L-543"><a href="#L-543"><span class="linenos">543</span></a> <span class="s2">&quot;collate&quot;</span><span class="p">,</span>
+</span><span id="L-544"><a href="#L-544"><span class="linenos">544</span></a> <span class="s2">&quot;offset&quot;</span><span class="p">,</span>
+</span><span id="L-545"><a href="#L-545"><span class="linenos">545</span></a> <span class="s2">&quot;do&quot;</span><span class="p">,</span>
+</span><span id="L-546"><a href="#L-546"><span class="linenos">546</span></a> <span class="s2">&quot;then&quot;</span><span class="p">,</span>
+</span><span id="L-547"><a href="#L-547"><span class="linenos">547</span></a> <span class="s2">&quot;localtimestamp&quot;</span><span class="p">,</span>
+</span><span id="L-548"><a href="#L-548"><span class="linenos">548</span></a> <span class="s2">&quot;check_p&quot;</span><span class="p">,</span>
+</span><span id="L-549"><a href="#L-549"><span class="linenos">549</span></a> <span class="s2">&quot;lateral_p&quot;</span><span class="p">,</span>
+</span><span id="L-550"><a href="#L-550"><span class="linenos">550</span></a> <span class="s2">&quot;current_role&quot;</span><span class="p">,</span>
+</span><span id="L-551"><a href="#L-551"><span class="linenos">551</span></a> <span class="s2">&quot;where&quot;</span><span class="p">,</span>
+</span><span id="L-552"><a href="#L-552"><span class="linenos">552</span></a> <span class="s2">&quot;asc_p&quot;</span><span class="p">,</span>
+</span><span id="L-553"><a href="#L-553"><span class="linenos">553</span></a> <span class="s2">&quot;placing&quot;</span><span class="p">,</span>
+</span><span id="L-554"><a href="#L-554"><span class="linenos">554</span></a> <span class="s2">&quot;desc_p&quot;</span><span class="p">,</span>
+</span><span id="L-555"><a href="#L-555"><span class="linenos">555</span></a> <span class="s2">&quot;user&quot;</span><span class="p">,</span>
+</span><span id="L-556"><a href="#L-556"><span class="linenos">556</span></a> <span class="s2">&quot;unique&quot;</span><span class="p">,</span>
+</span><span id="L-557"><a href="#L-557"><span class="linenos">557</span></a> <span class="s2">&quot;initially&quot;</span><span class="p">,</span>
+</span><span id="L-558"><a href="#L-558"><span class="linenos">558</span></a> <span class="s2">&quot;column&quot;</span><span class="p">,</span>
+</span><span id="L-559"><a href="#L-559"><span class="linenos">559</span></a> <span class="s2">&quot;both&quot;</span><span class="p">,</span>
+</span><span id="L-560"><a href="#L-560"><span class="linenos">560</span></a> <span class="s2">&quot;some&quot;</span><span class="p">,</span>
+</span><span id="L-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="s2">&quot;as&quot;</span><span class="p">,</span>
+</span><span id="L-562"><a href="#L-562"><span class="linenos">562</span></a> <span class="s2">&quot;any&quot;</span><span class="p">,</span>
+</span><span id="L-563"><a href="#L-563"><span class="linenos">563</span></a> <span class="s2">&quot;only&quot;</span><span class="p">,</span>
+</span><span id="L-564"><a href="#L-564"><span class="linenos">564</span></a> <span class="s2">&quot;deferrable&quot;</span><span class="p">,</span>
+</span><span id="L-565"><a href="#L-565"><span class="linenos">565</span></a> <span class="s2">&quot;null_p&quot;</span><span class="p">,</span>
+</span><span id="L-566"><a href="#L-566"><span class="linenos">566</span></a> <span class="s2">&quot;current_time&quot;</span><span class="p">,</span>
+</span><span id="L-567"><a href="#L-567"><span class="linenos">567</span></a> <span class="s2">&quot;true_p&quot;</span><span class="p">,</span>
+</span><span id="L-568"><a href="#L-568"><span class="linenos">568</span></a> <span class="s2">&quot;table&quot;</span><span class="p">,</span>
+</span><span id="L-569"><a href="#L-569"><span class="linenos">569</span></a> <span class="s2">&quot;case&quot;</span><span class="p">,</span>
+</span><span id="L-570"><a href="#L-570"><span class="linenos">570</span></a> <span class="s2">&quot;trailing&quot;</span><span class="p">,</span>
+</span><span id="L-571"><a href="#L-571"><span class="linenos">571</span></a> <span class="s2">&quot;variadic&quot;</span><span class="p">,</span>
+</span><span id="L-572"><a href="#L-572"><span class="linenos">572</span></a> <span class="s2">&quot;for&quot;</span><span class="p">,</span>
+</span><span id="L-573"><a href="#L-573"><span class="linenos">573</span></a> <span class="s2">&quot;on&quot;</span><span class="p">,</span>
+</span><span id="L-574"><a href="#L-574"><span class="linenos">574</span></a> <span class="s2">&quot;distinct&quot;</span><span class="p">,</span>
+</span><span id="L-575"><a href="#L-575"><span class="linenos">575</span></a> <span class="s2">&quot;false_p&quot;</span><span class="p">,</span>
+</span><span id="L-576"><a href="#L-576"><span class="linenos">576</span></a> <span class="s2">&quot;not&quot;</span><span class="p">,</span>
+</span><span id="L-577"><a href="#L-577"><span class="linenos">577</span></a> <span class="s2">&quot;constraint&quot;</span><span class="p">,</span>
+</span><span id="L-578"><a href="#L-578"><span class="linenos">578</span></a> <span class="s2">&quot;current_timestamp&quot;</span><span class="p">,</span>
+</span><span id="L-579"><a href="#L-579"><span class="linenos">579</span></a> <span class="s2">&quot;returning&quot;</span><span class="p">,</span>
+</span><span id="L-580"><a href="#L-580"><span class="linenos">580</span></a> <span class="s2">&quot;primary&quot;</span><span class="p">,</span>
+</span><span id="L-581"><a href="#L-581"><span class="linenos">581</span></a> <span class="s2">&quot;intersect&quot;</span><span class="p">,</span>
+</span><span id="L-582"><a href="#L-582"><span class="linenos">582</span></a> <span class="s2">&quot;having&quot;</span><span class="p">,</span>
+</span><span id="L-583"><a href="#L-583"><span class="linenos">583</span></a> <span class="s2">&quot;analyze&quot;</span><span class="p">,</span>
+</span><span id="L-584"><a href="#L-584"><span class="linenos">584</span></a> <span class="s2">&quot;current_user&quot;</span><span class="p">,</span>
+</span><span id="L-585"><a href="#L-585"><span class="linenos">585</span></a> <span class="s2">&quot;and&quot;</span><span class="p">,</span>
+</span><span id="L-586"><a href="#L-586"><span class="linenos">586</span></a> <span class="s2">&quot;cast&quot;</span><span class="p">,</span>
+</span><span id="L-587"><a href="#L-587"><span class="linenos">587</span></a> <span class="s2">&quot;symmetric&quot;</span><span class="p">,</span>
+</span><span id="L-588"><a href="#L-588"><span class="linenos">588</span></a> <span class="s2">&quot;using&quot;</span><span class="p">,</span>
+</span><span id="L-589"><a href="#L-589"><span class="linenos">589</span></a> <span class="s2">&quot;order&quot;</span><span class="p">,</span>
+</span><span id="L-590"><a href="#L-590"><span class="linenos">590</span></a> <span class="s2">&quot;current_catalog&quot;</span><span class="p">,</span>
+</span><span id="L-591"><a href="#L-591"><span class="linenos">591</span></a> <span class="p">}</span>
+</span><span id="L-592"><a href="#L-592"><span class="linenos">592</span></a>
+</span><span id="L-593"><a href="#L-593"><span class="linenos">593</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
+</span><span id="L-594"><a href="#L-594"><span class="linenos">594</span></a>
+</span><span id="L-595"><a href="#L-595"><span class="linenos">595</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="L-596"><a href="#L-596"><span class="linenos">596</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="L-597"><a href="#L-597"><span class="linenos">597</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-598"><a href="#L-598"><span class="linenos">598</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
+</span><span id="L-599"><a href="#L-599"><span class="linenos">599</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
+</span><span id="L-600"><a href="#L-600"><span class="linenos">600</span></a> <span class="p">}</span>
</span><span id="L-601"><a href="#L-601"><span class="linenos">601</span></a>
-</span><span id="L-602"><a href="#L-602"><span class="linenos">602</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="L-603"><a href="#L-603"><span class="linenos">603</span></a>
-</span><span id="L-604"><a href="#L-604"><span class="linenos">604</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-605"><a href="#L-605"><span class="linenos">605</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="L-606"><a href="#L-606"><span class="linenos">606</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
-</span><span id="L-607"><a href="#L-607"><span class="linenos">607</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
-</span><span id="L-608"><a href="#L-608"><span class="linenos">608</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="L-609"><a href="#L-609"><span class="linenos">609</span></a>
-</span><span id="L-610"><a href="#L-610"><span class="linenos">610</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="L-611"><a href="#L-611"><span class="linenos">611</span></a>
-</span><span id="L-612"><a href="#L-612"><span class="linenos">612</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-613"><a href="#L-613"><span class="linenos">613</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="L-614"><a href="#L-614"><span class="linenos">614</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
-</span><span id="L-615"><a href="#L-615"><span class="linenos">615</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
-</span><span id="L-616"><a href="#L-616"><span class="linenos">616</span></a>
-</span><span id="L-617"><a href="#L-617"><span class="linenos">617</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-602"><a href="#L-602"><span class="linenos">602</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="L-603"><a href="#L-603"><span class="linenos">603</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="L-604"><a href="#L-604"><span class="linenos">604</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
+</span><span id="L-605"><a href="#L-605"><span class="linenos">605</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
+</span><span id="L-606"><a href="#L-606"><span class="linenos">606</span></a>
+</span><span id="L-607"><a href="#L-607"><span class="linenos">607</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-608"><a href="#L-608"><span class="linenos">608</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="L-609"><a href="#L-609"><span class="linenos">609</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-610"><a href="#L-610"><span class="linenos">610</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="L-611"><a href="#L-611"><span class="linenos">611</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="L-612"><a href="#L-612"><span class="linenos">612</span></a> <span class="p">)</span>
+</span><span id="L-613"><a href="#L-613"><span class="linenos">613</span></a>
+</span><span id="L-614"><a href="#L-614"><span class="linenos">614</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="L-615"><a href="#L-615"><span class="linenos">615</span></a>
+</span><span id="L-616"><a href="#L-616"><span class="linenos">616</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-617"><a href="#L-617"><span class="linenos">617</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
</span><span id="L-618"><a href="#L-618"><span class="linenos">618</span></a>
-</span><span id="L-619"><a href="#L-619"><span class="linenos">619</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
-</span><span id="L-620"><a href="#L-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
-</span><span id="L-621"><a href="#L-621"><span class="linenos">621</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="L-619"><a href="#L-619"><span class="linenos">619</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
+</span><span id="L-620"><a href="#L-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-621"><a href="#L-621"><span class="linenos">621</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
</span><span id="L-622"><a href="#L-622"><span class="linenos">622</span></a>
-</span><span id="L-623"><a href="#L-623"><span class="linenos">623</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="L-624"><a href="#L-624"><span class="linenos">624</span></a>
-</span><span id="L-625"><a href="#L-625"><span class="linenos">625</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
-</span><span id="L-626"><a href="#L-626"><span class="linenos">626</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
-</span><span id="L-627"><a href="#L-627"><span class="linenos">627</span></a>
-</span><span id="L-628"><a href="#L-628"><span class="linenos">628</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="L-623"><a href="#L-623"><span class="linenos">623</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="L-624"><a href="#L-624"><span class="linenos">624</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-625"><a href="#L-625"><span class="linenos">625</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="L-626"><a href="#L-626"><span class="linenos">626</span></a>
+</span><span id="L-627"><a href="#L-627"><span class="linenos">627</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
+</span><span id="L-628"><a href="#L-628"><span class="linenos">628</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
</span><span id="L-629"><a href="#L-629"><span class="linenos">629</span></a>
-</span><span id="L-630"><a href="#L-630"><span class="linenos">630</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-631"><a href="#L-631"><span class="linenos">631</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
-</span><span id="L-632"><a href="#L-632"><span class="linenos">632</span></a>
-</span><span id="L-633"><a href="#L-633"><span class="linenos">633</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="L-634"><a href="#L-634"><span class="linenos">634</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
-</span><span id="L-635"><a href="#L-635"><span class="linenos">635</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
-</span><span id="L-636"><a href="#L-636"><span class="linenos">636</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
-</span><span id="L-637"><a href="#L-637"><span class="linenos">637</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
-</span><span id="L-638"><a href="#L-638"><span class="linenos">638</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
-</span><span id="L-639"><a href="#L-639"><span class="linenos">639</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="L-640"><a href="#L-640"><span class="linenos">640</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-630"><a href="#L-630"><span class="linenos">630</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="L-631"><a href="#L-631"><span class="linenos">631</span></a>
+</span><span id="L-632"><a href="#L-632"><span class="linenos">632</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="L-633"><a href="#L-633"><span class="linenos">633</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-634"><a href="#L-634"><span class="linenos">634</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
+</span><span id="L-635"><a href="#L-635"><span class="linenos">635</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
+</span><span id="L-636"><a href="#L-636"><span class="linenos">636</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-637"><a href="#L-637"><span class="linenos">637</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-638"><a href="#L-638"><span class="linenos">638</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
+</span><span id="L-639"><a href="#L-639"><span class="linenos">639</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="L-640"><a href="#L-640"><span class="linenos">640</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
</span><span id="L-641"><a href="#L-641"><span class="linenos">641</span></a>
-</span><span id="L-642"><a href="#L-642"><span class="linenos">642</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="L-643"><a href="#L-643"><span class="linenos">643</span></a>
-</span><span id="L-644"><a href="#L-644"><span class="linenos">644</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="L-642"><a href="#L-642"><span class="linenos">642</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
+</span><span id="L-643"><a href="#L-643"><span class="linenos">643</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
+</span><span id="L-644"><a href="#L-644"><span class="linenos">644</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
+</span><span id="L-645"><a href="#L-645"><span class="linenos">645</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
+</span><span id="L-646"><a href="#L-646"><span class="linenos">646</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
+</span><span id="L-647"><a href="#L-647"><span class="linenos">647</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
+</span><span id="L-648"><a href="#L-648"><span class="linenos">648</span></a> <span class="p">)</span>
+</span><span id="L-649"><a href="#L-649"><span class="linenos">649</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
+</span><span id="L-650"><a href="#L-650"><span class="linenos">650</span></a>
+</span><span id="L-651"><a href="#L-651"><span class="linenos">651</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
+</span><span id="L-652"><a href="#L-652"><span class="linenos">652</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
+</span><span id="L-653"><a href="#L-653"><span class="linenos">653</span></a> <span class="p">)</span>
+</span><span id="L-654"><a href="#L-654"><span class="linenos">654</span></a>
+</span><span id="L-655"><a href="#L-655"><span class="linenos">655</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-656"><a href="#L-656"><span class="linenos">656</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-657"><a href="#L-657"><span class="linenos">657</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
+</span><span id="L-658"><a href="#L-658"><span class="linenos">658</span></a>
+</span><span id="L-659"><a href="#L-659"><span class="linenos">659</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
+</span><span id="L-660"><a href="#L-660"><span class="linenos">660</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="L-661"><a href="#L-661"><span class="linenos">661</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
+</span><span id="L-662"><a href="#L-662"><span class="linenos">662</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
+</span><span id="L-663"><a href="#L-663"><span class="linenos">663</span></a>
+</span><span id="L-664"><a href="#L-664"><span class="linenos">664</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="L-665"><a href="#L-665"><span class="linenos">665</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="L-666"><a href="#L-666"><span class="linenos">666</span></a>
+</span><span id="L-667"><a href="#L-667"><span class="linenos">667</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-668"><a href="#L-668"><span class="linenos">668</span></a>
+</span><span id="L-669"><a href="#L-669"><span class="linenos">669</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-670"><a href="#L-670"><span class="linenos">670</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
+</span><span id="L-671"><a href="#L-671"><span class="linenos">671</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-672"><a href="#L-672"><span class="linenos">672</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
+</span><span id="L-673"><a href="#L-673"><span class="linenos">673</span></a>
+</span><span id="L-674"><a href="#L-674"><span class="linenos">674</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-675"><a href="#L-675"><span class="linenos">675</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="L-676"><a href="#L-676"><span class="linenos">676</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
+</span><span id="L-677"><a href="#L-677"><span class="linenos">677</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
+</span><span id="L-678"><a href="#L-678"><span class="linenos">678</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
+</span><span id="L-679"><a href="#L-679"><span class="linenos">679</span></a> <span class="p">):</span>
+</span><span id="L-680"><a href="#L-680"><span class="linenos">680</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="L-681"><a href="#L-681"><span class="linenos">681</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
+</span><span id="L-682"><a href="#L-682"><span class="linenos">682</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="L-683"><a href="#L-683"><span class="linenos">683</span></a>
+</span><span id="L-684"><a href="#L-684"><span class="linenos">684</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-685"><a href="#L-685"><span class="linenos">685</span></a>
+</span><span id="L-686"><a href="#L-686"><span class="linenos">686</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-687"><a href="#L-687"><span class="linenos">687</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="L-688"><a href="#L-688"><span class="linenos">688</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
+</span><span id="L-689"><a href="#L-689"><span class="linenos">689</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+</span><span id="L-690"><a href="#L-690"><span class="linenos">690</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="L-691"><a href="#L-691"><span class="linenos">691</span></a>
+</span><span id="L-692"><a href="#L-692"><span class="linenos">692</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-693"><a href="#L-693"><span class="linenos">693</span></a>
+</span><span id="L-694"><a href="#L-694"><span class="linenos">694</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-695"><a href="#L-695"><span class="linenos">695</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="L-696"><a href="#L-696"><span class="linenos">696</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
+</span><span id="L-697"><a href="#L-697"><span class="linenos">697</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
+</span><span id="L-698"><a href="#L-698"><span class="linenos">698</span></a>
+</span><span id="L-699"><a href="#L-699"><span class="linenos">699</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-700"><a href="#L-700"><span class="linenos">700</span></a>
+</span><span id="L-701"><a href="#L-701"><span class="linenos">701</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
+</span><span id="L-702"><a href="#L-702"><span class="linenos">702</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
+</span><span id="L-703"><a href="#L-703"><span class="linenos">703</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="L-704"><a href="#L-704"><span class="linenos">704</span></a>
+</span><span id="L-705"><a href="#L-705"><span class="linenos">705</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-706"><a href="#L-706"><span class="linenos">706</span></a>
+</span><span id="L-707"><a href="#L-707"><span class="linenos">707</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
+</span><span id="L-708"><a href="#L-708"><span class="linenos">708</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
+</span><span id="L-709"><a href="#L-709"><span class="linenos">709</span></a>
+</span><span id="L-710"><a href="#L-710"><span class="linenos">710</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="L-711"><a href="#L-711"><span class="linenos">711</span></a>
+</span><span id="L-712"><a href="#L-712"><span class="linenos">712</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-713"><a href="#L-713"><span class="linenos">713</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
+</span><span id="L-714"><a href="#L-714"><span class="linenos">714</span></a>
+</span><span id="L-715"><a href="#L-715"><span class="linenos">715</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="L-716"><a href="#L-716"><span class="linenos">716</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
+</span><span id="L-717"><a href="#L-717"><span class="linenos">717</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="L-718"><a href="#L-718"><span class="linenos">718</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="L-719"><a href="#L-719"><span class="linenos">719</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
+</span><span id="L-720"><a href="#L-720"><span class="linenos">720</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="L-721"><a href="#L-721"><span class="linenos">721</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-722"><a href="#L-722"><span class="linenos">722</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-723"><a href="#L-723"><span class="linenos">723</span></a>
+</span><span id="L-724"><a href="#L-724"><span class="linenos">724</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="L-725"><a href="#L-725"><span class="linenos">725</span></a>
+</span><span id="L-726"><a href="#L-726"><span class="linenos">726</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -1156,7 +1241,7 @@
</span><span id="DuckDB-342"><a href="#DuckDB-342"><span class="linenos">342</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> <span class="n">advance</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
</span><span id="DuckDB-343"><a href="#DuckDB-343"><span class="linenos">343</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_bracket</span><span class="p">())</span>
</span><span id="DuckDB-344"><a href="#DuckDB-344"><span class="linenos">344</span></a>
-</span><span id="DuckDB-345"><a href="#DuckDB-345"><span class="linenos">345</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="DuckDB-345"><a href="#DuckDB-345"><span class="linenos">345</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_assignment</span><span class="p">)</span>
</span><span id="DuckDB-346"><a href="#DuckDB-346"><span class="linenos">346</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">,</span> <span class="n">keys</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">values</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
</span><span id="DuckDB-347"><a href="#DuckDB-347"><span class="linenos">347</span></a>
</span><span id="DuckDB-348"><a href="#DuckDB-348"><span class="linenos">348</span></a> <span class="k">def</span> <span class="nf">_parse_struct_types</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">type_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]:</span>
@@ -1318,145 +1403,227 @@
</span><span id="DuckDB-504"><a href="#DuckDB-504"><span class="linenos">504</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="DuckDB-505"><a href="#DuckDB-505"><span class="linenos">505</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="DuckDB-506"><a href="#DuckDB-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-507"><a href="#DuckDB-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-508"><a href="#DuckDB-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-509"><a href="#DuckDB-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-510"><a href="#DuckDB-510"><span class="linenos">510</span></a> <span class="p">}</span>
-</span><span id="DuckDB-511"><a href="#DuckDB-511"><span class="linenos">511</span></a>
-</span><span id="DuckDB-512"><a href="#DuckDB-512"><span class="linenos">512</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
-</span><span id="DuckDB-513"><a href="#DuckDB-513"><span class="linenos">513</span></a>
-</span><span id="DuckDB-514"><a href="#DuckDB-514"><span class="linenos">514</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="DuckDB-515"><a href="#DuckDB-515"><span class="linenos">515</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="DuckDB-516"><a href="#DuckDB-516"><span class="linenos">516</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-517"><a href="#DuckDB-517"><span class="linenos">517</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
-</span><span id="DuckDB-518"><a href="#DuckDB-518"><span class="linenos">518</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
-</span><span id="DuckDB-519"><a href="#DuckDB-519"><span class="linenos">519</span></a> <span class="p">}</span>
-</span><span id="DuckDB-520"><a href="#DuckDB-520"><span class="linenos">520</span></a>
-</span><span id="DuckDB-521"><a href="#DuckDB-521"><span class="linenos">521</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
-</span><span id="DuckDB-522"><a href="#DuckDB-522"><span class="linenos">522</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
-</span><span id="DuckDB-523"><a href="#DuckDB-523"><span class="linenos">523</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
-</span><span id="DuckDB-524"><a href="#DuckDB-524"><span class="linenos">524</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
-</span><span id="DuckDB-525"><a href="#DuckDB-525"><span class="linenos">525</span></a>
-</span><span id="DuckDB-526"><a href="#DuckDB-526"><span class="linenos">526</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-527"><a href="#DuckDB-527"><span class="linenos">527</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-528"><a href="#DuckDB-528"><span class="linenos">528</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB-529"><a href="#DuckDB-529"><span class="linenos">529</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-</span><span id="DuckDB-530"><a href="#DuckDB-530"><span class="linenos">530</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB-531"><a href="#DuckDB-531"><span class="linenos">531</span></a> <span class="p">)</span>
-</span><span id="DuckDB-532"><a href="#DuckDB-532"><span class="linenos">532</span></a>
-</span><span id="DuckDB-533"><a href="#DuckDB-533"><span class="linenos">533</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-534"><a href="#DuckDB-534"><span class="linenos">534</span></a>
-</span><span id="DuckDB-535"><a href="#DuckDB-535"><span class="linenos">535</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-536"><a href="#DuckDB-536"><span class="linenos">536</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
-</span><span id="DuckDB-537"><a href="#DuckDB-537"><span class="linenos">537</span></a>
-</span><span id="DuckDB-538"><a href="#DuckDB-538"><span class="linenos">538</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-539"><a href="#DuckDB-539"><span class="linenos">539</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB-540"><a href="#DuckDB-540"><span class="linenos">540</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
-</span><span id="DuckDB-541"><a href="#DuckDB-541"><span class="linenos">541</span></a>
-</span><span id="DuckDB-542"><a href="#DuckDB-542"><span class="linenos">542</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-543"><a href="#DuckDB-543"><span class="linenos">543</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB-544"><a href="#DuckDB-544"><span class="linenos">544</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB-545"><a href="#DuckDB-545"><span class="linenos">545</span></a>
-</span><span id="DuckDB-546"><a href="#DuckDB-546"><span class="linenos">546</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
-</span><span id="DuckDB-547"><a href="#DuckDB-547"><span class="linenos">547</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
-</span><span id="DuckDB-548"><a href="#DuckDB-548"><span class="linenos">548</span></a>
-</span><span id="DuckDB-549"><a href="#DuckDB-549"><span class="linenos">549</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-550"><a href="#DuckDB-550"><span class="linenos">550</span></a>
-</span><span id="DuckDB-551"><a href="#DuckDB-551"><span class="linenos">551</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB-552"><a href="#DuckDB-552"><span class="linenos">552</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB-553"><a href="#DuckDB-553"><span class="linenos">553</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
-</span><span id="DuckDB-554"><a href="#DuckDB-554"><span class="linenos">554</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
-</span><span id="DuckDB-555"><a href="#DuckDB-555"><span class="linenos">555</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="DuckDB-556"><a href="#DuckDB-556"><span class="linenos">556</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-557"><a href="#DuckDB-557"><span class="linenos">557</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
-</span><span id="DuckDB-558"><a href="#DuckDB-558"><span class="linenos">558</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
-</span><span id="DuckDB-559"><a href="#DuckDB-559"><span class="linenos">559</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
-</span><span id="DuckDB-560"><a href="#DuckDB-560"><span class="linenos">560</span></a>
-</span><span id="DuckDB-561"><a href="#DuckDB-561"><span class="linenos">561</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
-</span><span id="DuckDB-562"><a href="#DuckDB-562"><span class="linenos">562</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-563"><a href="#DuckDB-563"><span class="linenos">563</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
-</span><span id="DuckDB-564"><a href="#DuckDB-564"><span class="linenos">564</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
-</span><span id="DuckDB-565"><a href="#DuckDB-565"><span class="linenos">565</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
-</span><span id="DuckDB-566"><a href="#DuckDB-566"><span class="linenos">566</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
-</span><span id="DuckDB-567"><a href="#DuckDB-567"><span class="linenos">567</span></a> <span class="p">)</span>
-</span><span id="DuckDB-568"><a href="#DuckDB-568"><span class="linenos">568</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
-</span><span id="DuckDB-569"><a href="#DuckDB-569"><span class="linenos">569</span></a>
-</span><span id="DuckDB-570"><a href="#DuckDB-570"><span class="linenos">570</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB-571"><a href="#DuckDB-571"><span class="linenos">571</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
-</span><span id="DuckDB-572"><a href="#DuckDB-572"><span class="linenos">572</span></a> <span class="p">)</span>
-</span><span id="DuckDB-573"><a href="#DuckDB-573"><span class="linenos">573</span></a>
-</span><span id="DuckDB-574"><a href="#DuckDB-574"><span class="linenos">574</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-575"><a href="#DuckDB-575"><span class="linenos">575</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="DuckDB-576"><a href="#DuckDB-576"><span class="linenos">576</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
-</span><span id="DuckDB-577"><a href="#DuckDB-577"><span class="linenos">577</span></a>
-</span><span id="DuckDB-578"><a href="#DuckDB-578"><span class="linenos">578</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
-</span><span id="DuckDB-579"><a href="#DuckDB-579"><span class="linenos">579</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB-580"><a href="#DuckDB-580"><span class="linenos">580</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
-</span><span id="DuckDB-581"><a href="#DuckDB-581"><span class="linenos">581</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB-582"><a href="#DuckDB-582"><span class="linenos">582</span></a>
-</span><span id="DuckDB-583"><a href="#DuckDB-583"><span class="linenos">583</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="DuckDB-584"><a href="#DuckDB-584"><span class="linenos">584</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="DuckDB-585"><a href="#DuckDB-585"><span class="linenos">585</span></a>
-</span><span id="DuckDB-586"><a href="#DuckDB-586"><span class="linenos">586</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-587"><a href="#DuckDB-587"><span class="linenos">587</span></a>
-</span><span id="DuckDB-588"><a href="#DuckDB-588"><span class="linenos">588</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-589"><a href="#DuckDB-589"><span class="linenos">589</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
-</span><span id="DuckDB-590"><a href="#DuckDB-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-591"><a href="#DuckDB-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
-</span><span id="DuckDB-592"><a href="#DuckDB-592"><span class="linenos">592</span></a>
-</span><span id="DuckDB-593"><a href="#DuckDB-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-594"><a href="#DuckDB-594"><span class="linenos">594</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB-595"><a href="#DuckDB-595"><span class="linenos">595</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
-</span><span id="DuckDB-596"><a href="#DuckDB-596"><span class="linenos">596</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-597"><a href="#DuckDB-597"><span class="linenos">597</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
-</span><span id="DuckDB-598"><a href="#DuckDB-598"><span class="linenos">598</span></a> <span class="p">):</span>
-</span><span id="DuckDB-599"><a href="#DuckDB-599"><span class="linenos">599</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB-600"><a href="#DuckDB-600"><span class="linenos">600</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
-</span><span id="DuckDB-601"><a href="#DuckDB-601"><span class="linenos">601</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="DuckDB-507"><a href="#DuckDB-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMPNTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-508"><a href="#DuckDB-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-509"><a href="#DuckDB-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-510"><a href="#DuckDB-510"><span class="linenos">510</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-511"><a href="#DuckDB-511"><span class="linenos">511</span></a> <span class="p">}</span>
+</span><span id="DuckDB-512"><a href="#DuckDB-512"><span class="linenos">512</span></a>
+</span><span id="DuckDB-513"><a href="#DuckDB-513"><span class="linenos">513</span></a> <span class="c1"># https://github.com/duckdb/duckdb/blob/ff7f24fd8e3128d94371827523dae85ebaf58713/third_party/libpg_query/grammar/keywords/reserved_keywords.list#L1-L77</span>
+</span><span id="DuckDB-514"><a href="#DuckDB-514"><span class="linenos">514</span></a> <span class="n">RESERVED_KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-515"><a href="#DuckDB-515"><span class="linenos">515</span></a> <span class="s2">&quot;array&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-516"><a href="#DuckDB-516"><span class="linenos">516</span></a> <span class="s2">&quot;analyse&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-517"><a href="#DuckDB-517"><span class="linenos">517</span></a> <span class="s2">&quot;union&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-518"><a href="#DuckDB-518"><span class="linenos">518</span></a> <span class="s2">&quot;all&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-519"><a href="#DuckDB-519"><span class="linenos">519</span></a> <span class="s2">&quot;when&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-520"><a href="#DuckDB-520"><span class="linenos">520</span></a> <span class="s2">&quot;in_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-521"><a href="#DuckDB-521"><span class="linenos">521</span></a> <span class="s2">&quot;default&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-522"><a href="#DuckDB-522"><span class="linenos">522</span></a> <span class="s2">&quot;create_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-523"><a href="#DuckDB-523"><span class="linenos">523</span></a> <span class="s2">&quot;window&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-524"><a href="#DuckDB-524"><span class="linenos">524</span></a> <span class="s2">&quot;asymmetric&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-525"><a href="#DuckDB-525"><span class="linenos">525</span></a> <span class="s2">&quot;to&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-526"><a href="#DuckDB-526"><span class="linenos">526</span></a> <span class="s2">&quot;else&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-527"><a href="#DuckDB-527"><span class="linenos">527</span></a> <span class="s2">&quot;localtime&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-528"><a href="#DuckDB-528"><span class="linenos">528</span></a> <span class="s2">&quot;from&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-529"><a href="#DuckDB-529"><span class="linenos">529</span></a> <span class="s2">&quot;end_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-530"><a href="#DuckDB-530"><span class="linenos">530</span></a> <span class="s2">&quot;select&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-531"><a href="#DuckDB-531"><span class="linenos">531</span></a> <span class="s2">&quot;current_date&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-532"><a href="#DuckDB-532"><span class="linenos">532</span></a> <span class="s2">&quot;foreign&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-533"><a href="#DuckDB-533"><span class="linenos">533</span></a> <span class="s2">&quot;with&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-534"><a href="#DuckDB-534"><span class="linenos">534</span></a> <span class="s2">&quot;grant&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-535"><a href="#DuckDB-535"><span class="linenos">535</span></a> <span class="s2">&quot;session_user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-536"><a href="#DuckDB-536"><span class="linenos">536</span></a> <span class="s2">&quot;or&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-537"><a href="#DuckDB-537"><span class="linenos">537</span></a> <span class="s2">&quot;except&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-538"><a href="#DuckDB-538"><span class="linenos">538</span></a> <span class="s2">&quot;references&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-539"><a href="#DuckDB-539"><span class="linenos">539</span></a> <span class="s2">&quot;fetch&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-540"><a href="#DuckDB-540"><span class="linenos">540</span></a> <span class="s2">&quot;limit&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-541"><a href="#DuckDB-541"><span class="linenos">541</span></a> <span class="s2">&quot;group_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-542"><a href="#DuckDB-542"><span class="linenos">542</span></a> <span class="s2">&quot;leading&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-543"><a href="#DuckDB-543"><span class="linenos">543</span></a> <span class="s2">&quot;into&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-544"><a href="#DuckDB-544"><span class="linenos">544</span></a> <span class="s2">&quot;collate&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-545"><a href="#DuckDB-545"><span class="linenos">545</span></a> <span class="s2">&quot;offset&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-546"><a href="#DuckDB-546"><span class="linenos">546</span></a> <span class="s2">&quot;do&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-547"><a href="#DuckDB-547"><span class="linenos">547</span></a> <span class="s2">&quot;then&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-548"><a href="#DuckDB-548"><span class="linenos">548</span></a> <span class="s2">&quot;localtimestamp&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-549"><a href="#DuckDB-549"><span class="linenos">549</span></a> <span class="s2">&quot;check_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-550"><a href="#DuckDB-550"><span class="linenos">550</span></a> <span class="s2">&quot;lateral_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-551"><a href="#DuckDB-551"><span class="linenos">551</span></a> <span class="s2">&quot;current_role&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-552"><a href="#DuckDB-552"><span class="linenos">552</span></a> <span class="s2">&quot;where&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-553"><a href="#DuckDB-553"><span class="linenos">553</span></a> <span class="s2">&quot;asc_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-554"><a href="#DuckDB-554"><span class="linenos">554</span></a> <span class="s2">&quot;placing&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-555"><a href="#DuckDB-555"><span class="linenos">555</span></a> <span class="s2">&quot;desc_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-556"><a href="#DuckDB-556"><span class="linenos">556</span></a> <span class="s2">&quot;user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-557"><a href="#DuckDB-557"><span class="linenos">557</span></a> <span class="s2">&quot;unique&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-558"><a href="#DuckDB-558"><span class="linenos">558</span></a> <span class="s2">&quot;initially&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-559"><a href="#DuckDB-559"><span class="linenos">559</span></a> <span class="s2">&quot;column&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-560"><a href="#DuckDB-560"><span class="linenos">560</span></a> <span class="s2">&quot;both&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-561"><a href="#DuckDB-561"><span class="linenos">561</span></a> <span class="s2">&quot;some&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-562"><a href="#DuckDB-562"><span class="linenos">562</span></a> <span class="s2">&quot;as&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-563"><a href="#DuckDB-563"><span class="linenos">563</span></a> <span class="s2">&quot;any&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-564"><a href="#DuckDB-564"><span class="linenos">564</span></a> <span class="s2">&quot;only&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-565"><a href="#DuckDB-565"><span class="linenos">565</span></a> <span class="s2">&quot;deferrable&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-566"><a href="#DuckDB-566"><span class="linenos">566</span></a> <span class="s2">&quot;null_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-567"><a href="#DuckDB-567"><span class="linenos">567</span></a> <span class="s2">&quot;current_time&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-568"><a href="#DuckDB-568"><span class="linenos">568</span></a> <span class="s2">&quot;true_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-569"><a href="#DuckDB-569"><span class="linenos">569</span></a> <span class="s2">&quot;table&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-570"><a href="#DuckDB-570"><span class="linenos">570</span></a> <span class="s2">&quot;case&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-571"><a href="#DuckDB-571"><span class="linenos">571</span></a> <span class="s2">&quot;trailing&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-572"><a href="#DuckDB-572"><span class="linenos">572</span></a> <span class="s2">&quot;variadic&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-573"><a href="#DuckDB-573"><span class="linenos">573</span></a> <span class="s2">&quot;for&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-574"><a href="#DuckDB-574"><span class="linenos">574</span></a> <span class="s2">&quot;on&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-575"><a href="#DuckDB-575"><span class="linenos">575</span></a> <span class="s2">&quot;distinct&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-576"><a href="#DuckDB-576"><span class="linenos">576</span></a> <span class="s2">&quot;false_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-577"><a href="#DuckDB-577"><span class="linenos">577</span></a> <span class="s2">&quot;not&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-578"><a href="#DuckDB-578"><span class="linenos">578</span></a> <span class="s2">&quot;constraint&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-579"><a href="#DuckDB-579"><span class="linenos">579</span></a> <span class="s2">&quot;current_timestamp&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-580"><a href="#DuckDB-580"><span class="linenos">580</span></a> <span class="s2">&quot;returning&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-581"><a href="#DuckDB-581"><span class="linenos">581</span></a> <span class="s2">&quot;primary&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-582"><a href="#DuckDB-582"><span class="linenos">582</span></a> <span class="s2">&quot;intersect&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-583"><a href="#DuckDB-583"><span class="linenos">583</span></a> <span class="s2">&quot;having&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-584"><a href="#DuckDB-584"><span class="linenos">584</span></a> <span class="s2">&quot;analyze&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-585"><a href="#DuckDB-585"><span class="linenos">585</span></a> <span class="s2">&quot;current_user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-586"><a href="#DuckDB-586"><span class="linenos">586</span></a> <span class="s2">&quot;and&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-587"><a href="#DuckDB-587"><span class="linenos">587</span></a> <span class="s2">&quot;cast&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-588"><a href="#DuckDB-588"><span class="linenos">588</span></a> <span class="s2">&quot;symmetric&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-589"><a href="#DuckDB-589"><span class="linenos">589</span></a> <span class="s2">&quot;using&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-590"><a href="#DuckDB-590"><span class="linenos">590</span></a> <span class="s2">&quot;order&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-591"><a href="#DuckDB-591"><span class="linenos">591</span></a> <span class="s2">&quot;current_catalog&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-592"><a href="#DuckDB-592"><span class="linenos">592</span></a> <span class="p">}</span>
+</span><span id="DuckDB-593"><a href="#DuckDB-593"><span class="linenos">593</span></a>
+</span><span id="DuckDB-594"><a href="#DuckDB-594"><span class="linenos">594</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
+</span><span id="DuckDB-595"><a href="#DuckDB-595"><span class="linenos">595</span></a>
+</span><span id="DuckDB-596"><a href="#DuckDB-596"><span class="linenos">596</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="DuckDB-597"><a href="#DuckDB-597"><span class="linenos">597</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="DuckDB-598"><a href="#DuckDB-598"><span class="linenos">598</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-599"><a href="#DuckDB-599"><span class="linenos">599</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
+</span><span id="DuckDB-600"><a href="#DuckDB-600"><span class="linenos">600</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
+</span><span id="DuckDB-601"><a href="#DuckDB-601"><span class="linenos">601</span></a> <span class="p">}</span>
</span><span id="DuckDB-602"><a href="#DuckDB-602"><span class="linenos">602</span></a>
-</span><span id="DuckDB-603"><a href="#DuckDB-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-604"><a href="#DuckDB-604"><span class="linenos">604</span></a>
-</span><span id="DuckDB-605"><a href="#DuckDB-605"><span class="linenos">605</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-606"><a href="#DuckDB-606"><span class="linenos">606</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="DuckDB-607"><a href="#DuckDB-607"><span class="linenos">607</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
-</span><span id="DuckDB-608"><a href="#DuckDB-608"><span class="linenos">608</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
-</span><span id="DuckDB-609"><a href="#DuckDB-609"><span class="linenos">609</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-610"><a href="#DuckDB-610"><span class="linenos">610</span></a>
-</span><span id="DuckDB-611"><a href="#DuckDB-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB-612"><a href="#DuckDB-612"><span class="linenos">612</span></a>
-</span><span id="DuckDB-613"><a href="#DuckDB-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-614"><a href="#DuckDB-614"><span class="linenos">614</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB-615"><a href="#DuckDB-615"><span class="linenos">615</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
-</span><span id="DuckDB-616"><a href="#DuckDB-616"><span class="linenos">616</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
-</span><span id="DuckDB-617"><a href="#DuckDB-617"><span class="linenos">617</span></a>
-</span><span id="DuckDB-618"><a href="#DuckDB-618"><span class="linenos">618</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-603"><a href="#DuckDB-603"><span class="linenos">603</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="DuckDB-604"><a href="#DuckDB-604"><span class="linenos">604</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="DuckDB-605"><a href="#DuckDB-605"><span class="linenos">605</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
+</span><span id="DuckDB-606"><a href="#DuckDB-606"><span class="linenos">606</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
+</span><span id="DuckDB-607"><a href="#DuckDB-607"><span class="linenos">607</span></a>
+</span><span id="DuckDB-608"><a href="#DuckDB-608"><span class="linenos">608</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-609"><a href="#DuckDB-609"><span class="linenos">609</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-610"><a href="#DuckDB-610"><span class="linenos">610</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB-611"><a href="#DuckDB-611"><span class="linenos">611</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="DuckDB-612"><a href="#DuckDB-612"><span class="linenos">612</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB-613"><a href="#DuckDB-613"><span class="linenos">613</span></a> <span class="p">)</span>
+</span><span id="DuckDB-614"><a href="#DuckDB-614"><span class="linenos">614</span></a>
+</span><span id="DuckDB-615"><a href="#DuckDB-615"><span class="linenos">615</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-616"><a href="#DuckDB-616"><span class="linenos">616</span></a>
+</span><span id="DuckDB-617"><a href="#DuckDB-617"><span class="linenos">617</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-618"><a href="#DuckDB-618"><span class="linenos">618</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
</span><span id="DuckDB-619"><a href="#DuckDB-619"><span class="linenos">619</span></a>
-</span><span id="DuckDB-620"><a href="#DuckDB-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
-</span><span id="DuckDB-621"><a href="#DuckDB-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
-</span><span id="DuckDB-622"><a href="#DuckDB-622"><span class="linenos">622</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="DuckDB-620"><a href="#DuckDB-620"><span class="linenos">620</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-621"><a href="#DuckDB-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB-622"><a href="#DuckDB-622"><span class="linenos">622</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
</span><span id="DuckDB-623"><a href="#DuckDB-623"><span class="linenos">623</span></a>
-</span><span id="DuckDB-624"><a href="#DuckDB-624"><span class="linenos">624</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB-625"><a href="#DuckDB-625"><span class="linenos">625</span></a>
-</span><span id="DuckDB-626"><a href="#DuckDB-626"><span class="linenos">626</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
-</span><span id="DuckDB-627"><a href="#DuckDB-627"><span class="linenos">627</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
-</span><span id="DuckDB-628"><a href="#DuckDB-628"><span class="linenos">628</span></a>
-</span><span id="DuckDB-629"><a href="#DuckDB-629"><span class="linenos">629</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB-624"><a href="#DuckDB-624"><span class="linenos">624</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-625"><a href="#DuckDB-625"><span class="linenos">625</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB-626"><a href="#DuckDB-626"><span class="linenos">626</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB-627"><a href="#DuckDB-627"><span class="linenos">627</span></a>
+</span><span id="DuckDB-628"><a href="#DuckDB-628"><span class="linenos">628</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
+</span><span id="DuckDB-629"><a href="#DuckDB-629"><span class="linenos">629</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
</span><span id="DuckDB-630"><a href="#DuckDB-630"><span class="linenos">630</span></a>
-</span><span id="DuckDB-631"><a href="#DuckDB-631"><span class="linenos">631</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB-632"><a href="#DuckDB-632"><span class="linenos">632</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-633"><a href="#DuckDB-633"><span class="linenos">633</span></a>
-</span><span id="DuckDB-634"><a href="#DuckDB-634"><span class="linenos">634</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB-635"><a href="#DuckDB-635"><span class="linenos">635</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
-</span><span id="DuckDB-636"><a href="#DuckDB-636"><span class="linenos">636</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
-</span><span id="DuckDB-637"><a href="#DuckDB-637"><span class="linenos">637</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
-</span><span id="DuckDB-638"><a href="#DuckDB-638"><span class="linenos">638</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
-</span><span id="DuckDB-639"><a href="#DuckDB-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
-</span><span id="DuckDB-640"><a href="#DuckDB-640"><span class="linenos">640</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB-641"><a href="#DuckDB-641"><span class="linenos">641</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB-631"><a href="#DuckDB-631"><span class="linenos">631</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-632"><a href="#DuckDB-632"><span class="linenos">632</span></a>
+</span><span id="DuckDB-633"><a href="#DuckDB-633"><span class="linenos">633</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB-634"><a href="#DuckDB-634"><span class="linenos">634</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB-635"><a href="#DuckDB-635"><span class="linenos">635</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
+</span><span id="DuckDB-636"><a href="#DuckDB-636"><span class="linenos">636</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
+</span><span id="DuckDB-637"><a href="#DuckDB-637"><span class="linenos">637</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="DuckDB-638"><a href="#DuckDB-638"><span class="linenos">638</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-639"><a href="#DuckDB-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
+</span><span id="DuckDB-640"><a href="#DuckDB-640"><span class="linenos">640</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="DuckDB-641"><a href="#DuckDB-641"><span class="linenos">641</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
</span><span id="DuckDB-642"><a href="#DuckDB-642"><span class="linenos">642</span></a>
-</span><span id="DuckDB-643"><a href="#DuckDB-643"><span class="linenos">643</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-644"><a href="#DuckDB-644"><span class="linenos">644</span></a>
-</span><span id="DuckDB-645"><a href="#DuckDB-645"><span class="linenos">645</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="DuckDB-643"><a href="#DuckDB-643"><span class="linenos">643</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
+</span><span id="DuckDB-644"><a href="#DuckDB-644"><span class="linenos">644</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-645"><a href="#DuckDB-645"><span class="linenos">645</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
+</span><span id="DuckDB-646"><a href="#DuckDB-646"><span class="linenos">646</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
+</span><span id="DuckDB-647"><a href="#DuckDB-647"><span class="linenos">647</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
+</span><span id="DuckDB-648"><a href="#DuckDB-648"><span class="linenos">648</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
+</span><span id="DuckDB-649"><a href="#DuckDB-649"><span class="linenos">649</span></a> <span class="p">)</span>
+</span><span id="DuckDB-650"><a href="#DuckDB-650"><span class="linenos">650</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
+</span><span id="DuckDB-651"><a href="#DuckDB-651"><span class="linenos">651</span></a>
+</span><span id="DuckDB-652"><a href="#DuckDB-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB-653"><a href="#DuckDB-653"><span class="linenos">653</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
+</span><span id="DuckDB-654"><a href="#DuckDB-654"><span class="linenos">654</span></a> <span class="p">)</span>
+</span><span id="DuckDB-655"><a href="#DuckDB-655"><span class="linenos">655</span></a>
+</span><span id="DuckDB-656"><a href="#DuckDB-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-657"><a href="#DuckDB-657"><span class="linenos">657</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="DuckDB-658"><a href="#DuckDB-658"><span class="linenos">658</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
+</span><span id="DuckDB-659"><a href="#DuckDB-659"><span class="linenos">659</span></a>
+</span><span id="DuckDB-660"><a href="#DuckDB-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
+</span><span id="DuckDB-661"><a href="#DuckDB-661"><span class="linenos">661</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="DuckDB-662"><a href="#DuckDB-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
+</span><span id="DuckDB-663"><a href="#DuckDB-663"><span class="linenos">663</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
+</span><span id="DuckDB-664"><a href="#DuckDB-664"><span class="linenos">664</span></a>
+</span><span id="DuckDB-665"><a href="#DuckDB-665"><span class="linenos">665</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB-666"><a href="#DuckDB-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="DuckDB-667"><a href="#DuckDB-667"><span class="linenos">667</span></a>
+</span><span id="DuckDB-668"><a href="#DuckDB-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-669"><a href="#DuckDB-669"><span class="linenos">669</span></a>
+</span><span id="DuckDB-670"><a href="#DuckDB-670"><span class="linenos">670</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-671"><a href="#DuckDB-671"><span class="linenos">671</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
+</span><span id="DuckDB-672"><a href="#DuckDB-672"><span class="linenos">672</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-673"><a href="#DuckDB-673"><span class="linenos">673</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
+</span><span id="DuckDB-674"><a href="#DuckDB-674"><span class="linenos">674</span></a>
+</span><span id="DuckDB-675"><a href="#DuckDB-675"><span class="linenos">675</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-676"><a href="#DuckDB-676"><span class="linenos">676</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB-677"><a href="#DuckDB-677"><span class="linenos">677</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
+</span><span id="DuckDB-678"><a href="#DuckDB-678"><span class="linenos">678</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-679"><a href="#DuckDB-679"><span class="linenos">679</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
+</span><span id="DuckDB-680"><a href="#DuckDB-680"><span class="linenos">680</span></a> <span class="p">):</span>
+</span><span id="DuckDB-681"><a href="#DuckDB-681"><span class="linenos">681</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB-682"><a href="#DuckDB-682"><span class="linenos">682</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
+</span><span id="DuckDB-683"><a href="#DuckDB-683"><span class="linenos">683</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="DuckDB-684"><a href="#DuckDB-684"><span class="linenos">684</span></a>
+</span><span id="DuckDB-685"><a href="#DuckDB-685"><span class="linenos">685</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-686"><a href="#DuckDB-686"><span class="linenos">686</span></a>
+</span><span id="DuckDB-687"><a href="#DuckDB-687"><span class="linenos">687</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-688"><a href="#DuckDB-688"><span class="linenos">688</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="DuckDB-689"><a href="#DuckDB-689"><span class="linenos">689</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
+</span><span id="DuckDB-690"><a href="#DuckDB-690"><span class="linenos">690</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+</span><span id="DuckDB-691"><a href="#DuckDB-691"><span class="linenos">691</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-692"><a href="#DuckDB-692"><span class="linenos">692</span></a>
+</span><span id="DuckDB-693"><a href="#DuckDB-693"><span class="linenos">693</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-694"><a href="#DuckDB-694"><span class="linenos">694</span></a>
+</span><span id="DuckDB-695"><a href="#DuckDB-695"><span class="linenos">695</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-696"><a href="#DuckDB-696"><span class="linenos">696</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB-697"><a href="#DuckDB-697"><span class="linenos">697</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
+</span><span id="DuckDB-698"><a href="#DuckDB-698"><span class="linenos">698</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
+</span><span id="DuckDB-699"><a href="#DuckDB-699"><span class="linenos">699</span></a>
+</span><span id="DuckDB-700"><a href="#DuckDB-700"><span class="linenos">700</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB-701"><a href="#DuckDB-701"><span class="linenos">701</span></a>
+</span><span id="DuckDB-702"><a href="#DuckDB-702"><span class="linenos">702</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
+</span><span id="DuckDB-703"><a href="#DuckDB-703"><span class="linenos">703</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
+</span><span id="DuckDB-704"><a href="#DuckDB-704"><span class="linenos">704</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="DuckDB-705"><a href="#DuckDB-705"><span class="linenos">705</span></a>
+</span><span id="DuckDB-706"><a href="#DuckDB-706"><span class="linenos">706</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB-707"><a href="#DuckDB-707"><span class="linenos">707</span></a>
+</span><span id="DuckDB-708"><a href="#DuckDB-708"><span class="linenos">708</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
+</span><span id="DuckDB-709"><a href="#DuckDB-709"><span class="linenos">709</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
+</span><span id="DuckDB-710"><a href="#DuckDB-710"><span class="linenos">710</span></a>
+</span><span id="DuckDB-711"><a href="#DuckDB-711"><span class="linenos">711</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB-712"><a href="#DuckDB-712"><span class="linenos">712</span></a>
+</span><span id="DuckDB-713"><a href="#DuckDB-713"><span class="linenos">713</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-714"><a href="#DuckDB-714"><span class="linenos">714</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-715"><a href="#DuckDB-715"><span class="linenos">715</span></a>
+</span><span id="DuckDB-716"><a href="#DuckDB-716"><span class="linenos">716</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB-717"><a href="#DuckDB-717"><span class="linenos">717</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
+</span><span id="DuckDB-718"><a href="#DuckDB-718"><span class="linenos">718</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="DuckDB-719"><a href="#DuckDB-719"><span class="linenos">719</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB-720"><a href="#DuckDB-720"><span class="linenos">720</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
+</span><span id="DuckDB-721"><a href="#DuckDB-721"><span class="linenos">721</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB-722"><a href="#DuckDB-722"><span class="linenos">722</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB-723"><a href="#DuckDB-723"><span class="linenos">723</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB-724"><a href="#DuckDB-724"><span class="linenos">724</span></a>
+</span><span id="DuckDB-725"><a href="#DuckDB-725"><span class="linenos">725</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-726"><a href="#DuckDB-726"><span class="linenos">726</span></a>
+</span><span id="DuckDB-727"><a href="#DuckDB-727"><span class="linenos">727</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -2135,7 +2302,7 @@ Possible values: <code>"nulls_are_small"</code>, <code>"nulls_are_large"</code>,
</span><span id="DuckDB.Parser-342"><a href="#DuckDB.Parser-342"><span class="linenos">342</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> <span class="n">advance</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
</span><span id="DuckDB.Parser-343"><a href="#DuckDB.Parser-343"><span class="linenos">343</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_bracket</span><span class="p">())</span>
</span><span id="DuckDB.Parser-344"><a href="#DuckDB.Parser-344"><span class="linenos">344</span></a>
-</span><span id="DuckDB.Parser-345"><a href="#DuckDB.Parser-345"><span class="linenos">345</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-345"><a href="#DuckDB.Parser-345"><span class="linenos">345</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_wrapped_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_assignment</span><span class="p">)</span>
</span><span id="DuckDB.Parser-346"><a href="#DuckDB.Parser-346"><span class="linenos">346</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">,</span> <span class="n">keys</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">values</span><span class="o">=</span><span class="n">seq_get</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
</span><span id="DuckDB.Parser-347"><a href="#DuckDB.Parser-347"><span class="linenos">347</span></a>
</span><span id="DuckDB.Parser-348"><a href="#DuckDB.Parser-348"><span class="linenos">348</span></a> <span class="k">def</span> <span class="nf">_parse_struct_types</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">type_required</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]:</span>
@@ -2181,7 +2348,7 @@ Default: 3</li>
<div id="DuckDB.Parser.FUNCTIONS_WITH_ALIASED_ARGS" class="classattr">
<div class="attr variable">
<span class="name">FUNCTIONS_WITH_ALIASED_ARGS</span> =
-<span class="default_value">{&#39;STRUCT&#39;, &#39;STRUCT_PACK&#39;}</span>
+<span class="default_value">{&#39;STRUCT_PACK&#39;, &#39;STRUCT&#39;}</span>
</div>
@@ -2194,7 +2361,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">FUNCTIONS</span> =
<input id="DuckDB.Parser.FUNCTIONS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="DuckDB.Parser.FUNCTIONS-view-value"></label><span class="default_value">{&#39;ABS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Abs">sqlglot.expressions.Abs</a>&#39;&gt;&gt;, &#39;ADD_MONTHS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AddMonths">sqlglot.expressions.AddMonths</a>&#39;&gt;&gt;, &#39;ANONYMOUS_AGG_FUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AnonymousAggFunc">sqlglot.expressions.AnonymousAggFunc</a>&#39;&gt;&gt;, &#39;ANY_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AnyValue">sqlglot.expressions.AnyValue</a>&#39;&gt;&gt;, &#39;APPROX_DISTINCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;&gt;, &#39;APPROX_COUNT_DISTINCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;&gt;, &#39;APPROX_QUANTILE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxQuantile">sqlglot.expressions.ApproxQuantile</a>&#39;&gt;&gt;, &#39;APPROX_TOP_K&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxTopK">sqlglot.expressions.ApproxTopK</a>&#39;&gt;&gt;, &#39;ARG_MAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;ARGMAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;MAX_BY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;ARG_MIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;ARGMIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;MIN_BY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;&gt;, &#39;ARRAY_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAgg">sqlglot.expressions.ArrayAgg</a>&#39;&gt;&gt;, &#39;ARRAY_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAll">sqlglot.expressions.ArrayAll</a>&#39;&gt;&gt;, &#39;ARRAY_ANY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAny">sqlglot.expressions.ArrayAny</a>&#39;&gt;&gt;, &#39;ARRAY_CONCAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>&#39;&gt;&gt;, &#39;ARRAY_CAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>&#39;&gt;&gt;, &#39;ARRAY_CONSTRUCT_COMPACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConstructCompact">sqlglot.expressions.ArrayConstructCompact</a>&#39;&gt;&gt;, &#39;ARRAY_CONTAINS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;ARRAY_HAS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;ARRAY_CONTAINS_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContainsAll">sqlglot.expressions.ArrayContainsAll</a>&#39;&gt;&gt;, &#39;ARRAY_HAS_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContainsAll">sqlglot.expressions.ArrayContainsAll</a>&#39;&gt;&gt;, &#39;FILTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;&gt;, &#39;ARRAY_FILTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;&gt;, &#39;ARRAY_OVERLAPS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayOverlaps">sqlglot.expressions.ArrayOverlaps</a>&#39;&gt;&gt;, &#39;ARRAY_SIZE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;&gt;, &#39;ARRAY_LENGTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;&gt;, &#39;ARRAY_SORT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;ARRAY_SUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySum">sqlglot.expressions.ArraySum</a>&#39;&gt;&gt;, &#39;ARRAY_TO_STRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>&#39;&gt;&gt;, &#39;ARRAY_JOIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>&#39;&gt;&gt;, &#39;ARRAY_UNION_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayUnionAgg">sqlglot.expressions.ArrayUnionAgg</a>&#39;&gt;&gt;, &#39;ARRAY_UNIQUE_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayUniqueAgg">sqlglot.expressions.ArrayUniqueAgg</a>&#39;&gt;&gt;, &#39;AVG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Avg">sqlglot.expressions.Avg</a>&#39;&gt;&gt;, &#39;CASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Case">sqlglot.expressions.Case</a>&#39;&gt;&gt;, &#39;CAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Cast">sqlglot.expressions.Cast</a>&#39;&gt;&gt;, &#39;CAST_TO_STR_TYPE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CastToStrType">sqlglot.expressions.CastToStrType</a>&#39;&gt;&gt;, &#39;CBRT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Cbrt">sqlglot.expressions.Cbrt</a>&#39;&gt;&gt;, &#39;CEIL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ceil">sqlglot.expressions.Ceil</a>&#39;&gt;&gt;, &#39;CEILING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ceil">sqlglot.expressions.Ceil</a>&#39;&gt;&gt;, &#39;CHR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Chr">sqlglot.expressions.Chr</a>&#39;&gt;&gt;, &#39;CHAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Chr">sqlglot.expressions.Chr</a>&#39;&gt;&gt;, &#39;COALESCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;IFNULL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;NVL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;COLLATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Collate">sqlglot.expressions.Collate</a>&#39;&gt;&gt;, &#39;COMBINED_AGG_FUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CombinedAggFunc">sqlglot.expressions.CombinedAggFunc</a>&#39;&gt;&gt;, &#39;COMBINED_PARAMETERIZED_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CombinedParameterizedAgg">sqlglot.expressions.CombinedParameterizedAgg</a>&#39;&gt;&gt;, &#39;CONCAT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONCAT_WS&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONNECT_BY_ROOT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ConnectByRoot">sqlglot.expressions.ConnectByRoot</a>&#39;&gt;&gt;, &#39;CONVERT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Convert">sqlglot.expressions.Convert</a>&#39;&gt;&gt;, &#39;CORR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Corr">sqlglot.expressions.Corr</a>&#39;&gt;&gt;, &#39;COUNT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Count">sqlglot.expressions.Count</a>&#39;&gt;&gt;, &#39;COUNT_IF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CountIf">sqlglot.expressions.CountIf</a>&#39;&gt;&gt;, &#39;COUNTIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CountIf">sqlglot.expressions.CountIf</a>&#39;&gt;&gt;, &#39;COVAR_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CovarPop">sqlglot.expressions.CovarPop</a>&#39;&gt;&gt;, &#39;COVAR_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CovarSamp">sqlglot.expressions.CovarSamp</a>&#39;&gt;&gt;, &#39;CURRENT_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentDate">sqlglot.expressions.CurrentDate</a>&#39;&gt;&gt;, &#39;CURRENT_DATETIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentDatetime">sqlglot.expressions.CurrentDatetime</a>&#39;&gt;&gt;, &#39;CURRENT_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentTime">sqlglot.expressions.CurrentTime</a>&#39;&gt;&gt;, &#39;CURRENT_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentTimestamp">sqlglot.expressions.CurrentTimestamp</a>&#39;&gt;&gt;, &#39;CURRENT_USER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentUser">sqlglot.expressions.CurrentUser</a>&#39;&gt;&gt;, &#39;DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Date">sqlglot.expressions.Date</a>&#39;&gt;&gt;, &#39;DATE_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;&gt;, &#39;DATEDIFF&#39;: &lt;function _build_date_diff&gt;, &#39;DATE_DIFF&#39;: &lt;function _build_date_diff&gt;, &#39;DATE_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;&gt;, &#39;DATEFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;&gt;, &#39;DATE_STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>&#39;&gt;&gt;, &#39;DATE_TO_DATE_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;DATE_TO_DI&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>&#39;&gt;&gt;, &#39;DATE_TRUNC&#39;: &lt;function date_trunc_to_time&gt;, &#39;DATETIME_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeAdd">sqlglot.expressions.DatetimeAdd</a>&#39;&gt;&gt;, &#39;DATETIME_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeDiff">sqlglot.expressions.DatetimeDiff</a>&#39;&gt;&gt;, &#39;DATETIME_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeSub">sqlglot.expressions.DatetimeSub</a>&#39;&gt;&gt;, &#39;DATETIME_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeTrunc">sqlglot.expressions.DatetimeTrunc</a>&#39;&gt;&gt;, &#39;DAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Day">sqlglot.expressions.Day</a>&#39;&gt;&gt;, &#39;DAY_OF_MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;&gt;, &#39;DAYOFMONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;&gt;, &#39;DAY_OF_WEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;&gt;, &#39;DAYOFWEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;&gt;, &#39;DAY_OF_YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;&gt;, &#39;DAYOFYEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;&gt;, &#39;DECODE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;DI_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>&#39;&gt;&gt;, &#39;ENCODE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;EXP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Exp">sqlglot.expressions.Exp</a>&#39;&gt;&gt;, &#39;EXPLODE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;&gt;, &#39;EXPLODE_OUTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ExplodeOuter">sqlglot.expressions.ExplodeOuter</a>&#39;&gt;&gt;, &#39;EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Extract">sqlglot.expressions.Extract</a>&#39;&gt;&gt;, &#39;FIRST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#First">sqlglot.expressions.First</a>&#39;&gt;&gt;, &#39;FIRST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FirstValue">sqlglot.expressions.FirstValue</a>&#39;&gt;&gt;, &#39;FLATTEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Flatten">sqlglot.expressions.Flatten</a>&#39;&gt;&gt;, &#39;FLOOR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Floor">sqlglot.expressions.Floor</a>&#39;&gt;&gt;, &#39;FROM_BASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FromBase">sqlglot.expressions.FromBase</a>&#39;&gt;&gt;, &#39;FROM_BASE64&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FromBase64">sqlglot.expressions.FromBase64</a>&#39;&gt;&gt;, &#39;GENERATE_DATE_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#GenerateDateArray">sqlglot.expressions.GenerateDateArray</a>&#39;&gt;&gt;, &#39;GENERATE_SERIES&#39;: &lt;function _build_generate_series.&lt;locals&gt;._builder&gt;, &#39;GREATEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Greatest">sqlglot.expressions.Greatest</a>&#39;&gt;&gt;, &#39;GROUP_CONCAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#GroupConcat">sqlglot.expressions.GroupConcat</a>&#39;&gt;&gt;, &#39;HEX&#39;: &lt;function build_hex&gt;, &#39;HLL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Hll">sqlglot.expressions.Hll</a>&#39;&gt;&gt;, &#39;IF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#If">sqlglot.expressions.If</a>&#39;&gt;&gt;, &#39;IIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#If">sqlglot.expressions.If</a>&#39;&gt;&gt;, &#39;INITCAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Initcap">sqlglot.expressions.Initcap</a>&#39;&gt;&gt;, &#39;IS_INF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;&gt;, &#39;ISINF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;&gt;, &#39;IS_NAN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;&gt;, &#39;ISNAN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;&gt;, &#39;J_S_O_N_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArray">sqlglot.expressions.JSONArray</a>&#39;&gt;&gt;, &#39;J_S_O_N_ARRAY_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArrayAgg">sqlglot.expressions.JSONArrayAgg</a>&#39;&gt;&gt;, &#39;JSON_ARRAY_CONTAINS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArrayContains">sqlglot.expressions.JSONArrayContains</a>&#39;&gt;&gt;, &#39;JSONB_EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONBExtract">sqlglot.expressions.JSONBExtract</a>&#39;&gt;&gt;, &#39;JSONB_EXTRACT_SCALAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONBExtractScalar">sqlglot.expressions.JSONBExtractScalar</a>&#39;&gt;&gt;, &#39;JSON_EXTRACT&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_EXTRACT_SCALAR&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_FORMAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>&#39;&gt;&gt;, &#39;J_S_O_N_OBJECT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONObject">sqlglot.expressions.JSONObject</a>&#39;&gt;&gt;, &#39;J_S_O_N_OBJECT_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONObjectAgg">sqlglot.expressions.JSONObjectAgg</a>&#39;&gt;&gt;, &#39;J_S_O_N_TABLE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONTable">sqlglot.expressions.JSONTable</a>&#39;&gt;&gt;, &#39;LAG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lag">sqlglot.expressions.Lag</a>&#39;&gt;&gt;, &#39;LAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Last">sqlglot.expressions.Last</a>&#39;&gt;&gt;, &#39;LAST_DAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastDay">sqlglot.expressions.LastDay</a>&#39;&gt;&gt;, &#39;LAST_DAY_OF_MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastDay">sqlglot.expressions.LastDay</a>&#39;&gt;&gt;, &#39;LAST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastValue">sqlglot.expressions.LastValue</a>&#39;&gt;&gt;, &#39;LEAD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lead">sqlglot.expressions.Lead</a>&#39;&gt;&gt;, &#39;LEAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Least">sqlglot.expressions.Least</a>&#39;&gt;&gt;, &#39;LEFT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Left">sqlglot.expressions.Left</a>&#39;&gt;&gt;, &#39;LENGTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Length">sqlglot.expressions.Length</a>&#39;&gt;&gt;, &#39;LEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Length">sqlglot.expressions.Length</a>&#39;&gt;&gt;, &#39;LEVENSHTEIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Levenshtein">sqlglot.expressions.Levenshtein</a>&#39;&gt;&gt;, &#39;LN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ln">sqlglot.expressions.Ln</a>&#39;&gt;&gt;, &#39;LOG&#39;: &lt;function build_logarithm&gt;, &#39;LOGICAL_AND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;BOOL_AND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;BOOLAND_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;LOGICAL_OR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;BOOL_OR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;BOOLOR_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;LOWER&#39;: &lt;function build_lower&gt;, &#39;LCASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lower">sqlglot.expressions.Lower</a>&#39;&gt;&gt;, &#39;LOWER_HEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LowerHex">sqlglot.expressions.LowerHex</a>&#39;&gt;&gt;, &#39;MD5&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MD5">sqlglot.expressions.MD5</a>&#39;&gt;&gt;, &#39;MD5_DIGEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MD5Digest">sqlglot.expressions.MD5Digest</a>&#39;&gt;&gt;, &#39;MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Map">sqlglot.expressions.Map</a>&#39;&gt;&gt;, &#39;MAP_FROM_ENTRIES&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MapFromEntries">sqlglot.expressions.MapFromEntries</a>&#39;&gt;&gt;, &#39;MATCH_AGAINST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MatchAgainst">sqlglot.expressions.MatchAgainst</a>&#39;&gt;&gt;, &#39;MAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Max">sqlglot.expressions.Max</a>&#39;&gt;&gt;, &#39;MIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Min">sqlglot.expressions.Min</a>&#39;&gt;&gt;, &#39;MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Month">sqlglot.expressions.Month</a>&#39;&gt;&gt;, &#39;MONTHS_BETWEEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>&#39;&gt;&gt;, &#39;NEXT_VALUE_FOR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NextValueFor">sqlglot.expressions.NextValueFor</a>&#39;&gt;&gt;, &#39;NTH_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NthValue">sqlglot.expressions.NthValue</a>&#39;&gt;&gt;, &#39;NULLIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Nullif">sqlglot.expressions.Nullif</a>&#39;&gt;&gt;, &#39;NUMBER_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NumberToStr">sqlglot.expressions.NumberToStr</a>&#39;&gt;&gt;, &#39;NVL2&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Nvl2">sqlglot.expressions.Nvl2</a>&#39;&gt;&gt;, &#39;OPEN_J_S_O_N&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#OpenJSON">sqlglot.expressions.OpenJSON</a>&#39;&gt;&gt;, &#39;PARAMETERIZED_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParameterizedAgg">sqlglot.expressions.ParameterizedAgg</a>&#39;&gt;&gt;, &#39;PARSE_JSON&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;JSON_PARSE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;PERCENTILE_CONT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;&gt;, &#39;PERCENTILE_DISC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;&gt;, &#39;POSEXPLODE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Posexplode">sqlglot.expressions.Posexplode</a>&#39;&gt;&gt;, &#39;POSEXPLODE_OUTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PosexplodeOuter">sqlglot.expressions.PosexplodeOuter</a>&#39;&gt;&gt;, &#39;POWER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Pow">sqlglot.expressions.Pow</a>&#39;&gt;&gt;, &#39;POW&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Pow">sqlglot.expressions.Pow</a>&#39;&gt;&gt;, &#39;PREDICT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Predict">sqlglot.expressions.Predict</a>&#39;&gt;&gt;, &#39;QUANTILE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Quantile">sqlglot.expressions.Quantile</a>&#39;&gt;&gt;, &#39;QUARTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Quarter">sqlglot.expressions.Quarter</a>&#39;&gt;&gt;, &#39;RAND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;&gt;, &#39;RANDOM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;&gt;, &#39;RANDN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Randn">sqlglot.expressions.Randn</a>&#39;&gt;&gt;, &#39;RANGE_N&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RangeN">sqlglot.expressions.RangeN</a>&#39;&gt;&gt;, &#39;READ_CSV&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ReadCSV">sqlglot.expressions.ReadCSV</a>&#39;&gt;&gt;, &#39;REDUCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Reduce">sqlglot.expressions.Reduce</a>&#39;&gt;&gt;, &#39;REGEXP_EXTRACT&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;REGEXP_I_LIKE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpILike">sqlglot.expressions.RegexpILike</a>&#39;&gt;&gt;, &#39;REGEXP_LIKE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;&gt;, &#39;REGEXP_REPLACE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;REGEXP_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;REPEAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Repeat">sqlglot.expressions.Repeat</a>&#39;&gt;&gt;, &#39;RIGHT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Right">sqlglot.expressions.Right</a>&#39;&gt;&gt;, &#39;ROUND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Round">sqlglot.expressions.Round</a>&#39;&gt;&gt;, &#39;ROW_NUMBER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RowNumber">sqlglot.expressions.RowNumber</a>&#39;&gt;&gt;, &#39;SHA&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA">sqlglot.expressions.SHA</a>&#39;&gt;&gt;, &#39;SHA1&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA">sqlglot.expressions.SHA</a>&#39;&gt;&gt;, &#39;SHA2&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA2">sqlglot.expressions.SHA2</a>&#39;&gt;&gt;, &#39;SAFE_DIVIDE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>&#39;&gt;&gt;, &#39;SIGN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sign">sqlglot.expressions.Sign</a>&#39;&gt;&gt;, &#39;SIGNUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sign">sqlglot.expressions.Sign</a>&#39;&gt;&gt;, &#39;SORT_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;SQRT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sqrt">sqlglot.expressions.Sqrt</a>&#39;&gt;&gt;, &#39;STANDARD_HASH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StandardHash">sqlglot.expressions.StandardHash</a>&#39;&gt;&gt;, &#39;STAR_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StarMap">sqlglot.expressions.StarMap</a>&#39;&gt;&gt;, &#39;STARTS_WITH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StartsWith">sqlglot.expressions.StartsWith</a>&#39;&gt;&gt;, &#39;STARTSWITH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StartsWith">sqlglot.expressions.StartsWith</a>&#39;&gt;&gt;, &#39;STDDEV&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stddev">sqlglot.expressions.Stddev</a>&#39;&gt;&gt;, &#39;STDDEV_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StddevPop">sqlglot.expressions.StddevPop</a>&#39;&gt;&gt;, &#39;STDDEV_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StddevSamp">sqlglot.expressions.StddevSamp</a>&#39;&gt;&gt;, &#39;STR_POSITION&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>&#39;&gt;&gt;, &#39;STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;&gt;, &#39;STR_TO_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToMap">sqlglot.expressions.StrToMap</a>&#39;&gt;&gt;, &#39;STR_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>&#39;&gt;&gt;, &#39;STR_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>&#39;&gt;&gt;, &#39;STRING_TO_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;SPLIT_BY_STRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StringToArray">sqlglot.expressions.StringToArray</a>&#39;&gt;&gt;, &#39;STRUCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;&gt;, &#39;STRUCT_EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StructExtract">sqlglot.expressions.StructExtract</a>&#39;&gt;&gt;, &#39;STUFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stuff">sqlglot.expressions.Stuff</a>&#39;&gt;&gt;, &#39;INSERT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stuff">sqlglot.expressions.Stuff</a>&#39;&gt;&gt;, &#39;SUBSTRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Substring">sqlglot.expressions.Substring</a>&#39;&gt;&gt;, &#39;SUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sum">sqlglot.expressions.Sum</a>&#39;&gt;&gt;, &#39;TIME_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeAdd">sqlglot.expressions.TimeAdd</a>&#39;&gt;&gt;, &#39;TIME_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeDiff">sqlglot.expressions.TimeDiff</a>&#39;&gt;&gt;, &#39;TIME_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;TIMEFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>&#39;&gt;&gt;, &#39;TIME_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeSub">sqlglot.expressions.TimeSub</a>&#39;&gt;&gt;, &#39;TIME_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>&#39;&gt;&gt;, &#39;TIME_TO_TIME_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TIME_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;&gt;, &#39;TIME_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeTrunc">sqlglot.expressions.TimeTrunc</a>&#39;&gt;&gt;, &#39;TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>&#39;&gt;&gt;, &#39;TIMESTAMP_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampAdd">sqlglot.expressions.TimestampAdd</a>&#39;&gt;&gt;, &#39;TIMESTAMPDIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;&gt;, &#39;TIMESTAMP_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;&gt;, &#39;TIMESTAMP_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampFromParts">sqlglot.expressions.TimestampFromParts</a>&#39;&gt;&gt;, &#39;TIMESTAMPFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampFromParts">sqlglot.expressions.TimestampFromParts</a>&#39;&gt;&gt;, &#39;TIMESTAMP_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampSub">sqlglot.expressions.TimestampSub</a>&#39;&gt;&gt;, &#39;TIMESTAMP_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampTrunc">sqlglot.expressions.TimestampTrunc</a>&#39;&gt;&gt;, &#39;TO_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToArray">sqlglot.expressions.ToArray</a>&#39;&gt;&gt;, &#39;TO_BASE64&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToBase64">sqlglot.expressions.ToBase64</a>&#39;&gt;&gt;, &#39;TO_CHAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToChar">sqlglot.expressions.ToChar</a>&#39;&gt;&gt;, &#39;TO_DAYS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToDays">sqlglot.expressions.ToDays</a>&#39;&gt;&gt;, &#39;TO_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>&#39;&gt;&gt;, &#39;TO_NUMBER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToNumber">sqlglot.expressions.ToNumber</a>&#39;&gt;&gt;, &#39;TRANSFORM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Transform">sqlglot.expressions.Transform</a>&#39;&gt;&gt;, &#39;TRIM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Trim">sqlglot.expressions.Trim</a>&#39;&gt;&gt;, &#39;TRY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Try">sqlglot.expressions.Try</a>&#39;&gt;&gt;, &#39;TRY_CAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TryCast">sqlglot.expressions.TryCast</a>&#39;&gt;&gt;, &#39;TS_OR_DI_TO_DI&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>&#39;&gt;&gt;, &#39;TS_OR_DS_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;&gt;, &#39;TS_OR_DS_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToDate">sqlglot.expressions.TsOrDsToDate</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_DATE_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TS_OR_DS_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToTime">sqlglot.expressions.TsOrDsToTime</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToTimestamp">sqlglot.expressions.TsOrDsToTimestamp</a>&#39;&gt;&gt;, &#39;UNHEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Unhex">sqlglot.expressions.Unhex</a>&#39;&gt;&gt;, &#39;UNIX_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixDate">sqlglot.expressions.UnixDate</a>&#39;&gt;&gt;, &#39;UNIX_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>&#39;&gt;&gt;, &#39;UNIX_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;&gt;, &#39;UNIX_TO_TIME_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>&#39;&gt;&gt;, &#39;UPPER&#39;: &lt;function build_upper&gt;, &#39;UCASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Upper">sqlglot.expressions.Upper</a>&#39;&gt;&gt;, &#39;VAR_MAP&#39;: &lt;function build_var_map&gt;, &#39;VARIANCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VARIANCE_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VAR_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VARIANCE_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;&gt;, &#39;VAR_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;&gt;, &#39;WEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Week">sqlglot.expressions.Week</a>&#39;&gt;&gt;, &#39;WEEK_OF_YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;&gt;, &#39;WEEKOFYEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;&gt;, &#39;WHEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#When">sqlglot.expressions.When</a>&#39;&gt;&gt;, &#39;X_M_L_TABLE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#XMLTable">sqlglot.expressions.XMLTable</a>&#39;&gt;&gt;, &#39;XOR&#39;: &lt;function binary_from_function.&lt;locals&gt;.&lt;lambda&gt;&gt;, &#39;YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Year">sqlglot.expressions.Year</a>&#39;&gt;&gt;, &#39;GLOB&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_EXTRACT_PATH_TEXT&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;LIKE&#39;: &lt;function build_like&gt;, &#39;LOG2&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;LOG10&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;MOD&#39;: &lt;function build_mod&gt;, &#39;TO_HEX&#39;: &lt;function build_hex&gt;, &#39;ARRAY_REVERSE_SORT&#39;: &lt;function _build_sort_array_desc&gt;, &#39;DATETRUNC&#39;: &lt;function date_trunc_to_time&gt;, &#39;EPOCH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;&gt;, &#39;EPOCH_MS&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;JSON&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;JSON_EXTRACT_PATH&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_EXTRACT_STRING&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;LIST_HAS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;LIST_REVERSE_SORT&#39;: &lt;function _build_sort_array_desc&gt;, &#39;LIST_SORT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;LIST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;&gt;, &#39;MAKE_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;MAKE_TIMESTAMP&#39;: &lt;function _build_make_timestamp&gt;, &#39;MEDIAN&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;QUANTILE_CONT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;&gt;, &#39;QUANTILE_DISC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;&gt;, &#39;REGEXP_MATCHES&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;&gt;, &#39;STRFTIME&#39;: &lt;function build_formatted_time.&lt;locals&gt;._builder&gt;, &#39;STRING_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;STRING_SPLIT_REGEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;STRPTIME&#39;: &lt;function build_formatted_time.&lt;locals&gt;._builder&gt;, &#39;STRUCT_PACK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;&gt;, &#39;STR_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;STR_SPLIT_REGEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;TO_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;&gt;, &#39;UNNEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;&gt;, &#39;RANGE&#39;: &lt;function _build_generate_series.&lt;locals&gt;._builder&gt;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.Parser.FUNCTIONS-view-value"></label><span class="default_value">{&#39;ABS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Abs">sqlglot.expressions.Abs</a>&#39;&gt;&gt;, &#39;ADD_MONTHS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AddMonths">sqlglot.expressions.AddMonths</a>&#39;&gt;&gt;, &#39;ANONYMOUS_AGG_FUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AnonymousAggFunc">sqlglot.expressions.AnonymousAggFunc</a>&#39;&gt;&gt;, &#39;ANY_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#AnyValue">sqlglot.expressions.AnyValue</a>&#39;&gt;&gt;, &#39;APPROX_DISTINCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;&gt;, &#39;APPROX_COUNT_DISTINCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;&gt;, &#39;APPROX_QUANTILE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxQuantile">sqlglot.expressions.ApproxQuantile</a>&#39;&gt;&gt;, &#39;APPROX_TOP_K&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ApproxTopK">sqlglot.expressions.ApproxTopK</a>&#39;&gt;&gt;, &#39;ARG_MAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;ARGMAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;MAX_BY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;&gt;, &#39;ARG_MIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;ARGMIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;MIN_BY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;&gt;, &#39;ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;&gt;, &#39;ARRAY_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAgg">sqlglot.expressions.ArrayAgg</a>&#39;&gt;&gt;, &#39;ARRAY_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAll">sqlglot.expressions.ArrayAll</a>&#39;&gt;&gt;, &#39;ARRAY_ANY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayAny">sqlglot.expressions.ArrayAny</a>&#39;&gt;&gt;, &#39;ARRAY_CONCAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>&#39;&gt;&gt;, &#39;ARRAY_CAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>&#39;&gt;&gt;, &#39;ARRAY_CONSTRUCT_COMPACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayConstructCompact">sqlglot.expressions.ArrayConstructCompact</a>&#39;&gt;&gt;, &#39;ARRAY_CONTAINS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;ARRAY_HAS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;ARRAY_CONTAINS_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContainsAll">sqlglot.expressions.ArrayContainsAll</a>&#39;&gt;&gt;, &#39;ARRAY_HAS_ALL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContainsAll">sqlglot.expressions.ArrayContainsAll</a>&#39;&gt;&gt;, &#39;FILTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;&gt;, &#39;ARRAY_FILTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;&gt;, &#39;ARRAY_OVERLAPS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayOverlaps">sqlglot.expressions.ArrayOverlaps</a>&#39;&gt;&gt;, &#39;ARRAY_SIZE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;&gt;, &#39;ARRAY_LENGTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;&gt;, &#39;ARRAY_SORT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;ARRAY_SUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArraySum">sqlglot.expressions.ArraySum</a>&#39;&gt;&gt;, &#39;ARRAY_TO_STRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>&#39;&gt;&gt;, &#39;ARRAY_JOIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>&#39;&gt;&gt;, &#39;ARRAY_UNION_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayUnionAgg">sqlglot.expressions.ArrayUnionAgg</a>&#39;&gt;&gt;, &#39;ARRAY_UNIQUE_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayUniqueAgg">sqlglot.expressions.ArrayUniqueAgg</a>&#39;&gt;&gt;, &#39;AVG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Avg">sqlglot.expressions.Avg</a>&#39;&gt;&gt;, &#39;CASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Case">sqlglot.expressions.Case</a>&#39;&gt;&gt;, &#39;CAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Cast">sqlglot.expressions.Cast</a>&#39;&gt;&gt;, &#39;CAST_TO_STR_TYPE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CastToStrType">sqlglot.expressions.CastToStrType</a>&#39;&gt;&gt;, &#39;CBRT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Cbrt">sqlglot.expressions.Cbrt</a>&#39;&gt;&gt;, &#39;CEIL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ceil">sqlglot.expressions.Ceil</a>&#39;&gt;&gt;, &#39;CEILING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ceil">sqlglot.expressions.Ceil</a>&#39;&gt;&gt;, &#39;CHR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Chr">sqlglot.expressions.Chr</a>&#39;&gt;&gt;, &#39;CHAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Chr">sqlglot.expressions.Chr</a>&#39;&gt;&gt;, &#39;COALESCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;IFNULL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;NVL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Coalesce">sqlglot.expressions.Coalesce</a>&#39;&gt;&gt;, &#39;COLLATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Collate">sqlglot.expressions.Collate</a>&#39;&gt;&gt;, &#39;COMBINED_AGG_FUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CombinedAggFunc">sqlglot.expressions.CombinedAggFunc</a>&#39;&gt;&gt;, &#39;COMBINED_PARAMETERIZED_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CombinedParameterizedAgg">sqlglot.expressions.CombinedParameterizedAgg</a>&#39;&gt;&gt;, &#39;CONCAT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONCAT_WS&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONNECT_BY_ROOT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ConnectByRoot">sqlglot.expressions.ConnectByRoot</a>&#39;&gt;&gt;, &#39;CONVERT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Convert">sqlglot.expressions.Convert</a>&#39;&gt;&gt;, &#39;CORR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Corr">sqlglot.expressions.Corr</a>&#39;&gt;&gt;, &#39;COUNT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Count">sqlglot.expressions.Count</a>&#39;&gt;&gt;, &#39;COUNT_IF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CountIf">sqlglot.expressions.CountIf</a>&#39;&gt;&gt;, &#39;COUNTIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CountIf">sqlglot.expressions.CountIf</a>&#39;&gt;&gt;, &#39;COVAR_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CovarPop">sqlglot.expressions.CovarPop</a>&#39;&gt;&gt;, &#39;COVAR_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CovarSamp">sqlglot.expressions.CovarSamp</a>&#39;&gt;&gt;, &#39;CURRENT_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentDate">sqlglot.expressions.CurrentDate</a>&#39;&gt;&gt;, &#39;CURRENT_DATETIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentDatetime">sqlglot.expressions.CurrentDatetime</a>&#39;&gt;&gt;, &#39;CURRENT_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentTime">sqlglot.expressions.CurrentTime</a>&#39;&gt;&gt;, &#39;CURRENT_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentTimestamp">sqlglot.expressions.CurrentTimestamp</a>&#39;&gt;&gt;, &#39;CURRENT_USER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#CurrentUser">sqlglot.expressions.CurrentUser</a>&#39;&gt;&gt;, &#39;DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Date">sqlglot.expressions.Date</a>&#39;&gt;&gt;, &#39;DATE_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;&gt;, &#39;DATEDIFF&#39;: &lt;function _build_date_diff&gt;, &#39;DATE_DIFF&#39;: &lt;function _build_date_diff&gt;, &#39;DATE_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;&gt;, &#39;DATEFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;&gt;, &#39;DATE_STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>&#39;&gt;&gt;, &#39;DATE_TO_DATE_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;DATE_TO_DI&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>&#39;&gt;&gt;, &#39;DATE_TRUNC&#39;: &lt;function date_trunc_to_time&gt;, &#39;DATETIME_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeAdd">sqlglot.expressions.DatetimeAdd</a>&#39;&gt;&gt;, &#39;DATETIME_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeDiff">sqlglot.expressions.DatetimeDiff</a>&#39;&gt;&gt;, &#39;DATETIME_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeSub">sqlglot.expressions.DatetimeSub</a>&#39;&gt;&gt;, &#39;DATETIME_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DatetimeTrunc">sqlglot.expressions.DatetimeTrunc</a>&#39;&gt;&gt;, &#39;DAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Day">sqlglot.expressions.Day</a>&#39;&gt;&gt;, &#39;DAY_OF_MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;&gt;, &#39;DAYOFMONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;&gt;, &#39;DAY_OF_WEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;&gt;, &#39;DAYOFWEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;&gt;, &#39;DAY_OF_YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;&gt;, &#39;DAYOFYEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;&gt;, &#39;DECODE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;DI_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>&#39;&gt;&gt;, &#39;ENCODE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;EXP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Exp">sqlglot.expressions.Exp</a>&#39;&gt;&gt;, &#39;EXPLODE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;&gt;, &#39;EXPLODE_OUTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ExplodeOuter">sqlglot.expressions.ExplodeOuter</a>&#39;&gt;&gt;, &#39;EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Extract">sqlglot.expressions.Extract</a>&#39;&gt;&gt;, &#39;FIRST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#First">sqlglot.expressions.First</a>&#39;&gt;&gt;, &#39;FIRST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FirstValue">sqlglot.expressions.FirstValue</a>&#39;&gt;&gt;, &#39;FLATTEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Flatten">sqlglot.expressions.Flatten</a>&#39;&gt;&gt;, &#39;FLOOR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Floor">sqlglot.expressions.Floor</a>&#39;&gt;&gt;, &#39;FROM_BASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FromBase">sqlglot.expressions.FromBase</a>&#39;&gt;&gt;, &#39;FROM_BASE64&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#FromBase64">sqlglot.expressions.FromBase64</a>&#39;&gt;&gt;, &#39;GAP_FILL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#GapFill">sqlglot.expressions.GapFill</a>&#39;&gt;&gt;, &#39;GENERATE_DATE_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#GenerateDateArray">sqlglot.expressions.GenerateDateArray</a>&#39;&gt;&gt;, &#39;GENERATE_SERIES&#39;: &lt;function _build_generate_series.&lt;locals&gt;._builder&gt;, &#39;GREATEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Greatest">sqlglot.expressions.Greatest</a>&#39;&gt;&gt;, &#39;GROUP_CONCAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#GroupConcat">sqlglot.expressions.GroupConcat</a>&#39;&gt;&gt;, &#39;HEX&#39;: &lt;function build_hex&gt;, &#39;HLL&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Hll">sqlglot.expressions.Hll</a>&#39;&gt;&gt;, &#39;IF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#If">sqlglot.expressions.If</a>&#39;&gt;&gt;, &#39;IIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#If">sqlglot.expressions.If</a>&#39;&gt;&gt;, &#39;INITCAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Initcap">sqlglot.expressions.Initcap</a>&#39;&gt;&gt;, &#39;IS_INF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;&gt;, &#39;ISINF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;&gt;, &#39;IS_NAN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;&gt;, &#39;ISNAN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;&gt;, &#39;J_S_O_N_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArray">sqlglot.expressions.JSONArray</a>&#39;&gt;&gt;, &#39;J_S_O_N_ARRAY_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArrayAgg">sqlglot.expressions.JSONArrayAgg</a>&#39;&gt;&gt;, &#39;JSON_ARRAY_CONTAINS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONArrayContains">sqlglot.expressions.JSONArrayContains</a>&#39;&gt;&gt;, &#39;JSONB_EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONBExtract">sqlglot.expressions.JSONBExtract</a>&#39;&gt;&gt;, &#39;JSONB_EXTRACT_SCALAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONBExtractScalar">sqlglot.expressions.JSONBExtractScalar</a>&#39;&gt;&gt;, &#39;JSON_EXTRACT&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_EXTRACT_SCALAR&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_FORMAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>&#39;&gt;&gt;, &#39;J_S_O_N_OBJECT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONObject">sqlglot.expressions.JSONObject</a>&#39;&gt;&gt;, &#39;J_S_O_N_OBJECT_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONObjectAgg">sqlglot.expressions.JSONObjectAgg</a>&#39;&gt;&gt;, &#39;J_S_O_N_TABLE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#JSONTable">sqlglot.expressions.JSONTable</a>&#39;&gt;&gt;, &#39;LAG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lag">sqlglot.expressions.Lag</a>&#39;&gt;&gt;, &#39;LAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Last">sqlglot.expressions.Last</a>&#39;&gt;&gt;, &#39;LAST_DAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastDay">sqlglot.expressions.LastDay</a>&#39;&gt;&gt;, &#39;LAST_DAY_OF_MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastDay">sqlglot.expressions.LastDay</a>&#39;&gt;&gt;, &#39;LAST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LastValue">sqlglot.expressions.LastValue</a>&#39;&gt;&gt;, &#39;LEAD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lead">sqlglot.expressions.Lead</a>&#39;&gt;&gt;, &#39;LEAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Least">sqlglot.expressions.Least</a>&#39;&gt;&gt;, &#39;LEFT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Left">sqlglot.expressions.Left</a>&#39;&gt;&gt;, &#39;LENGTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Length">sqlglot.expressions.Length</a>&#39;&gt;&gt;, &#39;LEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Length">sqlglot.expressions.Length</a>&#39;&gt;&gt;, &#39;LEVENSHTEIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Levenshtein">sqlglot.expressions.Levenshtein</a>&#39;&gt;&gt;, &#39;LN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Ln">sqlglot.expressions.Ln</a>&#39;&gt;&gt;, &#39;LOG&#39;: &lt;function build_logarithm&gt;, &#39;LOGICAL_AND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;BOOL_AND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;BOOLAND_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;&gt;, &#39;LOGICAL_OR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;BOOL_OR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;BOOLOR_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;&gt;, &#39;LOWER&#39;: &lt;function build_lower&gt;, &#39;LCASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Lower">sqlglot.expressions.Lower</a>&#39;&gt;&gt;, &#39;LOWER_HEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#LowerHex">sqlglot.expressions.LowerHex</a>&#39;&gt;&gt;, &#39;MD5&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MD5">sqlglot.expressions.MD5</a>&#39;&gt;&gt;, &#39;MD5_DIGEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MD5Digest">sqlglot.expressions.MD5Digest</a>&#39;&gt;&gt;, &#39;MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Map">sqlglot.expressions.Map</a>&#39;&gt;&gt;, &#39;MAP_FROM_ENTRIES&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MapFromEntries">sqlglot.expressions.MapFromEntries</a>&#39;&gt;&gt;, &#39;MATCH_AGAINST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MatchAgainst">sqlglot.expressions.MatchAgainst</a>&#39;&gt;&gt;, &#39;MAX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Max">sqlglot.expressions.Max</a>&#39;&gt;&gt;, &#39;MIN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Min">sqlglot.expressions.Min</a>&#39;&gt;&gt;, &#39;MONTH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Month">sqlglot.expressions.Month</a>&#39;&gt;&gt;, &#39;MONTHS_BETWEEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>&#39;&gt;&gt;, &#39;NEXT_VALUE_FOR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NextValueFor">sqlglot.expressions.NextValueFor</a>&#39;&gt;&gt;, &#39;NTH_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NthValue">sqlglot.expressions.NthValue</a>&#39;&gt;&gt;, &#39;NULLIF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Nullif">sqlglot.expressions.Nullif</a>&#39;&gt;&gt;, &#39;NUMBER_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#NumberToStr">sqlglot.expressions.NumberToStr</a>&#39;&gt;&gt;, &#39;NVL2&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Nvl2">sqlglot.expressions.Nvl2</a>&#39;&gt;&gt;, &#39;OPEN_J_S_O_N&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#OpenJSON">sqlglot.expressions.OpenJSON</a>&#39;&gt;&gt;, &#39;PARAMETERIZED_AGG&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParameterizedAgg">sqlglot.expressions.ParameterizedAgg</a>&#39;&gt;&gt;, &#39;PARSE_JSON&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;JSON_PARSE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;PERCENTILE_CONT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;&gt;, &#39;PERCENTILE_DISC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;&gt;, &#39;POSEXPLODE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Posexplode">sqlglot.expressions.Posexplode</a>&#39;&gt;&gt;, &#39;POSEXPLODE_OUTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PosexplodeOuter">sqlglot.expressions.PosexplodeOuter</a>&#39;&gt;&gt;, &#39;POWER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Pow">sqlglot.expressions.Pow</a>&#39;&gt;&gt;, &#39;POW&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Pow">sqlglot.expressions.Pow</a>&#39;&gt;&gt;, &#39;PREDICT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Predict">sqlglot.expressions.Predict</a>&#39;&gt;&gt;, &#39;QUANTILE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Quantile">sqlglot.expressions.Quantile</a>&#39;&gt;&gt;, &#39;QUARTER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Quarter">sqlglot.expressions.Quarter</a>&#39;&gt;&gt;, &#39;RAND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;&gt;, &#39;RANDOM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;&gt;, &#39;RANDN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Randn">sqlglot.expressions.Randn</a>&#39;&gt;&gt;, &#39;RANGE_N&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RangeN">sqlglot.expressions.RangeN</a>&#39;&gt;&gt;, &#39;READ_CSV&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ReadCSV">sqlglot.expressions.ReadCSV</a>&#39;&gt;&gt;, &#39;REDUCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Reduce">sqlglot.expressions.Reduce</a>&#39;&gt;&gt;, &#39;REGEXP_EXTRACT&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;REGEXP_I_LIKE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpILike">sqlglot.expressions.RegexpILike</a>&#39;&gt;&gt;, &#39;REGEXP_LIKE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;&gt;, &#39;REGEXP_REPLACE&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;REGEXP_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;REPEAT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Repeat">sqlglot.expressions.Repeat</a>&#39;&gt;&gt;, &#39;RIGHT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Right">sqlglot.expressions.Right</a>&#39;&gt;&gt;, &#39;ROUND&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Round">sqlglot.expressions.Round</a>&#39;&gt;&gt;, &#39;ROW_NUMBER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RowNumber">sqlglot.expressions.RowNumber</a>&#39;&gt;&gt;, &#39;SHA&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA">sqlglot.expressions.SHA</a>&#39;&gt;&gt;, &#39;SHA1&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA">sqlglot.expressions.SHA</a>&#39;&gt;&gt;, &#39;SHA2&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SHA2">sqlglot.expressions.SHA2</a>&#39;&gt;&gt;, &#39;SAFE_DIVIDE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>&#39;&gt;&gt;, &#39;SIGN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sign">sqlglot.expressions.Sign</a>&#39;&gt;&gt;, &#39;SIGNUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sign">sqlglot.expressions.Sign</a>&#39;&gt;&gt;, &#39;SORT_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;SQRT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sqrt">sqlglot.expressions.Sqrt</a>&#39;&gt;&gt;, &#39;STANDARD_HASH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StandardHash">sqlglot.expressions.StandardHash</a>&#39;&gt;&gt;, &#39;STAR_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StarMap">sqlglot.expressions.StarMap</a>&#39;&gt;&gt;, &#39;STARTS_WITH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StartsWith">sqlglot.expressions.StartsWith</a>&#39;&gt;&gt;, &#39;STARTSWITH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StartsWith">sqlglot.expressions.StartsWith</a>&#39;&gt;&gt;, &#39;STDDEV&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stddev">sqlglot.expressions.Stddev</a>&#39;&gt;&gt;, &#39;STDDEV_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StddevPop">sqlglot.expressions.StddevPop</a>&#39;&gt;&gt;, &#39;STDDEV_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StddevSamp">sqlglot.expressions.StddevSamp</a>&#39;&gt;&gt;, &#39;STR_POSITION&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>&#39;&gt;&gt;, &#39;STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;&gt;, &#39;STR_TO_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToMap">sqlglot.expressions.StrToMap</a>&#39;&gt;&gt;, &#39;STR_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>&#39;&gt;&gt;, &#39;STR_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>&#39;&gt;&gt;, &#39;STRING_TO_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;SPLIT_BY_STRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StringToArray">sqlglot.expressions.StringToArray</a>&#39;&gt;&gt;, &#39;STRUCT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;&gt;, &#39;STRUCT_EXTRACT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#StructExtract">sqlglot.expressions.StructExtract</a>&#39;&gt;&gt;, &#39;STUFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stuff">sqlglot.expressions.Stuff</a>&#39;&gt;&gt;, &#39;INSERT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Stuff">sqlglot.expressions.Stuff</a>&#39;&gt;&gt;, &#39;SUBSTRING&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Substring">sqlglot.expressions.Substring</a>&#39;&gt;&gt;, &#39;SUM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Sum">sqlglot.expressions.Sum</a>&#39;&gt;&gt;, &#39;TIME_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeAdd">sqlglot.expressions.TimeAdd</a>&#39;&gt;&gt;, &#39;TIME_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeDiff">sqlglot.expressions.TimeDiff</a>&#39;&gt;&gt;, &#39;TIME_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;TIMEFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>&#39;&gt;&gt;, &#39;TIME_STR_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>&#39;&gt;&gt;, &#39;TIME_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeSub">sqlglot.expressions.TimeSub</a>&#39;&gt;&gt;, &#39;TIME_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>&#39;&gt;&gt;, &#39;TIME_TO_TIME_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TIME_TO_UNIX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;&gt;, &#39;TIME_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeTrunc">sqlglot.expressions.TimeTrunc</a>&#39;&gt;&gt;, &#39;TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>&#39;&gt;&gt;, &#39;TIMESTAMP_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampAdd">sqlglot.expressions.TimestampAdd</a>&#39;&gt;&gt;, &#39;TIMESTAMPDIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;&gt;, &#39;TIMESTAMP_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;&gt;, &#39;TIMESTAMP_FROM_PARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampFromParts">sqlglot.expressions.TimestampFromParts</a>&#39;&gt;&gt;, &#39;TIMESTAMPFROMPARTS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampFromParts">sqlglot.expressions.TimestampFromParts</a>&#39;&gt;&gt;, &#39;TIMESTAMP_SUB&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampSub">sqlglot.expressions.TimestampSub</a>&#39;&gt;&gt;, &#39;TIMESTAMP_TRUNC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimestampTrunc">sqlglot.expressions.TimestampTrunc</a>&#39;&gt;&gt;, &#39;TO_ARRAY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToArray">sqlglot.expressions.ToArray</a>&#39;&gt;&gt;, &#39;TO_BASE64&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToBase64">sqlglot.expressions.ToBase64</a>&#39;&gt;&gt;, &#39;TO_CHAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToChar">sqlglot.expressions.ToChar</a>&#39;&gt;&gt;, &#39;TO_DAYS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToDays">sqlglot.expressions.ToDays</a>&#39;&gt;&gt;, &#39;TO_MAP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>&#39;&gt;&gt;, &#39;TO_NUMBER&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ToNumber">sqlglot.expressions.ToNumber</a>&#39;&gt;&gt;, &#39;TRANSFORM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Transform">sqlglot.expressions.Transform</a>&#39;&gt;&gt;, &#39;TRIM&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Trim">sqlglot.expressions.Trim</a>&#39;&gt;&gt;, &#39;TRY&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Try">sqlglot.expressions.Try</a>&#39;&gt;&gt;, &#39;TRY_CAST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TryCast">sqlglot.expressions.TryCast</a>&#39;&gt;&gt;, &#39;TS_OR_DI_TO_DI&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>&#39;&gt;&gt;, &#39;TS_OR_DS_ADD&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;&gt;, &#39;TS_OR_DS_DIFF&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToDate">sqlglot.expressions.TsOrDsToDate</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_DATE_STR&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TS_OR_DS_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToTime">sqlglot.expressions.TsOrDsToTime</a>&#39;&gt;&gt;, &#39;TS_OR_DS_TO_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TsOrDsToTimestamp">sqlglot.expressions.TsOrDsToTimestamp</a>&#39;&gt;&gt;, &#39;UNHEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Unhex">sqlglot.expressions.Unhex</a>&#39;&gt;&gt;, &#39;UNIX_DATE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixDate">sqlglot.expressions.UnixDate</a>&#39;&gt;&gt;, &#39;UNIX_TO_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>&#39;&gt;&gt;, &#39;UNIX_TO_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;&gt;, &#39;UNIX_TO_TIME_STR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>&#39;&gt;&gt;, &#39;UPPER&#39;: &lt;function build_upper&gt;, &#39;UCASE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Upper">sqlglot.expressions.Upper</a>&#39;&gt;&gt;, &#39;VAR_MAP&#39;: &lt;function build_var_map&gt;, &#39;VARIANCE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VARIANCE_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VAR_SAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Variance">sqlglot.expressions.Variance</a>&#39;&gt;&gt;, &#39;VARIANCE_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;&gt;, &#39;VAR_POP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;&gt;, &#39;WEEK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Week">sqlglot.expressions.Week</a>&#39;&gt;&gt;, &#39;WEEK_OF_YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;&gt;, &#39;WEEKOFYEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;&gt;, &#39;WHEN&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#When">sqlglot.expressions.When</a>&#39;&gt;&gt;, &#39;X_M_L_TABLE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#XMLTable">sqlglot.expressions.XMLTable</a>&#39;&gt;&gt;, &#39;XOR&#39;: &lt;function binary_from_function.&lt;locals&gt;.&lt;lambda&gt;&gt;, &#39;YEAR&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Year">sqlglot.expressions.Year</a>&#39;&gt;&gt;, &#39;GLOB&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_EXTRACT_PATH_TEXT&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;LIKE&#39;: &lt;function build_like&gt;, &#39;LOG2&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;LOG10&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;MOD&#39;: &lt;function build_mod&gt;, &#39;TO_HEX&#39;: &lt;function build_hex&gt;, &#39;ARRAY_REVERSE_SORT&#39;: &lt;function _build_sort_array_desc&gt;, &#39;DATETRUNC&#39;: &lt;function date_trunc_to_time&gt;, &#39;EPOCH&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;&gt;, &#39;EPOCH_MS&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;JSON&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;&gt;, &#39;JSON_EXTRACT_PATH&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;JSON_EXTRACT_STRING&#39;: &lt;function build_extract_json_with_path.&lt;locals&gt;._builder&gt;, &#39;LIST_HAS&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#ArrayContains">sqlglot.expressions.ArrayContains</a>&#39;&gt;&gt;, &#39;LIST_REVERSE_SORT&#39;: &lt;function _build_sort_array_desc&gt;, &#39;LIST_SORT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;&gt;, &#39;LIST_VALUE&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;&gt;, &#39;MAKE_TIME&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#TimeFromParts">sqlglot.expressions.TimeFromParts</a>&#39;&gt;&gt;, &#39;MAKE_TIMESTAMP&#39;: &lt;function _build_make_timestamp&gt;, &#39;MEDIAN&#39;: &lt;function <a href="#DuckDB.Parser">DuckDB.Parser</a>.&lt;lambda&gt;&gt;, &#39;QUANTILE_CONT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;&gt;, &#39;QUANTILE_DISC&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;&gt;, &#39;REGEXP_MATCHES&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;&gt;, &#39;STRFTIME&#39;: &lt;function build_formatted_time.&lt;locals&gt;._builder&gt;, &#39;STRING_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;STRING_SPLIT_REGEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;STRPTIME&#39;: &lt;function build_formatted_time.&lt;locals&gt;._builder&gt;, &#39;STRUCT_PACK&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;&gt;, &#39;STR_SPLIT&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;&gt;, &#39;STR_SPLIT_REGEX&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;&gt;, &#39;TO_TIMESTAMP&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;&gt;, &#39;UNNEST&#39;: &lt;bound method Func.from_arg_list of &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;&gt;, &#39;RANGE&#39;: &lt;function _build_generate_series.&lt;locals&gt;._builder&gt;}</span>
</div>
@@ -2207,7 +2374,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">FUNCTION_PARSERS</span> =
<input id="DuckDB.Parser.FUNCTION_PARSERS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="DuckDB.Parser.FUNCTION_PARSERS-view-value"></label><span class="default_value">{&#39;CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;EXTRACT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_OBJECT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_OBJECTAGG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_TABLE&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;MATCH&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;OPENJSON&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;POSITION&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;PREDICT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SAFE_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;STRING_AGG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SUBSTRING&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRIM&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.Parser.FUNCTION_PARSERS-view-value"></label><span class="default_value">{&#39;CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;EXTRACT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;GAP_FILL&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_OBJECT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_OBJECTAGG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_TABLE&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;MATCH&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;OPENJSON&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;POSITION&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;PREDICT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SAFE_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;STRING_AGG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SUBSTRING&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRIM&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;}</span>
</div>
@@ -2233,7 +2400,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">TABLE_ALIAS_TOKENS</span> =
<input id="DuckDB.Parser.TABLE_ALIAS_TOKENS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="DuckDB.Parser.TABLE_ALIAS_TOKENS-view-value"></label><span class="default_value">{&lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.TRUNCATE: &#39;TRUNCATE&#39;&gt;, &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.IS: &#39;IS&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.TINYBLOB: &#39;TINYBLOB&#39;&gt;, &lt;TokenType.IPV4: &#39;IPV4&#39;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;, &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.BPCHAR: &#39;BPCHAR&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.SEQUENCE: &#39;SEQUENCE&#39;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.SIMPLEAGGREGATEFUNCTION: &#39;SIMPLEAGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.COPY: &#39;COPY&#39;&gt;, &lt;TokenType.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &lt;TokenType.TOP: &#39;TOP&#39;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &lt;TokenType.TDIGEST: &#39;TDIGEST&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.DATE32: &#39;DATE32&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &lt;TokenType.OPERATOR: &#39;OPERATOR&#39;&gt;, &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.STORAGE_INTEGRATION: &#39;STORAGE_INTEGRATION&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.REFRESH: &#39;REFRESH&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &lt;TokenType.OBJECT_IDENTIFIER: &#39;OBJECT_IDENTIFIER&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;TokenType.MODEL: &#39;MODEL&#39;&gt;, &lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.TIMESTAMPNTZ: &#39;TIMESTAMPNTZ&#39;&gt;, &lt;TokenType.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &lt;TokenType.TAG: &#39;TAG&#39;&gt;, &lt;TokenType.WAREHOUSE: &#39;WAREHOUSE&#39;&gt;, &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;, &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.FINAL: &#39;FINAL&#39;&gt;, &lt;TokenType.STREAMLIT: &#39;STREAMLIT&#39;&gt;, &lt;TokenType.END: &#39;END&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &lt;TokenType.AGGREGATEFUNCTION: &#39;AGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &lt;TokenType.TINYTEXT: &#39;TINYTEXT&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.ROLLUP: &#39;ROLLUP&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.NAME: &#39;NAME&#39;&gt;, &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.KILL: &#39;KILL&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &lt;TokenType.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.DICTIONARY: &#39;DICTIONARY&#39;&gt;, &lt;TokenType.IPV6: &#39;IPV6&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.Parser.TABLE_ALIAS_TOKENS-view-value"></label><span class="default_value">{&lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;, &lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &lt;TokenType.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &lt;TokenType.IPV6: &#39;IPV6&#39;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &lt;TokenType.SEQUENCE: &#39;SEQUENCE&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;, &lt;TokenType.MODEL: &#39;MODEL&#39;&gt;, &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &lt;TokenType.OBJECT_IDENTIFIER: &#39;OBJECT_IDENTIFIER&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &lt;TokenType.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;TokenType.DICTIONARY: &#39;DICTIONARY&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.TINYTEXT: &#39;TINYTEXT&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.BPCHAR: &#39;BPCHAR&#39;&gt;, &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.WAREHOUSE: &#39;WAREHOUSE&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &lt;TokenType.TINYBLOB: &#39;TINYBLOB&#39;&gt;, &lt;TokenType.OPERATOR: &#39;OPERATOR&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.TOP: &#39;TOP&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.STORAGE_INTEGRATION: &#39;STORAGE_INTEGRATION&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.AGGREGATEFUNCTION: &#39;AGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.NAME: &#39;NAME&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &lt;TokenType.ROLLUP: &#39;ROLLUP&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.TDIGEST: &#39;TDIGEST&#39;&gt;, &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.SIMPLEAGGREGATEFUNCTION: &#39;SIMPLEAGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.COPY: &#39;COPY&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &lt;TokenType.KILL: &#39;KILL&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.DATE32: &#39;DATE32&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.END: &#39;END&#39;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &lt;TokenType.STREAMLIT: &#39;STREAMLIT&#39;&gt;, &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.TRUNCATE: &#39;TRUNCATE&#39;&gt;, &lt;TokenType.IPV4: &#39;IPV4&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.FINAL: &#39;FINAL&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.REFRESH: &#39;REFRESH&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;TokenType.TAG: &#39;TAG&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.TIMESTAMPNTZ: &#39;TIMESTAMPNTZ&#39;&gt;, &lt;TokenType.IS: &#39;IS&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;}</span>
</div>
@@ -2315,6 +2482,8 @@ Default: 3</li>
<dd id="DuckDB.Parser.TRIM_TYPES" class="variable"><a href="../parser.html#Parser.TRIM_TYPES">TRIM_TYPES</a></dd>
<dd id="DuckDB.Parser.FUNC_TOKENS" class="variable"><a href="../parser.html#Parser.FUNC_TOKENS">FUNC_TOKENS</a></dd>
<dd id="DuckDB.Parser.CONJUNCTION" class="variable"><a href="../parser.html#Parser.CONJUNCTION">CONJUNCTION</a></dd>
+ <dd id="DuckDB.Parser.ASSIGNMENT" class="variable"><a href="../parser.html#Parser.ASSIGNMENT">ASSIGNMENT</a></dd>
+ <dd id="DuckDB.Parser.DISJUNCTION" class="variable"><a href="../parser.html#Parser.DISJUNCTION">DISJUNCTION</a></dd>
<dd id="DuckDB.Parser.EQUALITY" class="variable"><a href="../parser.html#Parser.EQUALITY">EQUALITY</a></dd>
<dd id="DuckDB.Parser.COMPARISON" class="variable"><a href="../parser.html#Parser.COMPARISON">COMPARISON</a></dd>
<dd id="DuckDB.Parser.TERM" class="variable"><a href="../parser.html#Parser.TERM">TERM</a></dd>
@@ -2373,6 +2542,7 @@ Default: 3</li>
<dd id="DuckDB.Parser.NULL_TOKENS" class="variable"><a href="../parser.html#Parser.NULL_TOKENS">NULL_TOKENS</a></dd>
<dd id="DuckDB.Parser.UNNEST_OFFSET_ALIAS_TOKENS" class="variable"><a href="../parser.html#Parser.UNNEST_OFFSET_ALIAS_TOKENS">UNNEST_OFFSET_ALIAS_TOKENS</a></dd>
<dd id="DuckDB.Parser.SELECT_START_TOKENS" class="variable"><a href="../parser.html#Parser.SELECT_START_TOKENS">SELECT_START_TOKENS</a></dd>
+ <dd id="DuckDB.Parser.COPY_INTO_VARLEN_OPTIONS" class="variable"><a href="../parser.html#Parser.COPY_INTO_VARLEN_OPTIONS">COPY_INTO_VARLEN_OPTIONS</a></dd>
<dd id="DuckDB.Parser.STRICT_CAST" class="variable"><a href="../parser.html#Parser.STRICT_CAST">STRICT_CAST</a></dd>
<dd id="DuckDB.Parser.PREFIXED_PIVOT_COLUMNS" class="variable"><a href="../parser.html#Parser.PREFIXED_PIVOT_COLUMNS">PREFIXED_PIVOT_COLUMNS</a></dd>
<dd id="DuckDB.Parser.IDENTIFY_PIVOT_STRINGS" class="variable"><a href="../parser.html#Parser.IDENTIFY_PIVOT_STRINGS">IDENTIFY_PIVOT_STRINGS</a></dd>
@@ -2572,145 +2742,227 @@ Default: 3</li>
</span><span id="DuckDB.Generator-504"><a href="#DuckDB.Generator-504"><span class="linenos">504</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="DuckDB.Generator-505"><a href="#DuckDB.Generator-505"><span class="linenos">505</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
</span><span id="DuckDB.Generator-506"><a href="#DuckDB.Generator-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-507"><a href="#DuckDB.Generator-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-508"><a href="#DuckDB.Generator-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-509"><a href="#DuckDB.Generator-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-510"><a href="#DuckDB.Generator-510"><span class="linenos">510</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Generator-511"><a href="#DuckDB.Generator-511"><span class="linenos">511</span></a>
-</span><span id="DuckDB.Generator-512"><a href="#DuckDB.Generator-512"><span class="linenos">512</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-513"><a href="#DuckDB.Generator-513"><span class="linenos">513</span></a>
-</span><span id="DuckDB.Generator-514"><a href="#DuckDB.Generator-514"><span class="linenos">514</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="DuckDB.Generator-515"><a href="#DuckDB.Generator-515"><span class="linenos">515</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="DuckDB.Generator-516"><a href="#DuckDB.Generator-516"><span class="linenos">516</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Generator-517"><a href="#DuckDB.Generator-517"><span class="linenos">517</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
-</span><span id="DuckDB.Generator-518"><a href="#DuckDB.Generator-518"><span class="linenos">518</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
-</span><span id="DuckDB.Generator-519"><a href="#DuckDB.Generator-519"><span class="linenos">519</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Generator-520"><a href="#DuckDB.Generator-520"><span class="linenos">520</span></a>
-</span><span id="DuckDB.Generator-521"><a href="#DuckDB.Generator-521"><span class="linenos">521</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
-</span><span id="DuckDB.Generator-522"><a href="#DuckDB.Generator-522"><span class="linenos">522</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
-</span><span id="DuckDB.Generator-523"><a href="#DuckDB.Generator-523"><span class="linenos">523</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
-</span><span id="DuckDB.Generator-524"><a href="#DuckDB.Generator-524"><span class="linenos">524</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
-</span><span id="DuckDB.Generator-525"><a href="#DuckDB.Generator-525"><span class="linenos">525</span></a>
-</span><span id="DuckDB.Generator-526"><a href="#DuckDB.Generator-526"><span class="linenos">526</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-527"><a href="#DuckDB.Generator-527"><span class="linenos">527</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-528"><a href="#DuckDB.Generator-528"><span class="linenos">528</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-529"><a href="#DuckDB.Generator-529"><span class="linenos">529</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-530"><a href="#DuckDB.Generator-530"><span class="linenos">530</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-531"><a href="#DuckDB.Generator-531"><span class="linenos">531</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Generator-532"><a href="#DuckDB.Generator-532"><span class="linenos">532</span></a>
-</span><span id="DuckDB.Generator-533"><a href="#DuckDB.Generator-533"><span class="linenos">533</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-534"><a href="#DuckDB.Generator-534"><span class="linenos">534</span></a>
-</span><span id="DuckDB.Generator-535"><a href="#DuckDB.Generator-535"><span class="linenos">535</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-536"><a href="#DuckDB.Generator-536"><span class="linenos">536</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
-</span><span id="DuckDB.Generator-537"><a href="#DuckDB.Generator-537"><span class="linenos">537</span></a>
-</span><span id="DuckDB.Generator-538"><a href="#DuckDB.Generator-538"><span class="linenos">538</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-539"><a href="#DuckDB.Generator-539"><span class="linenos">539</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-540"><a href="#DuckDB.Generator-540"><span class="linenos">540</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-541"><a href="#DuckDB.Generator-541"><span class="linenos">541</span></a>
-</span><span id="DuckDB.Generator-542"><a href="#DuckDB.Generator-542"><span class="linenos">542</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-543"><a href="#DuckDB.Generator-543"><span class="linenos">543</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-544"><a href="#DuckDB.Generator-544"><span class="linenos">544</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-545"><a href="#DuckDB.Generator-545"><span class="linenos">545</span></a>
-</span><span id="DuckDB.Generator-546"><a href="#DuckDB.Generator-546"><span class="linenos">546</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-547"><a href="#DuckDB.Generator-547"><span class="linenos">547</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-548"><a href="#DuckDB.Generator-548"><span class="linenos">548</span></a>
-</span><span id="DuckDB.Generator-549"><a href="#DuckDB.Generator-549"><span class="linenos">549</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-550"><a href="#DuckDB.Generator-550"><span class="linenos">550</span></a>
-</span><span id="DuckDB.Generator-551"><a href="#DuckDB.Generator-551"><span class="linenos">551</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-552"><a href="#DuckDB.Generator-552"><span class="linenos">552</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-553"><a href="#DuckDB.Generator-553"><span class="linenos">553</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-554"><a href="#DuckDB.Generator-554"><span class="linenos">554</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-555"><a href="#DuckDB.Generator-555"><span class="linenos">555</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-556"><a href="#DuckDB.Generator-556"><span class="linenos">556</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-557"><a href="#DuckDB.Generator-557"><span class="linenos">557</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-558"><a href="#DuckDB.Generator-558"><span class="linenos">558</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
-</span><span id="DuckDB.Generator-559"><a href="#DuckDB.Generator-559"><span class="linenos">559</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
-</span><span id="DuckDB.Generator-560"><a href="#DuckDB.Generator-560"><span class="linenos">560</span></a>
-</span><span id="DuckDB.Generator-561"><a href="#DuckDB.Generator-561"><span class="linenos">561</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-562"><a href="#DuckDB.Generator-562"><span class="linenos">562</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-563"><a href="#DuckDB.Generator-563"><span class="linenos">563</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-564"><a href="#DuckDB.Generator-564"><span class="linenos">564</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-565"><a href="#DuckDB.Generator-565"><span class="linenos">565</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
-</span><span id="DuckDB.Generator-566"><a href="#DuckDB.Generator-566"><span class="linenos">566</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
-</span><span id="DuckDB.Generator-567"><a href="#DuckDB.Generator-567"><span class="linenos">567</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Generator-568"><a href="#DuckDB.Generator-568"><span class="linenos">568</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
-</span><span id="DuckDB.Generator-569"><a href="#DuckDB.Generator-569"><span class="linenos">569</span></a>
-</span><span id="DuckDB.Generator-570"><a href="#DuckDB.Generator-570"><span class="linenos">570</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-571"><a href="#DuckDB.Generator-571"><span class="linenos">571</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
-</span><span id="DuckDB.Generator-572"><a href="#DuckDB.Generator-572"><span class="linenos">572</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Generator-573"><a href="#DuckDB.Generator-573"><span class="linenos">573</span></a>
-</span><span id="DuckDB.Generator-574"><a href="#DuckDB.Generator-574"><span class="linenos">574</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-575"><a href="#DuckDB.Generator-575"><span class="linenos">575</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="DuckDB.Generator-576"><a href="#DuckDB.Generator-576"><span class="linenos">576</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
-</span><span id="DuckDB.Generator-577"><a href="#DuckDB.Generator-577"><span class="linenos">577</span></a>
-</span><span id="DuckDB.Generator-578"><a href="#DuckDB.Generator-578"><span class="linenos">578</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-579"><a href="#DuckDB.Generator-579"><span class="linenos">579</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB.Generator-580"><a href="#DuckDB.Generator-580"><span class="linenos">580</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-581"><a href="#DuckDB.Generator-581"><span class="linenos">581</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB.Generator-582"><a href="#DuckDB.Generator-582"><span class="linenos">582</span></a>
-</span><span id="DuckDB.Generator-583"><a href="#DuckDB.Generator-583"><span class="linenos">583</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-584"><a href="#DuckDB.Generator-584"><span class="linenos">584</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="DuckDB.Generator-585"><a href="#DuckDB.Generator-585"><span class="linenos">585</span></a>
-</span><span id="DuckDB.Generator-586"><a href="#DuckDB.Generator-586"><span class="linenos">586</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-587"><a href="#DuckDB.Generator-587"><span class="linenos">587</span></a>
-</span><span id="DuckDB.Generator-588"><a href="#DuckDB.Generator-588"><span class="linenos">588</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-589"><a href="#DuckDB.Generator-589"><span class="linenos">589</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-590"><a href="#DuckDB.Generator-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-591"><a href="#DuckDB.Generator-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-592"><a href="#DuckDB.Generator-592"><span class="linenos">592</span></a>
-</span><span id="DuckDB.Generator-593"><a href="#DuckDB.Generator-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-594"><a href="#DuckDB.Generator-594"><span class="linenos">594</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB.Generator-595"><a href="#DuckDB.Generator-595"><span class="linenos">595</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
-</span><span id="DuckDB.Generator-596"><a href="#DuckDB.Generator-596"><span class="linenos">596</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-597"><a href="#DuckDB.Generator-597"><span class="linenos">597</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-598"><a href="#DuckDB.Generator-598"><span class="linenos">598</span></a> <span class="p">):</span>
-</span><span id="DuckDB.Generator-599"><a href="#DuckDB.Generator-599"><span class="linenos">599</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB.Generator-600"><a href="#DuckDB.Generator-600"><span class="linenos">600</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
-</span><span id="DuckDB.Generator-601"><a href="#DuckDB.Generator-601"><span class="linenos">601</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="DuckDB.Generator-507"><a href="#DuckDB.Generator-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMPNTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-508"><a href="#DuckDB.Generator-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-509"><a href="#DuckDB.Generator-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-510"><a href="#DuckDB.Generator-510"><span class="linenos">510</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-511"><a href="#DuckDB.Generator-511"><span class="linenos">511</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Generator-512"><a href="#DuckDB.Generator-512"><span class="linenos">512</span></a>
+</span><span id="DuckDB.Generator-513"><a href="#DuckDB.Generator-513"><span class="linenos">513</span></a> <span class="c1"># https://github.com/duckdb/duckdb/blob/ff7f24fd8e3128d94371827523dae85ebaf58713/third_party/libpg_query/grammar/keywords/reserved_keywords.list#L1-L77</span>
+</span><span id="DuckDB.Generator-514"><a href="#DuckDB.Generator-514"><span class="linenos">514</span></a> <span class="n">RESERVED_KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Generator-515"><a href="#DuckDB.Generator-515"><span class="linenos">515</span></a> <span class="s2">&quot;array&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-516"><a href="#DuckDB.Generator-516"><span class="linenos">516</span></a> <span class="s2">&quot;analyse&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-517"><a href="#DuckDB.Generator-517"><span class="linenos">517</span></a> <span class="s2">&quot;union&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-518"><a href="#DuckDB.Generator-518"><span class="linenos">518</span></a> <span class="s2">&quot;all&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-519"><a href="#DuckDB.Generator-519"><span class="linenos">519</span></a> <span class="s2">&quot;when&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-520"><a href="#DuckDB.Generator-520"><span class="linenos">520</span></a> <span class="s2">&quot;in_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-521"><a href="#DuckDB.Generator-521"><span class="linenos">521</span></a> <span class="s2">&quot;default&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-522"><a href="#DuckDB.Generator-522"><span class="linenos">522</span></a> <span class="s2">&quot;create_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-523"><a href="#DuckDB.Generator-523"><span class="linenos">523</span></a> <span class="s2">&quot;window&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-524"><a href="#DuckDB.Generator-524"><span class="linenos">524</span></a> <span class="s2">&quot;asymmetric&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-525"><a href="#DuckDB.Generator-525"><span class="linenos">525</span></a> <span class="s2">&quot;to&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-526"><a href="#DuckDB.Generator-526"><span class="linenos">526</span></a> <span class="s2">&quot;else&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-527"><a href="#DuckDB.Generator-527"><span class="linenos">527</span></a> <span class="s2">&quot;localtime&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-528"><a href="#DuckDB.Generator-528"><span class="linenos">528</span></a> <span class="s2">&quot;from&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-529"><a href="#DuckDB.Generator-529"><span class="linenos">529</span></a> <span class="s2">&quot;end_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-530"><a href="#DuckDB.Generator-530"><span class="linenos">530</span></a> <span class="s2">&quot;select&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-531"><a href="#DuckDB.Generator-531"><span class="linenos">531</span></a> <span class="s2">&quot;current_date&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-532"><a href="#DuckDB.Generator-532"><span class="linenos">532</span></a> <span class="s2">&quot;foreign&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-533"><a href="#DuckDB.Generator-533"><span class="linenos">533</span></a> <span class="s2">&quot;with&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-534"><a href="#DuckDB.Generator-534"><span class="linenos">534</span></a> <span class="s2">&quot;grant&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-535"><a href="#DuckDB.Generator-535"><span class="linenos">535</span></a> <span class="s2">&quot;session_user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-536"><a href="#DuckDB.Generator-536"><span class="linenos">536</span></a> <span class="s2">&quot;or&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-537"><a href="#DuckDB.Generator-537"><span class="linenos">537</span></a> <span class="s2">&quot;except&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-538"><a href="#DuckDB.Generator-538"><span class="linenos">538</span></a> <span class="s2">&quot;references&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-539"><a href="#DuckDB.Generator-539"><span class="linenos">539</span></a> <span class="s2">&quot;fetch&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-540"><a href="#DuckDB.Generator-540"><span class="linenos">540</span></a> <span class="s2">&quot;limit&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-541"><a href="#DuckDB.Generator-541"><span class="linenos">541</span></a> <span class="s2">&quot;group_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-542"><a href="#DuckDB.Generator-542"><span class="linenos">542</span></a> <span class="s2">&quot;leading&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-543"><a href="#DuckDB.Generator-543"><span class="linenos">543</span></a> <span class="s2">&quot;into&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-544"><a href="#DuckDB.Generator-544"><span class="linenos">544</span></a> <span class="s2">&quot;collate&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-545"><a href="#DuckDB.Generator-545"><span class="linenos">545</span></a> <span class="s2">&quot;offset&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-546"><a href="#DuckDB.Generator-546"><span class="linenos">546</span></a> <span class="s2">&quot;do&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-547"><a href="#DuckDB.Generator-547"><span class="linenos">547</span></a> <span class="s2">&quot;then&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-548"><a href="#DuckDB.Generator-548"><span class="linenos">548</span></a> <span class="s2">&quot;localtimestamp&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-549"><a href="#DuckDB.Generator-549"><span class="linenos">549</span></a> <span class="s2">&quot;check_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-550"><a href="#DuckDB.Generator-550"><span class="linenos">550</span></a> <span class="s2">&quot;lateral_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-551"><a href="#DuckDB.Generator-551"><span class="linenos">551</span></a> <span class="s2">&quot;current_role&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-552"><a href="#DuckDB.Generator-552"><span class="linenos">552</span></a> <span class="s2">&quot;where&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-553"><a href="#DuckDB.Generator-553"><span class="linenos">553</span></a> <span class="s2">&quot;asc_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-554"><a href="#DuckDB.Generator-554"><span class="linenos">554</span></a> <span class="s2">&quot;placing&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-555"><a href="#DuckDB.Generator-555"><span class="linenos">555</span></a> <span class="s2">&quot;desc_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-556"><a href="#DuckDB.Generator-556"><span class="linenos">556</span></a> <span class="s2">&quot;user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-557"><a href="#DuckDB.Generator-557"><span class="linenos">557</span></a> <span class="s2">&quot;unique&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-558"><a href="#DuckDB.Generator-558"><span class="linenos">558</span></a> <span class="s2">&quot;initially&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-559"><a href="#DuckDB.Generator-559"><span class="linenos">559</span></a> <span class="s2">&quot;column&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-560"><a href="#DuckDB.Generator-560"><span class="linenos">560</span></a> <span class="s2">&quot;both&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-561"><a href="#DuckDB.Generator-561"><span class="linenos">561</span></a> <span class="s2">&quot;some&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-562"><a href="#DuckDB.Generator-562"><span class="linenos">562</span></a> <span class="s2">&quot;as&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-563"><a href="#DuckDB.Generator-563"><span class="linenos">563</span></a> <span class="s2">&quot;any&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-564"><a href="#DuckDB.Generator-564"><span class="linenos">564</span></a> <span class="s2">&quot;only&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-565"><a href="#DuckDB.Generator-565"><span class="linenos">565</span></a> <span class="s2">&quot;deferrable&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-566"><a href="#DuckDB.Generator-566"><span class="linenos">566</span></a> <span class="s2">&quot;null_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-567"><a href="#DuckDB.Generator-567"><span class="linenos">567</span></a> <span class="s2">&quot;current_time&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-568"><a href="#DuckDB.Generator-568"><span class="linenos">568</span></a> <span class="s2">&quot;true_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-569"><a href="#DuckDB.Generator-569"><span class="linenos">569</span></a> <span class="s2">&quot;table&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-570"><a href="#DuckDB.Generator-570"><span class="linenos">570</span></a> <span class="s2">&quot;case&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-571"><a href="#DuckDB.Generator-571"><span class="linenos">571</span></a> <span class="s2">&quot;trailing&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-572"><a href="#DuckDB.Generator-572"><span class="linenos">572</span></a> <span class="s2">&quot;variadic&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-573"><a href="#DuckDB.Generator-573"><span class="linenos">573</span></a> <span class="s2">&quot;for&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-574"><a href="#DuckDB.Generator-574"><span class="linenos">574</span></a> <span class="s2">&quot;on&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-575"><a href="#DuckDB.Generator-575"><span class="linenos">575</span></a> <span class="s2">&quot;distinct&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-576"><a href="#DuckDB.Generator-576"><span class="linenos">576</span></a> <span class="s2">&quot;false_p&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-577"><a href="#DuckDB.Generator-577"><span class="linenos">577</span></a> <span class="s2">&quot;not&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-578"><a href="#DuckDB.Generator-578"><span class="linenos">578</span></a> <span class="s2">&quot;constraint&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-579"><a href="#DuckDB.Generator-579"><span class="linenos">579</span></a> <span class="s2">&quot;current_timestamp&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-580"><a href="#DuckDB.Generator-580"><span class="linenos">580</span></a> <span class="s2">&quot;returning&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-581"><a href="#DuckDB.Generator-581"><span class="linenos">581</span></a> <span class="s2">&quot;primary&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-582"><a href="#DuckDB.Generator-582"><span class="linenos">582</span></a> <span class="s2">&quot;intersect&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-583"><a href="#DuckDB.Generator-583"><span class="linenos">583</span></a> <span class="s2">&quot;having&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-584"><a href="#DuckDB.Generator-584"><span class="linenos">584</span></a> <span class="s2">&quot;analyze&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-585"><a href="#DuckDB.Generator-585"><span class="linenos">585</span></a> <span class="s2">&quot;current_user&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-586"><a href="#DuckDB.Generator-586"><span class="linenos">586</span></a> <span class="s2">&quot;and&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-587"><a href="#DuckDB.Generator-587"><span class="linenos">587</span></a> <span class="s2">&quot;cast&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-588"><a href="#DuckDB.Generator-588"><span class="linenos">588</span></a> <span class="s2">&quot;symmetric&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-589"><a href="#DuckDB.Generator-589"><span class="linenos">589</span></a> <span class="s2">&quot;using&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-590"><a href="#DuckDB.Generator-590"><span class="linenos">590</span></a> <span class="s2">&quot;order&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-591"><a href="#DuckDB.Generator-591"><span class="linenos">591</span></a> <span class="s2">&quot;current_catalog&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-592"><a href="#DuckDB.Generator-592"><span class="linenos">592</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Generator-593"><a href="#DuckDB.Generator-593"><span class="linenos">593</span></a>
+</span><span id="DuckDB.Generator-594"><a href="#DuckDB.Generator-594"><span class="linenos">594</span></a> <span class="n">UNWRAPPED_INTERVAL_VALUES</span> <span class="o">=</span> <span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Paren</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-595"><a href="#DuckDB.Generator-595"><span class="linenos">595</span></a>
+</span><span id="DuckDB.Generator-596"><a href="#DuckDB.Generator-596"><span class="linenos">596</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="DuckDB.Generator-597"><a href="#DuckDB.Generator-597"><span class="linenos">597</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="DuckDB.Generator-598"><a href="#DuckDB.Generator-598"><span class="linenos">598</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Generator-599"><a href="#DuckDB.Generator-599"><span class="linenos">599</span></a> <span class="n">prop</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">UNSUPPORTED</span>
+</span><span id="DuckDB.Generator-600"><a href="#DuckDB.Generator-600"><span class="linenos">600</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">PROPERTIES_LOCATION</span>
+</span><span id="DuckDB.Generator-601"><a href="#DuckDB.Generator-601"><span class="linenos">601</span></a> <span class="p">}</span>
</span><span id="DuckDB.Generator-602"><a href="#DuckDB.Generator-602"><span class="linenos">602</span></a>
-</span><span id="DuckDB.Generator-603"><a href="#DuckDB.Generator-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-604"><a href="#DuckDB.Generator-604"><span class="linenos">604</span></a>
-</span><span id="DuckDB.Generator-605"><a href="#DuckDB.Generator-605"><span class="linenos">605</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-606"><a href="#DuckDB.Generator-606"><span class="linenos">606</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="DuckDB.Generator-607"><a href="#DuckDB.Generator-607"><span class="linenos">607</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-608"><a href="#DuckDB.Generator-608"><span class="linenos">608</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-609"><a href="#DuckDB.Generator-609"><span class="linenos">609</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-610"><a href="#DuckDB.Generator-610"><span class="linenos">610</span></a>
-</span><span id="DuckDB.Generator-611"><a href="#DuckDB.Generator-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-612"><a href="#DuckDB.Generator-612"><span class="linenos">612</span></a>
-</span><span id="DuckDB.Generator-613"><a href="#DuckDB.Generator-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-614"><a href="#DuckDB.Generator-614"><span class="linenos">614</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator-615"><a href="#DuckDB.Generator-615"><span class="linenos">615</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-616"><a href="#DuckDB.Generator-616"><span class="linenos">616</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
-</span><span id="DuckDB.Generator-617"><a href="#DuckDB.Generator-617"><span class="linenos">617</span></a>
-</span><span id="DuckDB.Generator-618"><a href="#DuckDB.Generator-618"><span class="linenos">618</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-603"><a href="#DuckDB.Generator-603"><span class="linenos">603</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="DuckDB.Generator-604"><a href="#DuckDB.Generator-604"><span class="linenos">604</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="DuckDB.Generator-605"><a href="#DuckDB.Generator-605"><span class="linenos">605</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">LikeProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_SCHEMA</span>
+</span><span id="DuckDB.Generator-606"><a href="#DuckDB.Generator-606"><span class="linenos">606</span></a> <span class="n">PROPERTIES_LOCATION</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">TemporaryProperty</span><span class="p">]</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="o">.</span><span class="n">Location</span><span class="o">.</span><span class="n">POST_CREATE</span>
+</span><span id="DuckDB.Generator-607"><a href="#DuckDB.Generator-607"><span class="linenos">607</span></a>
+</span><span id="DuckDB.Generator-608"><a href="#DuckDB.Generator-608"><span class="linenos">608</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-609"><a href="#DuckDB.Generator-609"><span class="linenos">609</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-610"><a href="#DuckDB.Generator-610"><span class="linenos">610</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-611"><a href="#DuckDB.Generator-611"><span class="linenos">611</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-612"><a href="#DuckDB.Generator-612"><span class="linenos">612</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-613"><a href="#DuckDB.Generator-613"><span class="linenos">613</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-614"><a href="#DuckDB.Generator-614"><span class="linenos">614</span></a>
+</span><span id="DuckDB.Generator-615"><a href="#DuckDB.Generator-615"><span class="linenos">615</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-616"><a href="#DuckDB.Generator-616"><span class="linenos">616</span></a>
+</span><span id="DuckDB.Generator-617"><a href="#DuckDB.Generator-617"><span class="linenos">617</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-618"><a href="#DuckDB.Generator-618"><span class="linenos">618</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
</span><span id="DuckDB.Generator-619"><a href="#DuckDB.Generator-619"><span class="linenos">619</span></a>
-</span><span id="DuckDB.Generator-620"><a href="#DuckDB.Generator-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-621"><a href="#DuckDB.Generator-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-622"><a href="#DuckDB.Generator-622"><span class="linenos">622</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="DuckDB.Generator-620"><a href="#DuckDB.Generator-620"><span class="linenos">620</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-621"><a href="#DuckDB.Generator-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-622"><a href="#DuckDB.Generator-622"><span class="linenos">622</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
</span><span id="DuckDB.Generator-623"><a href="#DuckDB.Generator-623"><span class="linenos">623</span></a>
-</span><span id="DuckDB.Generator-624"><a href="#DuckDB.Generator-624"><span class="linenos">624</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-625"><a href="#DuckDB.Generator-625"><span class="linenos">625</span></a>
-</span><span id="DuckDB.Generator-626"><a href="#DuckDB.Generator-626"><span class="linenos">626</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-627"><a href="#DuckDB.Generator-627"><span class="linenos">627</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
-</span><span id="DuckDB.Generator-628"><a href="#DuckDB.Generator-628"><span class="linenos">628</span></a>
-</span><span id="DuckDB.Generator-629"><a href="#DuckDB.Generator-629"><span class="linenos">629</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Generator-624"><a href="#DuckDB.Generator-624"><span class="linenos">624</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-625"><a href="#DuckDB.Generator-625"><span class="linenos">625</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-626"><a href="#DuckDB.Generator-626"><span class="linenos">626</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-627"><a href="#DuckDB.Generator-627"><span class="linenos">627</span></a>
+</span><span id="DuckDB.Generator-628"><a href="#DuckDB.Generator-628"><span class="linenos">628</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-629"><a href="#DuckDB.Generator-629"><span class="linenos">629</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
</span><span id="DuckDB.Generator-630"><a href="#DuckDB.Generator-630"><span class="linenos">630</span></a>
-</span><span id="DuckDB.Generator-631"><a href="#DuckDB.Generator-631"><span class="linenos">631</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-632"><a href="#DuckDB.Generator-632"><span class="linenos">632</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-633"><a href="#DuckDB.Generator-633"><span class="linenos">633</span></a>
-</span><span id="DuckDB.Generator-634"><a href="#DuckDB.Generator-634"><span class="linenos">634</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator-635"><a href="#DuckDB.Generator-635"><span class="linenos">635</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-636"><a href="#DuckDB.Generator-636"><span class="linenos">636</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
-</span><span id="DuckDB.Generator-637"><a href="#DuckDB.Generator-637"><span class="linenos">637</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
-</span><span id="DuckDB.Generator-638"><a href="#DuckDB.Generator-638"><span class="linenos">638</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-639"><a href="#DuckDB.Generator-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-640"><a href="#DuckDB.Generator-640"><span class="linenos">640</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-641"><a href="#DuckDB.Generator-641"><span class="linenos">641</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-631"><a href="#DuckDB.Generator-631"><span class="linenos">631</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-632"><a href="#DuckDB.Generator-632"><span class="linenos">632</span></a>
+</span><span id="DuckDB.Generator-633"><a href="#DuckDB.Generator-633"><span class="linenos">633</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-634"><a href="#DuckDB.Generator-634"><span class="linenos">634</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-635"><a href="#DuckDB.Generator-635"><span class="linenos">635</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-636"><a href="#DuckDB.Generator-636"><span class="linenos">636</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-637"><a href="#DuckDB.Generator-637"><span class="linenos">637</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-638"><a href="#DuckDB.Generator-638"><span class="linenos">638</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-639"><a href="#DuckDB.Generator-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-640"><a href="#DuckDB.Generator-640"><span class="linenos">640</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="DuckDB.Generator-641"><a href="#DuckDB.Generator-641"><span class="linenos">641</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
</span><span id="DuckDB.Generator-642"><a href="#DuckDB.Generator-642"><span class="linenos">642</span></a>
-</span><span id="DuckDB.Generator-643"><a href="#DuckDB.Generator-643"><span class="linenos">643</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-644"><a href="#DuckDB.Generator-644"><span class="linenos">644</span></a>
-</span><span id="DuckDB.Generator-645"><a href="#DuckDB.Generator-645"><span class="linenos">645</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="DuckDB.Generator-643"><a href="#DuckDB.Generator-643"><span class="linenos">643</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-644"><a href="#DuckDB.Generator-644"><span class="linenos">644</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-645"><a href="#DuckDB.Generator-645"><span class="linenos">645</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-646"><a href="#DuckDB.Generator-646"><span class="linenos">646</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-647"><a href="#DuckDB.Generator-647"><span class="linenos">647</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
+</span><span id="DuckDB.Generator-648"><a href="#DuckDB.Generator-648"><span class="linenos">648</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
+</span><span id="DuckDB.Generator-649"><a href="#DuckDB.Generator-649"><span class="linenos">649</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-650"><a href="#DuckDB.Generator-650"><span class="linenos">650</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
+</span><span id="DuckDB.Generator-651"><a href="#DuckDB.Generator-651"><span class="linenos">651</span></a>
+</span><span id="DuckDB.Generator-652"><a href="#DuckDB.Generator-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-653"><a href="#DuckDB.Generator-653"><span class="linenos">653</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
+</span><span id="DuckDB.Generator-654"><a href="#DuckDB.Generator-654"><span class="linenos">654</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-655"><a href="#DuckDB.Generator-655"><span class="linenos">655</span></a>
+</span><span id="DuckDB.Generator-656"><a href="#DuckDB.Generator-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-657"><a href="#DuckDB.Generator-657"><span class="linenos">657</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="DuckDB.Generator-658"><a href="#DuckDB.Generator-658"><span class="linenos">658</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
+</span><span id="DuckDB.Generator-659"><a href="#DuckDB.Generator-659"><span class="linenos">659</span></a>
+</span><span id="DuckDB.Generator-660"><a href="#DuckDB.Generator-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-661"><a href="#DuckDB.Generator-661"><span class="linenos">661</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="DuckDB.Generator-662"><a href="#DuckDB.Generator-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-663"><a href="#DuckDB.Generator-663"><span class="linenos">663</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
+</span><span id="DuckDB.Generator-664"><a href="#DuckDB.Generator-664"><span class="linenos">664</span></a>
+</span><span id="DuckDB.Generator-665"><a href="#DuckDB.Generator-665"><span class="linenos">665</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-666"><a href="#DuckDB.Generator-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="DuckDB.Generator-667"><a href="#DuckDB.Generator-667"><span class="linenos">667</span></a>
+</span><span id="DuckDB.Generator-668"><a href="#DuckDB.Generator-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-669"><a href="#DuckDB.Generator-669"><span class="linenos">669</span></a>
+</span><span id="DuckDB.Generator-670"><a href="#DuckDB.Generator-670"><span class="linenos">670</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-671"><a href="#DuckDB.Generator-671"><span class="linenos">671</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-672"><a href="#DuckDB.Generator-672"><span class="linenos">672</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-673"><a href="#DuckDB.Generator-673"><span class="linenos">673</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-674"><a href="#DuckDB.Generator-674"><span class="linenos">674</span></a>
+</span><span id="DuckDB.Generator-675"><a href="#DuckDB.Generator-675"><span class="linenos">675</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-676"><a href="#DuckDB.Generator-676"><span class="linenos">676</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB.Generator-677"><a href="#DuckDB.Generator-677"><span class="linenos">677</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
+</span><span id="DuckDB.Generator-678"><a href="#DuckDB.Generator-678"><span class="linenos">678</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-679"><a href="#DuckDB.Generator-679"><span class="linenos">679</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-680"><a href="#DuckDB.Generator-680"><span class="linenos">680</span></a> <span class="p">):</span>
+</span><span id="DuckDB.Generator-681"><a href="#DuckDB.Generator-681"><span class="linenos">681</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB.Generator-682"><a href="#DuckDB.Generator-682"><span class="linenos">682</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
+</span><span id="DuckDB.Generator-683"><a href="#DuckDB.Generator-683"><span class="linenos">683</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="DuckDB.Generator-684"><a href="#DuckDB.Generator-684"><span class="linenos">684</span></a>
+</span><span id="DuckDB.Generator-685"><a href="#DuckDB.Generator-685"><span class="linenos">685</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-686"><a href="#DuckDB.Generator-686"><span class="linenos">686</span></a>
+</span><span id="DuckDB.Generator-687"><a href="#DuckDB.Generator-687"><span class="linenos">687</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-688"><a href="#DuckDB.Generator-688"><span class="linenos">688</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="DuckDB.Generator-689"><a href="#DuckDB.Generator-689"><span class="linenos">689</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-690"><a href="#DuckDB.Generator-690"><span class="linenos">690</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-691"><a href="#DuckDB.Generator-691"><span class="linenos">691</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-692"><a href="#DuckDB.Generator-692"><span class="linenos">692</span></a>
+</span><span id="DuckDB.Generator-693"><a href="#DuckDB.Generator-693"><span class="linenos">693</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-694"><a href="#DuckDB.Generator-694"><span class="linenos">694</span></a>
+</span><span id="DuckDB.Generator-695"><a href="#DuckDB.Generator-695"><span class="linenos">695</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-696"><a href="#DuckDB.Generator-696"><span class="linenos">696</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator-697"><a href="#DuckDB.Generator-697"><span class="linenos">697</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-698"><a href="#DuckDB.Generator-698"><span class="linenos">698</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
+</span><span id="DuckDB.Generator-699"><a href="#DuckDB.Generator-699"><span class="linenos">699</span></a>
+</span><span id="DuckDB.Generator-700"><a href="#DuckDB.Generator-700"><span class="linenos">700</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-701"><a href="#DuckDB.Generator-701"><span class="linenos">701</span></a>
+</span><span id="DuckDB.Generator-702"><a href="#DuckDB.Generator-702"><span class="linenos">702</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-703"><a href="#DuckDB.Generator-703"><span class="linenos">703</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-704"><a href="#DuckDB.Generator-704"><span class="linenos">704</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="DuckDB.Generator-705"><a href="#DuckDB.Generator-705"><span class="linenos">705</span></a>
+</span><span id="DuckDB.Generator-706"><a href="#DuckDB.Generator-706"><span class="linenos">706</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-707"><a href="#DuckDB.Generator-707"><span class="linenos">707</span></a>
+</span><span id="DuckDB.Generator-708"><a href="#DuckDB.Generator-708"><span class="linenos">708</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-709"><a href="#DuckDB.Generator-709"><span class="linenos">709</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
+</span><span id="DuckDB.Generator-710"><a href="#DuckDB.Generator-710"><span class="linenos">710</span></a>
+</span><span id="DuckDB.Generator-711"><a href="#DuckDB.Generator-711"><span class="linenos">711</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Generator-712"><a href="#DuckDB.Generator-712"><span class="linenos">712</span></a>
+</span><span id="DuckDB.Generator-713"><a href="#DuckDB.Generator-713"><span class="linenos">713</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-714"><a href="#DuckDB.Generator-714"><span class="linenos">714</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-715"><a href="#DuckDB.Generator-715"><span class="linenos">715</span></a>
+</span><span id="DuckDB.Generator-716"><a href="#DuckDB.Generator-716"><span class="linenos">716</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator-717"><a href="#DuckDB.Generator-717"><span class="linenos">717</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-718"><a href="#DuckDB.Generator-718"><span class="linenos">718</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="DuckDB.Generator-719"><a href="#DuckDB.Generator-719"><span class="linenos">719</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB.Generator-720"><a href="#DuckDB.Generator-720"><span class="linenos">720</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-721"><a href="#DuckDB.Generator-721"><span class="linenos">721</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-722"><a href="#DuckDB.Generator-722"><span class="linenos">722</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-723"><a href="#DuckDB.Generator-723"><span class="linenos">723</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-724"><a href="#DuckDB.Generator-724"><span class="linenos">724</span></a>
+</span><span id="DuckDB.Generator-725"><a href="#DuckDB.Generator-725"><span class="linenos">725</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-726"><a href="#DuckDB.Generator-726"><span class="linenos">726</span></a>
+</span><span id="DuckDB.Generator-727"><a href="#DuckDB.Generator-727"><span class="linenos">727</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -3036,7 +3288,7 @@ Default: True</li>
<div class="attr variable">
<span class="name">SUPPORTED_JSON_PATH_PARTS</span> =
<input id="DuckDB.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="DuckDB.Generator.SUPPORTED_JSON_PATH_PARTS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.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#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;}</span>
</div>
@@ -3049,7 +3301,7 @@ Default: True</li>
<div class="attr variable">
<span class="name">TYPE_MAPPING</span> =
<input id="DuckDB.Generator.TYPE_MAPPING-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="DuckDB.Generator.TYPE_MAPPING-view-value"></label><span class="default_value">{&lt;Type.NCHAR: &#39;NCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.LONGTEXT: &#39;LONGTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.TINYTEXT: &#39;TINYTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.LONGBLOB: &#39;LONGBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.TINYBLOB: &#39;TINYBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.INET: &#39;INET&#39;&gt;: &#39;INET&#39;, &lt;Type.ROWVERSION: &#39;ROWVERSION&#39;&gt;: &#39;BLOB&#39;, &lt;Type.BINARY: &#39;BINARY&#39;&gt;: &#39;BLOB&#39;, &lt;Type.CHAR: &#39;CHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;: &#39;REAL&#39;, &lt;Type.UINT: &#39;UINT&#39;&gt;: &#39;UINTEGER&#39;, &lt;Type.VARBINARY: &#39;VARBINARY&#39;&gt;: &#39;BLOB&#39;, &lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;: &#39;TIMESTAMP_S&#39;, &lt;Type.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;: &#39;TIMESTAMP_MS&#39;, &lt;Type.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;: &#39;TIMESTAMP_NS&#39;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.Generator.TYPE_MAPPING-view-value"></label><span class="default_value">{&lt;Type.NCHAR: &#39;NCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.NVARCHAR: &#39;NVARCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.LONGTEXT: &#39;LONGTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.TINYTEXT: &#39;TINYTEXT&#39;&gt;: &#39;TEXT&#39;, &lt;Type.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.LONGBLOB: &#39;LONGBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.TINYBLOB: &#39;TINYBLOB&#39;&gt;: &#39;BLOB&#39;, &lt;Type.INET: &#39;INET&#39;&gt;: &#39;INET&#39;, &lt;Type.ROWVERSION: &#39;ROWVERSION&#39;&gt;: &#39;BLOB&#39;, &lt;Type.BINARY: &#39;BINARY&#39;&gt;: &#39;BLOB&#39;, &lt;Type.CHAR: &#39;CHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.FLOAT: &#39;FLOAT&#39;&gt;: &#39;REAL&#39;, &lt;Type.UINT: &#39;UINT&#39;&gt;: &#39;UINTEGER&#39;, &lt;Type.VARBINARY: &#39;VARBINARY&#39;&gt;: &#39;BLOB&#39;, &lt;Type.VARCHAR: &#39;VARCHAR&#39;&gt;: &#39;TEXT&#39;, &lt;Type.TIMESTAMPNTZ: &#39;TIMESTAMPNTZ&#39;&gt;: &#39;TIMESTAMP&#39;, &lt;Type.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;: &#39;TIMESTAMP_S&#39;, &lt;Type.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;: &#39;TIMESTAMP_MS&#39;, &lt;Type.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;: &#39;TIMESTAMP_NS&#39;}</span>
</div>
@@ -3058,6 +3310,19 @@ Default: True</li>
</div>
+ <div id="DuckDB.Generator.RESERVED_KEYWORDS" class="classattr">
+ <div class="attr variable">
+ <span class="name">RESERVED_KEYWORDS</span> =
+<input id="DuckDB.Generator.RESERVED_KEYWORDS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+ <label class="view-value-button pdoc-button" for="DuckDB.Generator.RESERVED_KEYWORDS-view-value"></label><span class="default_value">{&#39;returning&#39;, &#39;lateral_p&#39;, &#39;current_user&#39;, &#39;check_p&#39;, &#39;offset&#39;, &#39;asc_p&#39;, &#39;case&#39;, &#39;distinct&#39;, &#39;fetch&#39;, &#39;then&#39;, &#39;false_p&#39;, &#39;when&#39;, &#39;select&#39;, &#39;to&#39;, &#39;analyse&#39;, &#39;into&#39;, &#39;create_p&#39;, &#39;from&#39;, &#39;using&#39;, &#39;primary&#39;, &#39;table&#39;, &#39;true_p&#39;, &#39;all&#39;, &#39;with&#39;, &#39;window&#39;, &#39;foreign&#39;, &#39;placing&#39;, &#39;collate&#39;, &#39;trailing&#39;, &#39;constraint&#39;, &#39;leading&#39;, &#39;on&#39;, &#39;default&#39;, &#39;grant&#39;, &#39;localtimestamp&#39;, &#39;deferrable&#39;, &#39;analyze&#39;, &#39;column&#39;, &#39;symmetric&#39;, &#39;current_timestamp&#39;, &#39;initially&#39;, &#39;current_role&#39;, &#39;end_p&#39;, &#39;else&#39;, &#39;unique&#39;, &#39;order&#39;, &#39;only&#39;, &#39;as&#39;, &#39;not&#39;, &#39;union&#39;, &#39;cast&#39;, &#39;do&#39;, &#39;group_p&#39;, &#39;any&#39;, &#39;references&#39;, &#39;user&#39;, &#39;session_user&#39;, &#39;intersect&#39;, &#39;and&#39;, &#39;array&#39;, &#39;both&#39;, &#39;in_p&#39;, &#39;current_date&#39;, &#39;null_p&#39;, &#39;or&#39;, &#39;for&#39;, &#39;variadic&#39;, &#39;current_time&#39;, &#39;where&#39;, &#39;limit&#39;, &#39;having&#39;, &#39;except&#39;, &#39;desc_p&#39;, &#39;asymmetric&#39;, &#39;some&#39;, &#39;localtime&#39;, &#39;current_catalog&#39;}</span>
+
+
+ </div>
+ <a class="headerlink" href="#DuckDB.Generator.RESERVED_KEYWORDS"></a>
+
+
+
+ </div>
<div id="DuckDB.Generator.UNWRAPPED_INTERVAL_VALUES" class="classattr">
<div class="attr variable">
<span class="name">UNWRAPPED_INTERVAL_VALUES</span> =
@@ -3094,14 +3359,14 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.timefromparts_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timefromparts_sql-526"><a href="#DuckDB.Generator.timefromparts_sql-526"><span class="linenos">526</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-527"><a href="#DuckDB.Generator.timefromparts_sql-527"><span class="linenos">527</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-528"><a href="#DuckDB.Generator.timefromparts_sql-528"><span class="linenos">528</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-529"><a href="#DuckDB.Generator.timefromparts_sql-529"><span class="linenos">529</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-530"><a href="#DuckDB.Generator.timefromparts_sql-530"><span class="linenos">530</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-531"><a href="#DuckDB.Generator.timefromparts_sql-531"><span class="linenos">531</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Generator.timefromparts_sql-532"><a href="#DuckDB.Generator.timefromparts_sql-532"><span class="linenos">532</span></a>
-</span><span id="DuckDB.Generator.timefromparts_sql-533"><a href="#DuckDB.Generator.timefromparts_sql-533"><span class="linenos">533</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timefromparts_sql-608"><a href="#DuckDB.Generator.timefromparts_sql-608"><span class="linenos">608</span></a> <span class="k">def</span> <span class="nf">timefromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-609"><a href="#DuckDB.Generator.timefromparts_sql-609"><span class="linenos">609</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-610"><a href="#DuckDB.Generator.timefromparts_sql-610"><span class="linenos">610</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-611"><a href="#DuckDB.Generator.timefromparts_sql-611"><span class="linenos">611</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-612"><a href="#DuckDB.Generator.timefromparts_sql-612"><span class="linenos">612</span></a> <span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-613"><a href="#DuckDB.Generator.timefromparts_sql-613"><span class="linenos">613</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-614"><a href="#DuckDB.Generator.timefromparts_sql-614"><span class="linenos">614</span></a>
+</span><span id="DuckDB.Generator.timefromparts_sql-615"><a href="#DuckDB.Generator.timefromparts_sql-615"><span class="linenos">615</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -3119,21 +3384,21 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.timestampfromparts_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timestampfromparts_sql-535"><a href="#DuckDB.Generator.timestampfromparts_sql-535"><span class="linenos">535</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-536"><a href="#DuckDB.Generator.timestampfromparts_sql-536"><span class="linenos">536</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-537"><a href="#DuckDB.Generator.timestampfromparts_sql-537"><span class="linenos">537</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-538"><a href="#DuckDB.Generator.timestampfromparts_sql-538"><span class="linenos">538</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-539"><a href="#DuckDB.Generator.timestampfromparts_sql-539"><span class="linenos">539</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-540"><a href="#DuckDB.Generator.timestampfromparts_sql-540"><span class="linenos">540</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-541"><a href="#DuckDB.Generator.timestampfromparts_sql-541"><span class="linenos">541</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-542"><a href="#DuckDB.Generator.timestampfromparts_sql-542"><span class="linenos">542</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-543"><a href="#DuckDB.Generator.timestampfromparts_sql-543"><span class="linenos">543</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-544"><a href="#DuckDB.Generator.timestampfromparts_sql-544"><span class="linenos">544</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-545"><a href="#DuckDB.Generator.timestampfromparts_sql-545"><span class="linenos">545</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-546"><a href="#DuckDB.Generator.timestampfromparts_sql-546"><span class="linenos">546</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-547"><a href="#DuckDB.Generator.timestampfromparts_sql-547"><span class="linenos">547</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-548"><a href="#DuckDB.Generator.timestampfromparts_sql-548"><span class="linenos">548</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-549"><a href="#DuckDB.Generator.timestampfromparts_sql-549"><span class="linenos">549</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timestampfromparts_sql-617"><a href="#DuckDB.Generator.timestampfromparts_sql-617"><span class="linenos">617</span></a> <span class="k">def</span> <span class="nf">timestampfromparts_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampFromParts</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-618"><a href="#DuckDB.Generator.timestampfromparts_sql-618"><span class="linenos">618</span></a> <span class="n">sec</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">&quot;sec&quot;</span><span class="p">]</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-619"><a href="#DuckDB.Generator.timestampfromparts_sql-619"><span class="linenos">619</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-620"><a href="#DuckDB.Generator.timestampfromparts_sql-620"><span class="linenos">620</span></a> <span class="n">milli</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;milli&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-621"><a href="#DuckDB.Generator.timestampfromparts_sql-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-622"><a href="#DuckDB.Generator.timestampfromparts_sql-622"><span class="linenos">622</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">milli</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000.0</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-623"><a href="#DuckDB.Generator.timestampfromparts_sql-623"><span class="linenos">623</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-624"><a href="#DuckDB.Generator.timestampfromparts_sql-624"><span class="linenos">624</span></a> <span class="n">nano</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nano&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-625"><a href="#DuckDB.Generator.timestampfromparts_sql-625"><span class="linenos">625</span></a> <span class="k">if</span> <span class="n">nano</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-626"><a href="#DuckDB.Generator.timestampfromparts_sql-626"><span class="linenos">626</span></a> <span class="n">sec</span> <span class="o">+=</span> <span class="n">nano</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="o">/</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">number</span><span class="p">(</span><span class="mf">1000000000.0</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-627"><a href="#DuckDB.Generator.timestampfromparts_sql-627"><span class="linenos">627</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-628"><a href="#DuckDB.Generator.timestampfromparts_sql-628"><span class="linenos">628</span></a> <span class="k">if</span> <span class="n">milli</span> <span class="ow">or</span> <span class="n">nano</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-629"><a href="#DuckDB.Generator.timestampfromparts_sql-629"><span class="linenos">629</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;sec&quot;</span><span class="p">,</span> <span class="n">sec</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-630"><a href="#DuckDB.Generator.timestampfromparts_sql-630"><span class="linenos">630</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-631"><a href="#DuckDB.Generator.timestampfromparts_sql-631"><span class="linenos">631</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -3151,28 +3416,28 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.tablesample_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.tablesample_sql-551"><a href="#DuckDB.Generator.tablesample_sql-551"><span class="linenos">551</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB.Generator.tablesample_sql-552"><a href="#DuckDB.Generator.tablesample_sql-552"><span class="linenos">552</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator.tablesample_sql-553"><a href="#DuckDB.Generator.tablesample_sql-553"><span class="linenos">553</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
-</span><span id="DuckDB.Generator.tablesample_sql-554"><a href="#DuckDB.Generator.tablesample_sql-554"><span class="linenos">554</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator.tablesample_sql-555"><a href="#DuckDB.Generator.tablesample_sql-555"><span class="linenos">555</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="DuckDB.Generator.tablesample_sql-556"><a href="#DuckDB.Generator.tablesample_sql-556"><span class="linenos">556</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.tablesample_sql-557"><a href="#DuckDB.Generator.tablesample_sql-557"><span class="linenos">557</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.tablesample_sql-558"><a href="#DuckDB.Generator.tablesample_sql-558"><span class="linenos">558</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
-</span><span id="DuckDB.Generator.tablesample_sql-559"><a href="#DuckDB.Generator.tablesample_sql-559"><span class="linenos">559</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
-</span><span id="DuckDB.Generator.tablesample_sql-560"><a href="#DuckDB.Generator.tablesample_sql-560"><span class="linenos">560</span></a>
-</span><span id="DuckDB.Generator.tablesample_sql-561"><a href="#DuckDB.Generator.tablesample_sql-561"><span class="linenos">561</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.tablesample_sql-562"><a href="#DuckDB.Generator.tablesample_sql-562"><span class="linenos">562</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.tablesample_sql-563"><a href="#DuckDB.Generator.tablesample_sql-563"><span class="linenos">563</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.tablesample_sql-564"><a href="#DuckDB.Generator.tablesample_sql-564"><span class="linenos">564</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
-</span><span id="DuckDB.Generator.tablesample_sql-565"><a href="#DuckDB.Generator.tablesample_sql-565"><span class="linenos">565</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
-</span><span id="DuckDB.Generator.tablesample_sql-566"><a href="#DuckDB.Generator.tablesample_sql-566"><span class="linenos">566</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
-</span><span id="DuckDB.Generator.tablesample_sql-567"><a href="#DuckDB.Generator.tablesample_sql-567"><span class="linenos">567</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Generator.tablesample_sql-568"><a href="#DuckDB.Generator.tablesample_sql-568"><span class="linenos">568</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
-</span><span id="DuckDB.Generator.tablesample_sql-569"><a href="#DuckDB.Generator.tablesample_sql-569"><span class="linenos">569</span></a>
-</span><span id="DuckDB.Generator.tablesample_sql-570"><a href="#DuckDB.Generator.tablesample_sql-570"><span class="linenos">570</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
-</span><span id="DuckDB.Generator.tablesample_sql-571"><a href="#DuckDB.Generator.tablesample_sql-571"><span class="linenos">571</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
-</span><span id="DuckDB.Generator.tablesample_sql-572"><a href="#DuckDB.Generator.tablesample_sql-572"><span class="linenos">572</span></a> <span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.tablesample_sql-633"><a href="#DuckDB.Generator.tablesample_sql-633"><span class="linenos">633</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator.tablesample_sql-634"><a href="#DuckDB.Generator.tablesample_sql-634"><span class="linenos">634</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator.tablesample_sql-635"><a href="#DuckDB.Generator.tablesample_sql-635"><span class="linenos">635</span></a> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TableSample</span><span class="p">,</span>
+</span><span id="DuckDB.Generator.tablesample_sql-636"><a href="#DuckDB.Generator.tablesample_sql-636"><span class="linenos">636</span></a> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; AS &quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator.tablesample_sql-637"><a href="#DuckDB.Generator.tablesample_sql-637"><span class="linenos">637</span></a> <span class="n">tablesample_keyword</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="DuckDB.Generator.tablesample_sql-638"><a href="#DuckDB.Generator.tablesample_sql-638"><span class="linenos">638</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.tablesample_sql-639"><a href="#DuckDB.Generator.tablesample_sql-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.tablesample_sql-640"><a href="#DuckDB.Generator.tablesample_sql-640"><span class="linenos">640</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="DuckDB.Generator.tablesample_sql-641"><a href="#DuckDB.Generator.tablesample_sql-641"><span class="linenos">641</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
+</span><span id="DuckDB.Generator.tablesample_sql-642"><a href="#DuckDB.Generator.tablesample_sql-642"><span class="linenos">642</span></a>
+</span><span id="DuckDB.Generator.tablesample_sql-643"><a href="#DuckDB.Generator.tablesample_sql-643"><span class="linenos">643</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;size&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.tablesample_sql-644"><a href="#DuckDB.Generator.tablesample_sql-644"><span class="linenos">644</span></a> <span class="n">method</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.tablesample_sql-645"><a href="#DuckDB.Generator.tablesample_sql-645"><span class="linenos">645</span></a> <span class="k">if</span> <span class="n">method</span> <span class="ow">and</span> <span class="n">method</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;RESERVOIR&quot;</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.tablesample_sql-646"><a href="#DuckDB.Generator.tablesample_sql-646"><span class="linenos">646</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span>
+</span><span id="DuckDB.Generator.tablesample_sql-647"><a href="#DuckDB.Generator.tablesample_sql-647"><span class="linenos">647</span></a> <span class="sa">f</span><span class="s2">&quot;Sampling method </span><span class="si">{</span><span class="n">method</span><span class="si">}</span><span class="s2"> is not supported with a discrete sample count, &quot;</span>
+</span><span id="DuckDB.Generator.tablesample_sql-648"><a href="#DuckDB.Generator.tablesample_sql-648"><span class="linenos">648</span></a> <span class="s2">&quot;defaulting to reservoir sampling&quot;</span>
+</span><span id="DuckDB.Generator.tablesample_sql-649"><a href="#DuckDB.Generator.tablesample_sql-649"><span class="linenos">649</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator.tablesample_sql-650"><a href="#DuckDB.Generator.tablesample_sql-650"><span class="linenos">650</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s2">&quot;RESERVOIR&quot;</span><span class="p">))</span>
+</span><span id="DuckDB.Generator.tablesample_sql-651"><a href="#DuckDB.Generator.tablesample_sql-651"><span class="linenos">651</span></a>
+</span><span id="DuckDB.Generator.tablesample_sql-652"><a href="#DuckDB.Generator.tablesample_sql-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator.tablesample_sql-653"><a href="#DuckDB.Generator.tablesample_sql-653"><span class="linenos">653</span></a> <span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="n">sep</span><span class="p">,</span> <span class="n">tablesample_keyword</span><span class="o">=</span><span class="n">tablesample_keyword</span>
+</span><span id="DuckDB.Generator.tablesample_sql-654"><a href="#DuckDB.Generator.tablesample_sql-654"><span class="linenos">654</span></a> <span class="p">)</span>
</span></pre></div>
@@ -3190,19 +3455,19 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.interval_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.interval_sql-574"><a href="#DuckDB.Generator.interval_sql-574"><span class="linenos">574</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.interval_sql-575"><a href="#DuckDB.Generator.interval_sql-575"><span class="linenos">575</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="DuckDB.Generator.interval_sql-576"><a href="#DuckDB.Generator.interval_sql-576"><span class="linenos">576</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
-</span><span id="DuckDB.Generator.interval_sql-577"><a href="#DuckDB.Generator.interval_sql-577"><span class="linenos">577</span></a>
-</span><span id="DuckDB.Generator.interval_sql-578"><a href="#DuckDB.Generator.interval_sql-578"><span class="linenos">578</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.interval_sql-579"><a href="#DuckDB.Generator.interval_sql-579"><span class="linenos">579</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB.Generator.interval_sql-580"><a href="#DuckDB.Generator.interval_sql-580"><span class="linenos">580</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.interval_sql-581"><a href="#DuckDB.Generator.interval_sql-581"><span class="linenos">581</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB.Generator.interval_sql-582"><a href="#DuckDB.Generator.interval_sql-582"><span class="linenos">582</span></a>
-</span><span id="DuckDB.Generator.interval_sql-583"><a href="#DuckDB.Generator.interval_sql-583"><span class="linenos">583</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.interval_sql-584"><a href="#DuckDB.Generator.interval_sql-584"><span class="linenos">584</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="DuckDB.Generator.interval_sql-585"><a href="#DuckDB.Generator.interval_sql-585"><span class="linenos">585</span></a>
-</span><span id="DuckDB.Generator.interval_sql-586"><a href="#DuckDB.Generator.interval_sql-586"><span class="linenos">586</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.interval_sql-656"><a href="#DuckDB.Generator.interval_sql-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">interval_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.interval_sql-657"><a href="#DuckDB.Generator.interval_sql-657"><span class="linenos">657</span></a> <span class="n">multiplier</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="DuckDB.Generator.interval_sql-658"><a href="#DuckDB.Generator.interval_sql-658"><span class="linenos">658</span></a> <span class="n">unit</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="s2">&quot;unit&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
+</span><span id="DuckDB.Generator.interval_sql-659"><a href="#DuckDB.Generator.interval_sql-659"><span class="linenos">659</span></a>
+</span><span id="DuckDB.Generator.interval_sql-660"><a href="#DuckDB.Generator.interval_sql-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;week&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.interval_sql-661"><a href="#DuckDB.Generator.interval_sql-661"><span class="linenos">661</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="DuckDB.Generator.interval_sql-662"><a href="#DuckDB.Generator.interval_sql-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="n">unit</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;quarter&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.interval_sql-663"><a href="#DuckDB.Generator.interval_sql-663"><span class="linenos">663</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
+</span><span id="DuckDB.Generator.interval_sql-664"><a href="#DuckDB.Generator.interval_sql-664"><span class="linenos">664</span></a>
+</span><span id="DuckDB.Generator.interval_sql-665"><a href="#DuckDB.Generator.interval_sql-665"><span class="linenos">665</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.interval_sql-666"><a href="#DuckDB.Generator.interval_sql-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">multiplier</span><span class="si">}</span><span class="s2"> * </span><span class="si">{</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Interval</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span><span class="w"> </span><span class="n">unit</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">var</span><span class="p">(</span><span class="s1">&#39;DAY&#39;</span><span class="p">)))</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="DuckDB.Generator.interval_sql-667"><a href="#DuckDB.Generator.interval_sql-667"><span class="linenos">667</span></a>
+</span><span id="DuckDB.Generator.interval_sql-668"><a href="#DuckDB.Generator.interval_sql-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">interval_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -3220,10 +3485,10 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.columndef_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.columndef_sql-588"><a href="#DuckDB.Generator.columndef_sql-588"><span class="linenos">588</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.columndef_sql-589"><a href="#DuckDB.Generator.columndef_sql-589"><span class="linenos">589</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.columndef_sql-590"><a href="#DuckDB.Generator.columndef_sql-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.columndef_sql-591"><a href="#DuckDB.Generator.columndef_sql-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.columndef_sql-670"><a href="#DuckDB.Generator.columndef_sql-670"><span class="linenos">670</span></a> <span class="k">def</span> <span class="nf">columndef_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ColumnDef</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.columndef_sql-671"><a href="#DuckDB.Generator.columndef_sql-671"><span class="linenos">671</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">UserDefinedFunction</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.columndef_sql-672"><a href="#DuckDB.Generator.columndef_sql-672"><span class="linenos">672</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.columndef_sql-673"><a href="#DuckDB.Generator.columndef_sql-673"><span class="linenos">673</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">columndef_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="p">)</span>
</span></pre></div>
@@ -3241,17 +3506,17 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.join_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.join_sql-593"><a href="#DuckDB.Generator.join_sql-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.join_sql-594"><a href="#DuckDB.Generator.join_sql-594"><span class="linenos">594</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB.Generator.join_sql-595"><a href="#DuckDB.Generator.join_sql-595"><span class="linenos">595</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
-</span><span id="DuckDB.Generator.join_sql-596"><a href="#DuckDB.Generator.join_sql-596"><span class="linenos">596</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.join_sql-597"><a href="#DuckDB.Generator.join_sql-597"><span class="linenos">597</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.join_sql-598"><a href="#DuckDB.Generator.join_sql-598"><span class="linenos">598</span></a> <span class="p">):</span>
-</span><span id="DuckDB.Generator.join_sql-599"><a href="#DuckDB.Generator.join_sql-599"><span class="linenos">599</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB.Generator.join_sql-600"><a href="#DuckDB.Generator.join_sql-600"><span class="linenos">600</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
-</span><span id="DuckDB.Generator.join_sql-601"><a href="#DuckDB.Generator.join_sql-601"><span class="linenos">601</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
-</span><span id="DuckDB.Generator.join_sql-602"><a href="#DuckDB.Generator.join_sql-602"><span class="linenos">602</span></a>
-</span><span id="DuckDB.Generator.join_sql-603"><a href="#DuckDB.Generator.join_sql-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.join_sql-675"><a href="#DuckDB.Generator.join_sql-675"><span class="linenos">675</span></a> <span class="k">def</span> <span class="nf">join_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Join</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.join_sql-676"><a href="#DuckDB.Generator.join_sql-676"><span class="linenos">676</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB.Generator.join_sql-677"><a href="#DuckDB.Generator.join_sql-677"><span class="linenos">677</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">side</span> <span class="o">==</span> <span class="s2">&quot;LEFT&quot;</span>
+</span><span id="DuckDB.Generator.join_sql-678"><a href="#DuckDB.Generator.join_sql-678"><span class="linenos">678</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.join_sql-679"><a href="#DuckDB.Generator.join_sql-679"><span class="linenos">679</span></a> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Unnest</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.join_sql-680"><a href="#DuckDB.Generator.join_sql-680"><span class="linenos">680</span></a> <span class="p">):</span>
+</span><span id="DuckDB.Generator.join_sql-681"><a href="#DuckDB.Generator.join_sql-681"><span class="linenos">681</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB.Generator.join_sql-682"><a href="#DuckDB.Generator.join_sql-682"><span class="linenos">682</span></a> <span class="c1"># DuckDB doesn&#39;t, but we can just add a dummy ON clause that is always true</span>
+</span><span id="DuckDB.Generator.join_sql-683"><a href="#DuckDB.Generator.join_sql-683"><span class="linenos">683</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">true</span><span class="p">()))</span>
+</span><span id="DuckDB.Generator.join_sql-684"><a href="#DuckDB.Generator.join_sql-684"><span class="linenos">684</span></a>
+</span><span id="DuckDB.Generator.join_sql-685"><a href="#DuckDB.Generator.join_sql-685"><span class="linenos">685</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">join_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -3269,13 +3534,13 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.generateseries_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.generateseries_sql-605"><a href="#DuckDB.Generator.generateseries_sql-605"><span class="linenos">605</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.generateseries_sql-606"><a href="#DuckDB.Generator.generateseries_sql-606"><span class="linenos">606</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="DuckDB.Generator.generateseries_sql-607"><a href="#DuckDB.Generator.generateseries_sql-607"><span class="linenos">607</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.generateseries_sql-608"><a href="#DuckDB.Generator.generateseries_sql-608"><span class="linenos">608</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.generateseries_sql-609"><a href="#DuckDB.Generator.generateseries_sql-609"><span class="linenos">609</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.generateseries_sql-610"><a href="#DuckDB.Generator.generateseries_sql-610"><span class="linenos">610</span></a>
-</span><span id="DuckDB.Generator.generateseries_sql-611"><a href="#DuckDB.Generator.generateseries_sql-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.generateseries_sql-687"><a href="#DuckDB.Generator.generateseries_sql-687"><span class="linenos">687</span></a> <span class="k">def</span> <span class="nf">generateseries_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">GenerateSeries</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.generateseries_sql-688"><a href="#DuckDB.Generator.generateseries_sql-688"><span class="linenos">688</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="DuckDB.Generator.generateseries_sql-689"><a href="#DuckDB.Generator.generateseries_sql-689"><span class="linenos">689</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.generateseries_sql-690"><a href="#DuckDB.Generator.generateseries_sql-690"><span class="linenos">690</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;is_end_exclusive&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.generateseries_sql-691"><a href="#DuckDB.Generator.generateseries_sql-691"><span class="linenos">691</span></a> <span class="k">return</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANGE&quot;</span><span class="p">)(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.generateseries_sql-692"><a href="#DuckDB.Generator.generateseries_sql-692"><span class="linenos">692</span></a>
+</span><span id="DuckDB.Generator.generateseries_sql-693"><a href="#DuckDB.Generator.generateseries_sql-693"><span class="linenos">693</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -3293,23 +3558,23 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.bracket_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.bracket_sql-613"><a href="#DuckDB.Generator.bracket_sql-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.bracket_sql-614"><a href="#DuckDB.Generator.bracket_sql-614"><span class="linenos">614</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator.bracket_sql-615"><a href="#DuckDB.Generator.bracket_sql-615"><span class="linenos">615</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.bracket_sql-616"><a href="#DuckDB.Generator.bracket_sql-616"><span class="linenos">616</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
-</span><span id="DuckDB.Generator.bracket_sql-617"><a href="#DuckDB.Generator.bracket_sql-617"><span class="linenos">617</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-618"><a href="#DuckDB.Generator.bracket_sql-618"><span class="linenos">618</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.bracket_sql-619"><a href="#DuckDB.Generator.bracket_sql-619"><span class="linenos">619</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-620"><a href="#DuckDB.Generator.bracket_sql-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.bracket_sql-621"><a href="#DuckDB.Generator.bracket_sql-621"><span class="linenos">621</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.bracket_sql-622"><a href="#DuckDB.Generator.bracket_sql-622"><span class="linenos">622</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
-</span><span id="DuckDB.Generator.bracket_sql-623"><a href="#DuckDB.Generator.bracket_sql-623"><span class="linenos">623</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-624"><a href="#DuckDB.Generator.bracket_sql-624"><span class="linenos">624</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.bracket_sql-625"><a href="#DuckDB.Generator.bracket_sql-625"><span class="linenos">625</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-626"><a href="#DuckDB.Generator.bracket_sql-626"><span class="linenos">626</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.bracket_sql-627"><a href="#DuckDB.Generator.bracket_sql-627"><span class="linenos">627</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
-</span><span id="DuckDB.Generator.bracket_sql-628"><a href="#DuckDB.Generator.bracket_sql-628"><span class="linenos">628</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-629"><a href="#DuckDB.Generator.bracket_sql-629"><span class="linenos">629</span></a> <span class="k">return</span> <span class="n">bracket</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.bracket_sql-695"><a href="#DuckDB.Generator.bracket_sql-695"><span class="linenos">695</span></a> <span class="k">def</span> <span class="nf">bracket_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.bracket_sql-696"><a href="#DuckDB.Generator.bracket_sql-696"><span class="linenos">696</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator.bracket_sql-697"><a href="#DuckDB.Generator.bracket_sql-697"><span class="linenos">697</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.bracket_sql-698"><a href="#DuckDB.Generator.bracket_sql-698"><span class="linenos">698</span></a> <span class="n">this</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">paren</span><span class="p">(</span><span class="n">this</span><span class="p">))</span>
+</span><span id="DuckDB.Generator.bracket_sql-699"><a href="#DuckDB.Generator.bracket_sql-699"><span class="linenos">699</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-700"><a href="#DuckDB.Generator.bracket_sql-700"><span class="linenos">700</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">bracket_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.bracket_sql-701"><a href="#DuckDB.Generator.bracket_sql-701"><span class="linenos">701</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-702"><a href="#DuckDB.Generator.bracket_sql-702"><span class="linenos">702</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.bracket_sql-703"><a href="#DuckDB.Generator.bracket_sql-703"><span class="linenos">703</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.bracket_sql-704"><a href="#DuckDB.Generator.bracket_sql-704"><span class="linenos">704</span></a> <span class="kn">from</span> <span class="nn">sqlglot.optimizer.annotate_types</span> <span class="kn">import</span> <span class="n">annotate_types</span>
+</span><span id="DuckDB.Generator.bracket_sql-705"><a href="#DuckDB.Generator.bracket_sql-705"><span class="linenos">705</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-706"><a href="#DuckDB.Generator.bracket_sql-706"><span class="linenos">706</span></a> <span class="n">this</span> <span class="o">=</span> <span class="n">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.bracket_sql-707"><a href="#DuckDB.Generator.bracket_sql-707"><span class="linenos">707</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-708"><a href="#DuckDB.Generator.bracket_sql-708"><span class="linenos">708</span></a> <span class="k">if</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">MAP</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.bracket_sql-709"><a href="#DuckDB.Generator.bracket_sql-709"><span class="linenos">709</span></a> <span class="n">bracket</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="n">bracket</span><span class="si">}</span><span class="s2">)[1]&quot;</span>
+</span><span id="DuckDB.Generator.bracket_sql-710"><a href="#DuckDB.Generator.bracket_sql-710"><span class="linenos">710</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-711"><a href="#DuckDB.Generator.bracket_sql-711"><span class="linenos">711</span></a> <span class="k">return</span> <span class="n">bracket</span>
</span></pre></div>
@@ -3327,21 +3592,21 @@ Default: True</li>
</div>
<a class="headerlink" href="#DuckDB.Generator.withingroup_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.withingroup_sql-631"><a href="#DuckDB.Generator.withingroup_sql-631"><span class="linenos">631</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.withingroup_sql-632"><a href="#DuckDB.Generator.withingroup_sql-632"><span class="linenos">632</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.withingroup_sql-633"><a href="#DuckDB.Generator.withingroup_sql-633"><span class="linenos">633</span></a>
-</span><span id="DuckDB.Generator.withingroup_sql-634"><a href="#DuckDB.Generator.withingroup_sql-634"><span class="linenos">634</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator.withingroup_sql-635"><a href="#DuckDB.Generator.withingroup_sql-635"><span class="linenos">635</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
-</span><span id="DuckDB.Generator.withingroup_sql-636"><a href="#DuckDB.Generator.withingroup_sql-636"><span class="linenos">636</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
-</span><span id="DuckDB.Generator.withingroup_sql-637"><a href="#DuckDB.Generator.withingroup_sql-637"><span class="linenos">637</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
-</span><span id="DuckDB.Generator.withingroup_sql-638"><a href="#DuckDB.Generator.withingroup_sql-638"><span class="linenos">638</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.withingroup_sql-639"><a href="#DuckDB.Generator.withingroup_sql-639"><span class="linenos">639</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
-</span><span id="DuckDB.Generator.withingroup_sql-640"><a href="#DuckDB.Generator.withingroup_sql-640"><span class="linenos">640</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.withingroup_sql-641"><a href="#DuckDB.Generator.withingroup_sql-641"><span class="linenos">641</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.withingroup_sql-642"><a href="#DuckDB.Generator.withingroup_sql-642"><span class="linenos">642</span></a>
-</span><span id="DuckDB.Generator.withingroup_sql-643"><a href="#DuckDB.Generator.withingroup_sql-643"><span class="linenos">643</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.withingroup_sql-644"><a href="#DuckDB.Generator.withingroup_sql-644"><span class="linenos">644</span></a>
-</span><span id="DuckDB.Generator.withingroup_sql-645"><a href="#DuckDB.Generator.withingroup_sql-645"><span class="linenos">645</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.withingroup_sql-713"><a href="#DuckDB.Generator.withingroup_sql-713"><span class="linenos">713</span></a> <span class="k">def</span> <span class="nf">withingroup_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.withingroup_sql-714"><a href="#DuckDB.Generator.withingroup_sql-714"><span class="linenos">714</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;expression&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.withingroup_sql-715"><a href="#DuckDB.Generator.withingroup_sql-715"><span class="linenos">715</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-716"><a href="#DuckDB.Generator.withingroup_sql-716"><span class="linenos">716</span></a> <span class="n">func</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator.withingroup_sql-717"><a href="#DuckDB.Generator.withingroup_sql-717"><span class="linenos">717</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PERCENTILES</span><span class="p">):</span>
+</span><span id="DuckDB.Generator.withingroup_sql-718"><a href="#DuckDB.Generator.withingroup_sql-718"><span class="linenos">718</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="DuckDB.Generator.withingroup_sql-719"><a href="#DuckDB.Generator.withingroup_sql-719"><span class="linenos">719</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB.Generator.withingroup_sql-720"><a href="#DuckDB.Generator.withingroup_sql-720"><span class="linenos">720</span></a> <span class="n">order_col</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.withingroup_sql-721"><a href="#DuckDB.Generator.withingroup_sql-721"><span class="linenos">721</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.withingroup_sql-722"><a href="#DuckDB.Generator.withingroup_sql-722"><span class="linenos">722</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;expression&quot;</span><span class="p">,</span> <span class="n">func</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.withingroup_sql-723"><a href="#DuckDB.Generator.withingroup_sql-723"><span class="linenos">723</span></a> <span class="n">func</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;this&quot;</span><span class="p">,</span> <span class="n">order_col</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.withingroup_sql-724"><a href="#DuckDB.Generator.withingroup_sql-724"><span class="linenos">724</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-725"><a href="#DuckDB.Generator.withingroup_sql-725"><span class="linenos">725</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator.withingroup_sql-726"><a href="#DuckDB.Generator.withingroup_sql-726"><span class="linenos">726</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-727"><a href="#DuckDB.Generator.withingroup_sql-727"><span class="linenos">727</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -3437,7 +3702,6 @@ Default: True</li>
<dd id="DuckDB.Generator.WITH_PROPERTIES_PREFIX" class="variable"><a href="../generator.html#Generator.WITH_PROPERTIES_PREFIX">WITH_PROPERTIES_PREFIX</a></dd>
<dd id="DuckDB.Generator.TIME_PART_SINGULARS" class="variable"><a href="../generator.html#Generator.TIME_PART_SINGULARS">TIME_PART_SINGULARS</a></dd>
<dd id="DuckDB.Generator.TOKEN_MAPPING" class="variable"><a href="../generator.html#Generator.TOKEN_MAPPING">TOKEN_MAPPING</a></dd>
- <dd id="DuckDB.Generator.RESERVED_KEYWORDS" class="variable"><a href="../generator.html#Generator.RESERVED_KEYWORDS">RESERVED_KEYWORDS</a></dd>
<dd id="DuckDB.Generator.WITH_SEPARATED_COMMENTS" class="variable"><a href="../generator.html#Generator.WITH_SEPARATED_COMMENTS">WITH_SEPARATED_COMMENTS</a></dd>
<dd id="DuckDB.Generator.EXCLUDE_COMMENTS" class="variable"><a href="../generator.html#Generator.EXCLUDE_COMMENTS">EXCLUDE_COMMENTS</a></dd>
<dd id="DuckDB.Generator.PARAMETERIZABLE_TEXT_TYPES" class="variable"><a href="../generator.html#Generator.PARAMETERIZABLE_TEXT_TYPES">PARAMETERIZABLE_TEXT_TYPES</a></dd>
@@ -3775,6 +4039,7 @@ Default: True</li>
<dd id="DuckDB.Generator.semicolon_sql" class="function"><a href="../generator.html#Generator.semicolon_sql">semicolon_sql</a></dd>
<dd id="DuckDB.Generator.datadeletionproperty_sql" class="function"><a href="../generator.html#Generator.datadeletionproperty_sql">datadeletionproperty_sql</a></dd>
<dd id="DuckDB.Generator.maskingpolicycolumnconstraint_sql" class="function"><a href="../generator.html#Generator.maskingpolicycolumnconstraint_sql">maskingpolicycolumnconstraint_sql</a></dd>
+ <dd id="DuckDB.Generator.gapfill_sql" class="function"><a href="../generator.html#Generator.gapfill_sql">gapfill_sql</a></dd>
</div>
</dl>