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.html2903
1 files changed, 1490 insertions, 1413 deletions
diff --git a/docs/sqlglot/dialects/duckdb.html b/docs/sqlglot/dialects/duckdb.html
index a5ac731..d1439d4 100644
--- a/docs/sqlglot/dialects/duckdb.html
+++ b/docs/sqlglot/dialects/duckdb.html
@@ -214,6 +214,9 @@
<a class="function" href="#DuckDB.Generator.bracket_sql">bracket_sql</a>
</li>
<li>
+ <a class="function" href="#DuckDB.Generator.withingroup_sql">withingroup_sql</a>
+ </li>
+ <li>
<a class="variable" href="#DuckDB.Generator.SELECT_KINDS">SELECT_KINDS</a>
</li>
<li>
@@ -338,7 +341,7 @@
</span><span id="L-28"><a href="#L-28"><span class="linenos"> 28</span></a> <span class="n">timestrtotime_sql</span><span class="p">,</span>
</span><span id="L-29"><a href="#L-29"><span class="linenos"> 29</span></a> <span class="n">unit_to_var</span><span class="p">,</span>
</span><span id="L-30"><a href="#L-30"><span class="linenos"> 30</span></a><span class="p">)</span>
-</span><span id="L-31"><a href="#L-31"><span class="linenos"> 31</span></a><span class="kn">from</span> <span class="nn">sqlglot.helper</span> <span class="kn">import</span> <span class="n">flatten</span><span class="p">,</span> <span class="n">seq_get</span>
+</span><span id="L-31"><a href="#L-31"><span class="linenos"> 31</span></a><span class="kn">from</span> <span class="nn">sqlglot.helper</span> <span class="kn">import</span> <span class="n">seq_get</span>
</span><span id="L-32"><a href="#L-32"><span class="linenos"> 32</span></a><span class="kn">from</span> <span class="nn">sqlglot.tokens</span> <span class="kn">import</span> <span class="n">TokenType</span>
</span><span id="L-33"><a href="#L-33"><span class="linenos"> 33</span></a>
</span><span id="L-34"><a href="#L-34"><span class="linenos"> 34</span></a>
@@ -465,467 +468,474 @@
</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Div</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">timestamp</span><span class="p">,</span> <span class="n">expression</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;POW&quot;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="n">scale</span><span class="p">)))</span>
</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a>
</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a>
-</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a><span class="k">def</span> <span class="nf">_rename_unless_within_group</span><span class="p">(</span>
-</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="n">a</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">b</span><span class="p">:</span> <span class="nb">str</span>
-</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">Callable</span><span class="p">[[</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">Generator</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">],</span> <span class="nb">str</span><span class="p">]:</span>
-</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a> <span class="k">return</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="p">(</span>
-</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="o">*</span><span class="n">flatten</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">values</span><span class="p">()))</span>
-</span><span id="L-163"><a href="#L-163"><span class="linenos">163</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">find_ancestor</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Select</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="n">exp</span><span class="o">.</span><span class="n">WithinGroup</span><span class="p">)</span>
-</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="o">*</span><span class="n">flatten</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">values</span><span class="p">()))</span>
-</span><span id="L-165"><a href="#L-165"><span class="linenos">165</span></a> <span class="p">)</span>
-</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a>
+</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a><span class="k">class</span> <span class="nc">DuckDB</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span>
+</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="n">NULL_ORDERING</span> <span class="o">=</span> <span class="s2">&quot;nulls_are_last&quot;</span>
+</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a> <span class="n">SUPPORTS_USER_DEFINED_TYPES</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a> <span class="n">SAFE_DIVISION</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a> <span class="n">INDEX_OFFSET</span> <span class="o">=</span> <span class="mi">1</span>
+</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a> <span class="n">CONCAT_COALESCE</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a>
+</span><span id="L-165"><a href="#L-165"><span class="linenos">165</span></a> <span class="c1"># https://duckdb.org/docs/sql/introduction.html#creating-a-new-table</span>
+</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a> <span class="n">NORMALIZATION_STRATEGY</span> <span class="o">=</span> <span class="n">NormalizationStrategy</span><span class="o">.</span><span class="n">CASE_INSENSITIVE</span>
</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a>
-</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a><span class="k">class</span> <span class="nc">DuckDB</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span>
-</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a> <span class="n">NULL_ORDERING</span> <span class="o">=</span> <span class="s2">&quot;nulls_are_last&quot;</span>
-</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="n">SUPPORTS_USER_DEFINED_TYPES</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="n">SAFE_DIVISION</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a> <span class="n">INDEX_OFFSET</span> <span class="o">=</span> <span class="mi">1</span>
-</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a> <span class="n">CONCAT_COALESCE</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a>
-</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="c1"># https://duckdb.org/docs/sql/introduction.html#creating-a-new-table</span>
-</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a> <span class="n">NORMALIZATION_STRATEGY</span> <span class="o">=</span> <span class="n">NormalizationStrategy</span><span class="o">.</span><span class="n">CASE_INSENSITIVE</span>
+</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
+</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
+</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
+</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
+</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
+</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
+</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
+</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
+</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a> <span class="k">return</span> <span class="n">path</span>
</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a>
-</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
-</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
-</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
-</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
-</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
-</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
-</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
-</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
-</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a> <span class="k">return</span> <span class="n">path</span>
-</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a>
-</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
-</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>
-</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
-</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
-</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a>
-</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
-</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a>
-</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
-</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
-</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
-</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
-</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
-</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
-</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
-</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
-</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
-</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
-</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
-</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
-</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
-</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
-</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
-</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
-</span><span id="L-216"><a href="#L-216"><span class="linenos">216</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
-</span><span id="L-217"><a href="#L-217"><span class="linenos">217</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
-</span><span id="L-218"><a href="#L-218"><span class="linenos">218</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
-</span><span id="L-219"><a href="#L-219"><span class="linenos">219</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
-</span><span id="L-220"><a href="#L-220"><span class="linenos">220</span></a> <span class="p">}</span>
-</span><span id="L-221"><a href="#L-221"><span class="linenos">221</span></a>
-</span><span id="L-222"><a href="#L-222"><span class="linenos">222</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-223"><a href="#L-223"><span class="linenos">223</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
-</span><span id="L-224"><a href="#L-224"><span class="linenos">224</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
-</span><span id="L-225"><a href="#L-225"><span class="linenos">225</span></a> <span class="p">}</span>
-</span><span id="L-226"><a href="#L-226"><span class="linenos">226</span></a>
-</span><span id="L-227"><a href="#L-227"><span class="linenos">227</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
-</span><span id="L-228"><a href="#L-228"><span class="linenos">228</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-229"><a href="#L-229"><span class="linenos">229</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
-</span><span id="L-230"><a href="#L-230"><span class="linenos">230</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
-</span><span id="L-231"><a href="#L-231"><span class="linenos">231</span></a> <span class="p">}</span>
-</span><span id="L-232"><a href="#L-232"><span class="linenos">232</span></a>
-</span><span id="L-233"><a href="#L-233"><span class="linenos">233</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
-</span><span id="L-234"><a href="#L-234"><span class="linenos">234</span></a>
-</span><span id="L-235"><a href="#L-235"><span class="linenos">235</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-236"><a href="#L-236"><span class="linenos">236</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
-</span><span id="L-237"><a href="#L-237"><span class="linenos">237</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-238"><a href="#L-238"><span class="linenos">238</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="L-239"><a href="#L-239"><span class="linenos">239</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-240"><a href="#L-240"><span class="linenos">240</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="L-241"><a href="#L-241"><span class="linenos">241</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="L-242"><a href="#L-242"><span class="linenos">242</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="L-243"><a href="#L-243"><span class="linenos">243</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="L-244"><a href="#L-244"><span class="linenos">244</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
-</span><span id="L-245"><a href="#L-245"><span class="linenos">245</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="L-246"><a href="#L-246"><span class="linenos">246</span></a> <span class="p">),</span>
-</span><span id="L-247"><a href="#L-247"><span class="linenos">247</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
-</span><span id="L-248"><a href="#L-248"><span class="linenos">248</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="L-249"><a href="#L-249"><span class="linenos">249</span></a> <span class="p">),</span>
-</span><span id="L-250"><a href="#L-250"><span class="linenos">250</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-251"><a href="#L-251"><span class="linenos">251</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
-</span><span id="L-252"><a href="#L-252"><span class="linenos">252</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
-</span><span id="L-253"><a href="#L-253"><span class="linenos">253</span></a> <span class="p">),</span>
-</span><span id="L-254"><a href="#L-254"><span class="linenos">254</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-255"><a href="#L-255"><span class="linenos">255</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
-</span><span id="L-256"><a href="#L-256"><span class="linenos">256</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
-</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-258"><a href="#L-258"><span class="linenos">258</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="L-259"><a href="#L-259"><span class="linenos">259</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-260"><a href="#L-260"><span class="linenos">260</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-261"><a href="#L-261"><span class="linenos">261</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-262"><a href="#L-262"><span class="linenos">262</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
-</span><span id="L-263"><a href="#L-263"><span class="linenos">263</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
-</span><span id="L-264"><a href="#L-264"><span class="linenos">264</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
-</span><span id="L-265"><a href="#L-265"><span class="linenos">265</span></a> <span class="p">),</span>
-</span><span id="L-266"><a href="#L-266"><span class="linenos">266</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-267"><a href="#L-267"><span class="linenos">267</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-268"><a href="#L-268"><span class="linenos">268</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
-</span><span id="L-269"><a href="#L-269"><span class="linenos">269</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
-</span><span id="L-270"><a href="#L-270"><span class="linenos">270</span></a> <span class="p">),</span>
-</span><span id="L-271"><a href="#L-271"><span class="linenos">271</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-272"><a href="#L-272"><span class="linenos">272</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
-</span><span id="L-273"><a href="#L-273"><span class="linenos">273</span></a> <span class="n">this</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><span id="L-274"><a href="#L-274"><span class="linenos">274</span></a> <span class="n">expression</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-275"><a href="#L-275"><span class="linenos">275</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
-</span><span id="L-276"><a href="#L-276"><span class="linenos">276</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
-</span><span id="L-277"><a href="#L-277"><span class="linenos">277</span></a> <span class="p">),</span>
-</span><span id="L-278"><a href="#L-278"><span class="linenos">278</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="L-279"><a href="#L-279"><span class="linenos">279</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-280"><a href="#L-280"><span class="linenos">280</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-281"><a href="#L-281"><span class="linenos">281</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-282"><a href="#L-282"><span class="linenos">282</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
-</span><span id="L-289"><a href="#L-289"><span class="linenos">289</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
-</span><span id="L-290"><a href="#L-290"><span class="linenos">290</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="L-291"><a href="#L-291"><span class="linenos">291</span></a> <span class="p">}</span>
-</span><span id="L-292"><a href="#L-292"><span class="linenos">292</span></a>
-</span><span id="L-293"><a href="#L-293"><span class="linenos">293</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
-</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a>
+</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
+</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
+</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a>
+</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
+</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a>
+</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
+</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
+</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
+</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
+</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
+</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
+</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
+</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
+</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
+</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
+</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
+</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
+</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
+</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
+</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
+</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
+</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
+</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
+</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
+</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
+</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a> <span class="p">}</span>
+</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a>
+</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
+</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
+</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a> <span class="p">}</span>
+</span><span id="L-216"><a href="#L-216"><span class="linenos">216</span></a>
+</span><span id="L-217"><a href="#L-217"><span class="linenos">217</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
+</span><span id="L-218"><a href="#L-218"><span class="linenos">218</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-219"><a href="#L-219"><span class="linenos">219</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
+</span><span id="L-220"><a href="#L-220"><span class="linenos">220</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
+</span><span id="L-221"><a href="#L-221"><span class="linenos">221</span></a> <span class="p">}</span>
+</span><span id="L-222"><a href="#L-222"><span class="linenos">222</span></a>
+</span><span id="L-223"><a href="#L-223"><span class="linenos">223</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
+</span><span id="L-224"><a href="#L-224"><span class="linenos">224</span></a>
+</span><span id="L-225"><a href="#L-225"><span class="linenos">225</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-226"><a href="#L-226"><span class="linenos">226</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
+</span><span id="L-227"><a href="#L-227"><span class="linenos">227</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-228"><a href="#L-228"><span class="linenos">228</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="L-229"><a href="#L-229"><span class="linenos">229</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-230"><a href="#L-230"><span class="linenos">230</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="L-231"><a href="#L-231"><span class="linenos">231</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="L-232"><a href="#L-232"><span class="linenos">232</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="L-233"><a href="#L-233"><span class="linenos">233</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="L-234"><a href="#L-234"><span class="linenos">234</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
+</span><span id="L-235"><a href="#L-235"><span class="linenos">235</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="L-236"><a href="#L-236"><span class="linenos">236</span></a> <span class="p">),</span>
+</span><span id="L-237"><a href="#L-237"><span class="linenos">237</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
+</span><span id="L-238"><a href="#L-238"><span class="linenos">238</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="L-239"><a href="#L-239"><span class="linenos">239</span></a> <span class="p">),</span>
+</span><span id="L-240"><a href="#L-240"><span class="linenos">240</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-241"><a href="#L-241"><span class="linenos">241</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
+</span><span id="L-242"><a href="#L-242"><span class="linenos">242</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
+</span><span id="L-243"><a href="#L-243"><span class="linenos">243</span></a> <span class="p">),</span>
+</span><span id="L-244"><a href="#L-244"><span class="linenos">244</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-245"><a href="#L-245"><span class="linenos">245</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
+</span><span id="L-246"><a href="#L-246"><span class="linenos">246</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
+</span><span id="L-247"><a href="#L-247"><span class="linenos">247</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-248"><a href="#L-248"><span class="linenos">248</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="L-249"><a href="#L-249"><span class="linenos">249</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-250"><a href="#L-250"><span class="linenos">250</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-251"><a href="#L-251"><span class="linenos">251</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-252"><a href="#L-252"><span class="linenos">252</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
+</span><span id="L-253"><a href="#L-253"><span class="linenos">253</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
+</span><span id="L-254"><a href="#L-254"><span class="linenos">254</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
+</span><span id="L-255"><a href="#L-255"><span class="linenos">255</span></a> <span class="p">),</span>
+</span><span id="L-256"><a href="#L-256"><span class="linenos">256</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-258"><a href="#L-258"><span class="linenos">258</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
+</span><span id="L-259"><a href="#L-259"><span class="linenos">259</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
+</span><span id="L-260"><a href="#L-260"><span class="linenos">260</span></a> <span class="p">),</span>
+</span><span id="L-261"><a href="#L-261"><span class="linenos">261</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-262"><a href="#L-262"><span class="linenos">262</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
+</span><span id="L-263"><a href="#L-263"><span class="linenos">263</span></a> <span class="n">this</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><span id="L-264"><a href="#L-264"><span class="linenos">264</span></a> <span class="n">expression</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-265"><a href="#L-265"><span class="linenos">265</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
+</span><span id="L-266"><a href="#L-266"><span class="linenos">266</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
+</span><span id="L-267"><a href="#L-267"><span class="linenos">267</span></a> <span class="p">),</span>
+</span><span id="L-268"><a href="#L-268"><span class="linenos">268</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="L-269"><a href="#L-269"><span class="linenos">269</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-270"><a href="#L-270"><span class="linenos">270</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-271"><a href="#L-271"><span class="linenos">271</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-272"><a href="#L-272"><span class="linenos">272</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="L-273"><a href="#L-273"><span class="linenos">273</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-274"><a href="#L-274"><span class="linenos">274</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-275"><a href="#L-275"><span class="linenos">275</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-276"><a href="#L-276"><span class="linenos">276</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-277"><a href="#L-277"><span class="linenos">277</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="L-278"><a href="#L-278"><span class="linenos">278</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
+</span><span id="L-279"><a href="#L-279"><span class="linenos">279</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
+</span><span id="L-280"><a href="#L-280"><span class="linenos">280</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="L-281"><a href="#L-281"><span class="linenos">281</span></a> <span class="p">}</span>
+</span><span id="L-282"><a href="#L-282"><span class="linenos">282</span></a>
+</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a>
+</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
+</span><span id="L-289"><a href="#L-289"><span class="linenos">289</span></a> <span class="p">}</span>
+</span><span id="L-290"><a href="#L-290"><span class="linenos">290</span></a>
+</span><span id="L-291"><a href="#L-291"><span class="linenos">291</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
+</span><span id="L-292"><a href="#L-292"><span class="linenos">292</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
+</span><span id="L-293"><a href="#L-293"><span class="linenos">293</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
+</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a> <span class="p">}</span>
</span><span id="L-295"><a href="#L-295"><span class="linenos">295</span></a>
-</span><span id="L-296"><a href="#L-296"><span class="linenos">296</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
-</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a> <span class="p">}</span>
-</span><span id="L-300"><a href="#L-300"><span class="linenos">300</span></a>
-</span><span id="L-301"><a href="#L-301"><span class="linenos">301</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
-</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
-</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
-</span><span id="L-304"><a href="#L-304"><span class="linenos">304</span></a> <span class="p">}</span>
-</span><span id="L-305"><a href="#L-305"><span class="linenos">305</span></a>
-</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-307"><a href="#L-307"><span class="linenos">307</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
-</span><span id="L-308"><a href="#L-308"><span class="linenos">308</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
-</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
-</span><span id="L-310"><a href="#L-310"><span class="linenos">310</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
-</span><span id="L-311"><a href="#L-311"><span class="linenos">311</span></a> <span class="k">else</span> <span class="kc">None</span>
-</span><span id="L-312"><a href="#L-312"><span class="linenos">312</span></a> <span class="p">),</span>
-</span><span id="L-313"><a href="#L-313"><span class="linenos">313</span></a> <span class="p">}</span>
-</span><span id="L-314"><a href="#L-314"><span class="linenos">314</span></a>
-</span><span id="L-315"><a href="#L-315"><span class="linenos">315</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
-</span><span id="L-316"><a href="#L-316"><span class="linenos">316</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="L-317"><a href="#L-317"><span class="linenos">317</span></a> <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>
-</span><span id="L-318"><a href="#L-318"><span class="linenos">318</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="L-319"><a href="#L-319"><span class="linenos">319</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
-</span><span id="L-320"><a href="#L-320"><span class="linenos">320</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
-</span><span id="L-321"><a href="#L-321"><span class="linenos">321</span></a>
-</span><span id="L-322"><a href="#L-322"><span class="linenos">322</span></a> <span class="k">return</span> <span class="n">bracket</span>
-</span><span id="L-323"><a href="#L-323"><span class="linenos">323</span></a>
-</span><span id="L-324"><a href="#L-324"><span class="linenos">324</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
-</span><span id="L-325"><a href="#L-325"><span class="linenos">325</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-326"><a href="#L-326"><span class="linenos">326</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-296"><a href="#L-296"><span class="linenos">296</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
+</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
+</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
+</span><span id="L-300"><a href="#L-300"><span class="linenos">300</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
+</span><span id="L-301"><a href="#L-301"><span class="linenos">301</span></a> <span class="k">else</span> <span class="kc">None</span>
+</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a> <span class="p">),</span>
+</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a> <span class="p">}</span>
+</span><span id="L-304"><a href="#L-304"><span class="linenos">304</span></a>
+</span><span id="L-305"><a href="#L-305"><span class="linenos">305</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
+</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-307"><a href="#L-307"><span class="linenos">307</span></a> <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>
+</span><span id="L-308"><a href="#L-308"><span class="linenos">308</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
+</span><span id="L-310"><a href="#L-310"><span class="linenos">310</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
+</span><span id="L-311"><a href="#L-311"><span class="linenos">311</span></a>
+</span><span id="L-312"><a href="#L-312"><span class="linenos">312</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="L-313"><a href="#L-313"><span class="linenos">313</span></a>
+</span><span id="L-314"><a href="#L-314"><span class="linenos">314</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
+</span><span id="L-315"><a href="#L-315"><span class="linenos">315</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-316"><a href="#L-316"><span class="linenos">316</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-317"><a href="#L-317"><span class="linenos">317</span></a>
+</span><span id="L-318"><a href="#L-318"><span class="linenos">318</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-319"><a href="#L-319"><span class="linenos">319</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-320"><a href="#L-320"><span class="linenos">320</span></a>
+</span><span id="L-321"><a href="#L-321"><span class="linenos">321</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="L-322"><a href="#L-322"><span class="linenos">322</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-323"><a href="#L-323"><span class="linenos">323</span></a> <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>
+</span><span id="L-324"><a href="#L-324"><span class="linenos">324</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
+</span><span id="L-325"><a href="#L-325"><span class="linenos">325</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
+</span><span id="L-326"><a href="#L-326"><span class="linenos">326</span></a> <span class="p">)</span>
</span><span id="L-327"><a href="#L-327"><span class="linenos">327</span></a>
-</span><span id="L-328"><a href="#L-328"><span class="linenos">328</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-329"><a href="#L-329"><span class="linenos">329</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-330"><a href="#L-330"><span class="linenos">330</span></a>
-</span><span id="L-331"><a href="#L-331"><span class="linenos">331</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
-</span><span id="L-332"><a href="#L-332"><span class="linenos">332</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-333"><a href="#L-333"><span class="linenos">333</span></a> <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>
-</span><span id="L-334"><a href="#L-334"><span class="linenos">334</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
-</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
-</span><span id="L-336"><a href="#L-336"><span class="linenos">336</span></a> <span class="p">)</span>
-</span><span id="L-337"><a href="#L-337"><span class="linenos">337</span></a>
-</span><span id="L-338"><a href="#L-338"><span class="linenos">338</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
-</span><span id="L-339"><a href="#L-339"><span class="linenos">339</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
-</span><span id="L-340"><a href="#L-340"><span class="linenos">340</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="L-341"><a href="#L-341"><span class="linenos">341</span></a> <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">DataType</span><span class="p">)</span>
-</span><span id="L-342"><a href="#L-342"><span class="linenos">342</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
-</span><span id="L-343"><a href="#L-343"><span class="linenos">343</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="L-344"><a href="#L-344"><span class="linenos">344</span></a> <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="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</span><span class="p">)</span>
+</span><span id="L-328"><a href="#L-328"><span class="linenos">328</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
+</span><span id="L-329"><a href="#L-329"><span class="linenos">329</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
+</span><span id="L-330"><a href="#L-330"><span class="linenos">330</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="L-331"><a href="#L-331"><span class="linenos">331</span></a> <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">DataType</span><span class="p">)</span>
+</span><span id="L-332"><a href="#L-332"><span class="linenos">332</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
+</span><span id="L-333"><a href="#L-333"><span class="linenos">333</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="L-334"><a href="#L-334"><span class="linenos">334</span></a> <span class="p">):</span>
+</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</span><span class="p">)</span>
+</span><span id="L-336"><a href="#L-336"><span class="linenos">336</span></a>
+</span><span id="L-337"><a href="#L-337"><span class="linenos">337</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="L-338"><a href="#L-338"><span class="linenos">338</span></a>
+</span><span id="L-339"><a href="#L-339"><span class="linenos">339</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>
+</span><span id="L-340"><a href="#L-340"><span class="linenos">340</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
+</span><span id="L-341"><a href="#L-341"><span class="linenos">341</span></a>
+</span><span id="L-342"><a href="#L-342"><span class="linenos">342</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
+</span><span id="L-343"><a href="#L-343"><span class="linenos">343</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+</span><span id="L-344"><a href="#L-344"><span class="linenos">344</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</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="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</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">return</span> <span class="n">this</span>
-</span><span id="L-348"><a href="#L-348"><span class="linenos">348</span></a>
-</span><span id="L-349"><a href="#L-349"><span class="linenos">349</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>
-</span><span id="L-350"><a href="#L-350"><span class="linenos">350</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
-</span><span id="L-351"><a href="#L-351"><span class="linenos">351</span></a>
-</span><span id="L-352"><a href="#L-352"><span class="linenos">352</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
-</span><span id="L-353"><a href="#L-353"><span class="linenos">353</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-</span><span id="L-354"><a href="#L-354"><span class="linenos">354</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span>
-</span><span id="L-355"><a href="#L-355"><span class="linenos">355</span></a> <span class="k">return</span> <span class="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</span><span class="p">)</span>
-</span><span id="L-356"><a href="#L-356"><span class="linenos">356</span></a>
-</span><span id="L-357"><a href="#L-357"><span class="linenos">357</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="L-358"><a href="#L-358"><span class="linenos">358</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="L-359"><a href="#L-359"><span class="linenos">359</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="L-360"><a href="#L-360"><span class="linenos">360</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-361"><a href="#L-361"><span class="linenos">361</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-362"><a href="#L-362"><span class="linenos">362</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-363"><a href="#L-363"><span class="linenos">363</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="L-364"><a href="#L-364"><span class="linenos">364</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="L-365"><a href="#L-365"><span class="linenos">365</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-366"><a href="#L-366"><span class="linenos">366</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-367"><a href="#L-367"><span class="linenos">367</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-368"><a href="#L-368"><span class="linenos">368</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
-</span><span id="L-369"><a href="#L-369"><span class="linenos">369</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
-</span><span id="L-370"><a href="#L-370"><span class="linenos">370</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-371"><a href="#L-371"><span class="linenos">371</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
-</span><span id="L-372"><a href="#L-372"><span class="linenos">372</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-373"><a href="#L-373"><span class="linenos">373</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-375"><a href="#L-375"><span class="linenos">375</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-377"><a href="#L-377"><span class="linenos">377</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-378"><a href="#L-378"><span class="linenos">378</span></a>
-</span><span id="L-379"><a href="#L-379"><span class="linenos">379</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="L-381"><a href="#L-381"><span class="linenos">381</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
-</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
-</span><span id="L-383"><a href="#L-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
-</span><span id="L-384"><a href="#L-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
-</span><span id="L-385"><a href="#L-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
-</span><span id="L-386"><a href="#L-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
-</span><span id="L-387"><a href="#L-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
-</span><span id="L-388"><a href="#L-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
-</span><span id="L-389"><a href="#L-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
-</span><span id="L-390"><a href="#L-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
-</span><span id="L-391"><a href="#L-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
-</span><span id="L-392"><a href="#L-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
-</span><span id="L-393"><a href="#L-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="L-394"><a href="#L-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
-</span><span id="L-395"><a href="#L-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
-</span><span id="L-396"><a href="#L-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="L-397"><a href="#L-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
-</span><span id="L-398"><a href="#L-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
-</span><span id="L-399"><a href="#L-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="L-400"><a href="#L-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
-</span><span id="L-401"><a href="#L-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="L-402"><a href="#L-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-403"><a href="#L-403"><span class="linenos">403</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="L-404"><a href="#L-404"><span class="linenos">404</span></a> <span class="p">),</span>
-</span><span id="L-405"><a href="#L-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
-</span><span id="L-406"><a href="#L-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-407"><a href="#L-407"><span class="linenos">407</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="L-408"><a href="#L-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="L-409"><a href="#L-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-410"><a href="#L-410"><span class="linenos">410</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="L-411"><a href="#L-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="L-412"><a href="#L-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
-</span><span id="L-413"><a href="#L-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
-</span><span id="L-414"><a href="#L-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
-</span><span id="L-415"><a href="#L-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
-</span><span id="L-416"><a href="#L-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="L-417"><a href="#L-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="L-418"><a href="#L-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
-</span><span id="L-419"><a href="#L-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
-</span><span id="L-420"><a href="#L-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
-</span><span id="L-421"><a href="#L-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-422"><a href="#L-422"><span class="linenos">422</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
-</span><span id="L-423"><a href="#L-423"><span class="linenos">423</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
-</span><span id="L-424"><a href="#L-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="L-425"><a href="#L-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="L-426"><a href="#L-426"><span class="linenos">426</span></a> <span class="p">),</span>
-</span><span id="L-427"><a href="#L-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
-</span><span id="L-428"><a href="#L-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_CONT&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
-</span><span id="L-429"><a href="#L-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_DISC&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
-</span><span id="L-430"><a href="#L-430"><span class="linenos">430</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
-</span><span id="L-431"><a href="#L-431"><span class="linenos">431</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
-</span><span id="L-432"><a href="#L-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
-</span><span id="L-433"><a href="#L-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
-</span><span id="L-434"><a href="#L-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-435"><a href="#L-435"><span class="linenos">435</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
-</span><span id="L-436"><a href="#L-436"><span class="linenos">436</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="L-437"><a href="#L-437"><span class="linenos">437</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
-</span><span id="L-438"><a href="#L-438"><span class="linenos">438</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
-</span><span id="L-439"><a href="#L-439"><span class="linenos">439</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
-</span><span id="L-440"><a href="#L-440"><span class="linenos">440</span></a> <span class="p">),</span>
-</span><span id="L-441"><a href="#L-441"><span class="linenos">441</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
-</span><span id="L-442"><a href="#L-442"><span class="linenos">442</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
-</span><span id="L-443"><a href="#L-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
-</span><span id="L-444"><a href="#L-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
-</span><span id="L-445"><a href="#L-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
-</span><span id="L-446"><a href="#L-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
-</span><span id="L-447"><a href="#L-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
-</span><span id="L-448"><a href="#L-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="L-449"><a href="#L-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
-</span><span id="L-450"><a href="#L-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
-</span><span id="L-452"><a href="#L-452"><span class="linenos">452</span></a> <span class="p">),</span>
-</span><span id="L-453"><a href="#L-453"><span class="linenos">453</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
-</span><span id="L-454"><a href="#L-454"><span class="linenos">454</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="L-455"><a href="#L-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
-</span><span id="L-456"><a href="#L-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-457"><a href="#L-457"><span class="linenos">457</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="L-458"><a href="#L-458"><span class="linenos">458</span></a> <span class="p">),</span>
-</span><span id="L-459"><a href="#L-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
-</span><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
-</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
-</span><span id="L-462"><a href="#L-462"><span class="linenos">462</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-463"><a href="#L-463"><span class="linenos">463</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
-</span><span id="L-464"><a href="#L-464"><span class="linenos">464</span></a> <span class="p">),</span>
-</span><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
-</span><span id="L-466"><a href="#L-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
-</span><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-468"><a href="#L-468"><span class="linenos">468</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
-</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
-</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
-</span><span id="L-473"><a href="#L-473"><span class="linenos">473</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="L-474"><a href="#L-474"><span class="linenos">474</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="L-475"><a href="#L-475"><span class="linenos">475</span></a> <span class="p">),</span>
-</span><span id="L-476"><a href="#L-476"><span class="linenos">476</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="L-477"><a href="#L-477"><span class="linenos">477</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
-</span><span id="L-478"><a href="#L-478"><span class="linenos">478</span></a> <span class="p">),</span>
-</span><span id="L-479"><a href="#L-479"><span class="linenos">479</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
-</span><span id="L-480"><a href="#L-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
-</span><span id="L-481"><a href="#L-481"><span class="linenos">481</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
-</span><span id="L-482"><a href="#L-482"><span class="linenos">482</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
-</span><span id="L-484"><a href="#L-484"><span class="linenos">484</span></a> <span class="p">}</span>
-</span><span id="L-485"><a href="#L-485"><span class="linenos">485</span></a>
-</span><span id="L-486"><a href="#L-486"><span class="linenos">486</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-487"><a href="#L-487"><span class="linenos">487</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
-</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
-</span><span id="L-489"><a href="#L-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
-</span><span id="L-490"><a href="#L-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
-</span><span id="L-491"><a href="#L-491"><span class="linenos">491</span></a> <span class="p">}</span>
-</span><span id="L-492"><a href="#L-492"><span class="linenos">492</span></a>
-</span><span id="L-493"><a href="#L-493"><span class="linenos">493</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-494"><a href="#L-494"><span class="linenos">494</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
-</span><span id="L-495"><a href="#L-495"><span class="linenos">495</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
-</span><span id="L-496"><a href="#L-496"><span class="linenos">496</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="L-497"><a href="#L-497"><span class="linenos">497</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
-</span><span id="L-498"><a href="#L-498"><span class="linenos">498</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="L-499"><a href="#L-499"><span class="linenos">499</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="L-500"><a href="#L-500"><span class="linenos">500</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
-</span><span id="L-501"><a href="#L-501"><span class="linenos">501</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-502"><a href="#L-502"><span class="linenos">502</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-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">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&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">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&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">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
-</span><span id="L-506"><a href="#L-506"><span class="linenos">506</span></a> <span class="p">}</span>
-</span><span id="L-507"><a href="#L-507"><span class="linenos">507</span></a>
-</span><span id="L-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+</span><span id="L-347"><a href="#L-347"><span class="linenos">347</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="L-348"><a href="#L-348"><span class="linenos">348</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="L-349"><a href="#L-349"><span class="linenos">349</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="L-350"><a href="#L-350"><span class="linenos">350</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-351"><a href="#L-351"><span class="linenos">351</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-352"><a href="#L-352"><span class="linenos">352</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-353"><a href="#L-353"><span class="linenos">353</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="L-354"><a href="#L-354"><span class="linenos">354</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="L-355"><a href="#L-355"><span class="linenos">355</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-356"><a href="#L-356"><span class="linenos">356</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-357"><a href="#L-357"><span class="linenos">357</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-358"><a href="#L-358"><span class="linenos">358</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
+</span><span id="L-359"><a href="#L-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
+</span><span id="L-360"><a href="#L-360"><span class="linenos">360</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-361"><a href="#L-361"><span class="linenos">361</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
+</span><span id="L-362"><a href="#L-362"><span class="linenos">362</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-363"><a href="#L-363"><span class="linenos">363</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-364"><a href="#L-364"><span class="linenos">364</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-365"><a href="#L-365"><span class="linenos">365</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-366"><a href="#L-366"><span class="linenos">366</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="L-367"><a href="#L-367"><span class="linenos">367</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-368"><a href="#L-368"><span class="linenos">368</span></a>
+</span><span id="L-369"><a href="#L-369"><span class="linenos">369</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-370"><a href="#L-370"><span class="linenos">370</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
+</span><span id="L-371"><a href="#L-371"><span class="linenos">371</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
+</span><span id="L-372"><a href="#L-372"><span class="linenos">372</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
+</span><span id="L-373"><a href="#L-373"><span class="linenos">373</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
+</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
+</span><span id="L-375"><a href="#L-375"><span class="linenos">375</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
+</span><span id="L-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
+</span><span id="L-377"><a href="#L-377"><span class="linenos">377</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
+</span><span id="L-378"><a href="#L-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
+</span><span id="L-379"><a href="#L-379"><span class="linenos">379</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
+</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
+</span><span id="L-381"><a href="#L-381"><span class="linenos">381</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
+</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
+</span><span id="L-383"><a href="#L-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="L-384"><a href="#L-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
+</span><span id="L-385"><a href="#L-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
+</span><span id="L-386"><a href="#L-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="L-387"><a href="#L-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
+</span><span id="L-388"><a href="#L-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
+</span><span id="L-389"><a href="#L-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="L-390"><a href="#L-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
+</span><span id="L-391"><a href="#L-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="L-392"><a href="#L-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-393"><a href="#L-393"><span class="linenos">393</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="L-394"><a href="#L-394"><span class="linenos">394</span></a> <span class="p">),</span>
+</span><span id="L-395"><a href="#L-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
+</span><span id="L-396"><a href="#L-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-397"><a href="#L-397"><span class="linenos">397</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="L-398"><a href="#L-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="L-399"><a href="#L-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-400"><a href="#L-400"><span class="linenos">400</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="L-401"><a href="#L-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="L-402"><a href="#L-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
+</span><span id="L-403"><a href="#L-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
+</span><span id="L-404"><a href="#L-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
+</span><span id="L-405"><a href="#L-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
+</span><span id="L-406"><a href="#L-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="L-407"><a href="#L-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="L-408"><a href="#L-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
+</span><span id="L-409"><a href="#L-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
+</span><span id="L-410"><a href="#L-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
+</span><span id="L-411"><a href="#L-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-412"><a href="#L-412"><span class="linenos">412</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
+</span><span id="L-413"><a href="#L-413"><span class="linenos">413</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
+</span><span id="L-414"><a href="#L-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="L-415"><a href="#L-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="L-416"><a href="#L-416"><span class="linenos">416</span></a> <span class="p">),</span>
+</span><span id="L-417"><a href="#L-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
+</span><span id="L-418"><a href="#L-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
+</span><span id="L-419"><a href="#L-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
+</span><span id="L-420"><a href="#L-420"><span class="linenos">420</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
+</span><span id="L-421"><a href="#L-421"><span class="linenos">421</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
+</span><span id="L-422"><a href="#L-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
+</span><span id="L-423"><a href="#L-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
+</span><span id="L-424"><a href="#L-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-425"><a href="#L-425"><span class="linenos">425</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
+</span><span id="L-426"><a href="#L-426"><span class="linenos">426</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="L-427"><a href="#L-427"><span class="linenos">427</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
+</span><span id="L-428"><a href="#L-428"><span class="linenos">428</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
+</span><span id="L-429"><a href="#L-429"><span class="linenos">429</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
+</span><span id="L-430"><a href="#L-430"><span class="linenos">430</span></a> <span class="p">),</span>
+</span><span id="L-431"><a href="#L-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
+</span><span id="L-432"><a href="#L-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
+</span><span id="L-433"><a href="#L-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
+</span><span id="L-434"><a href="#L-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
+</span><span id="L-435"><a href="#L-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
+</span><span id="L-436"><a href="#L-436"><span class="linenos">436</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
+</span><span id="L-437"><a href="#L-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
+</span><span id="L-438"><a href="#L-438"><span class="linenos">438</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="L-439"><a href="#L-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
+</span><span id="L-440"><a href="#L-440"><span class="linenos">440</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-441"><a href="#L-441"><span class="linenos">441</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
+</span><span id="L-442"><a href="#L-442"><span class="linenos">442</span></a> <span class="p">),</span>
+</span><span id="L-443"><a href="#L-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
+</span><span id="L-444"><a href="#L-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="L-445"><a href="#L-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
+</span><span id="L-446"><a href="#L-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-447"><a href="#L-447"><span class="linenos">447</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="L-448"><a href="#L-448"><span class="linenos">448</span></a> <span class="p">),</span>
+</span><span id="L-449"><a href="#L-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
+</span><span id="L-450"><a href="#L-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
+</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
+</span><span id="L-452"><a href="#L-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-453"><a href="#L-453"><span class="linenos">453</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
+</span><span id="L-454"><a href="#L-454"><span class="linenos">454</span></a> <span class="p">),</span>
+</span><span id="L-455"><a href="#L-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
+</span><span id="L-456"><a href="#L-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
+</span><span id="L-457"><a href="#L-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-458"><a href="#L-458"><span class="linenos">458</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="L-459"><a href="#L-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
+</span><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
+</span><span id="L-462"><a href="#L-462"><span class="linenos">462</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
+</span><span id="L-463"><a href="#L-463"><span class="linenos">463</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="L-464"><a href="#L-464"><span class="linenos">464</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="p">),</span>
+</span><span id="L-466"><a href="#L-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</span><span id="L-468"><a href="#L-468"><span class="linenos">468</span></a> <span class="p">),</span>
+</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
+</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
+</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
+</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="L-473"><a href="#L-473"><span class="linenos">473</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
+</span><span id="L-474"><a href="#L-474"><span class="linenos">474</span></a> <span class="p">}</span>
+</span><span id="L-475"><a href="#L-475"><span class="linenos">475</span></a>
+</span><span id="L-476"><a href="#L-476"><span class="linenos">476</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-477"><a href="#L-477"><span class="linenos">477</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
+</span><span id="L-478"><a href="#L-478"><span class="linenos">478</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
+</span><span id="L-479"><a href="#L-479"><span class="linenos">479</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
+</span><span id="L-480"><a href="#L-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
+</span><span id="L-481"><a href="#L-481"><span class="linenos">481</span></a> <span class="p">}</span>
+</span><span id="L-482"><a href="#L-482"><span class="linenos">482</span></a>
+</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-484"><a href="#L-484"><span class="linenos">484</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
+</span><span id="L-485"><a href="#L-485"><span class="linenos">485</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
+</span><span id="L-486"><a href="#L-486"><span class="linenos">486</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="L-487"><a href="#L-487"><span class="linenos">487</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
+</span><span id="L-488"><a href="#L-488"><span class="linenos">488</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="L-489"><a href="#L-489"><span class="linenos">489</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="L-490"><a href="#L-490"><span class="linenos">490</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
+</span><span id="L-491"><a href="#L-491"><span class="linenos">491</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-492"><a href="#L-492"><span class="linenos">492</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-493"><a href="#L-493"><span class="linenos">493</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-494"><a href="#L-494"><span class="linenos">494</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-495"><a href="#L-495"><span class="linenos">495</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-496"><a href="#L-496"><span class="linenos">496</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-497"><a href="#L-497"><span class="linenos">497</span></a> <span class="p">}</span>
+</span><span id="L-498"><a href="#L-498"><span class="linenos">498</span></a>
+</span><span id="L-499"><a href="#L-499"><span class="linenos">499</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+</span><span id="L-500"><a href="#L-500"><span class="linenos">500</span></a>
+</span><span id="L-501"><a href="#L-501"><span class="linenos">501</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-502"><a href="#L-502"><span class="linenos">502</span></a>
+</span><span id="L-503"><a href="#L-503"><span class="linenos">503</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="L-504"><a href="#L-504"><span class="linenos">504</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="L-505"><a href="#L-505"><span class="linenos">505</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-506"><a href="#L-506"><span class="linenos">506</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-507"><a href="#L-507"><span class="linenos">507</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-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="p">}</span>
</span><span id="L-509"><a href="#L-509"><span class="linenos">509</span></a>
-</span><span id="L-510"><a href="#L-510"><span class="linenos">510</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-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"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="L-513"><a href="#L-513"><span class="linenos">513</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="L-514"><a href="#L-514"><span class="linenos">514</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-515"><a href="#L-515"><span class="linenos">515</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-516"><a href="#L-516"><span class="linenos">516</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-517"><a href="#L-517"><span class="linenos">517</span></a> <span class="p">}</span>
-</span><span id="L-518"><a href="#L-518"><span class="linenos">518</span></a>
-</span><span id="L-519"><a href="#L-519"><span class="linenos">519</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
-</span><span id="L-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
-</span><span id="L-521"><a href="#L-521"><span class="linenos">521</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-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">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-510"><a href="#L-510"><span class="linenos">510</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="L-511"><a href="#L-511"><span class="linenos">511</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="L-512"><a href="#L-512"><span class="linenos">512</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-513"><a href="#L-513"><span class="linenos">513</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-514"><a href="#L-514"><span class="linenos">514</span></a>
+</span><span id="L-515"><a href="#L-515"><span class="linenos">515</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-516"><a href="#L-516"><span class="linenos">516</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-517"><a href="#L-517"><span class="linenos">517</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-518"><a href="#L-518"><span class="linenos">518</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="L-519"><a href="#L-519"><span class="linenos">519</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-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="p">)</span>
+</span><span id="L-521"><a href="#L-521"><span class="linenos">521</span></a>
+</span><span id="L-522"><a href="#L-522"><span class="linenos">522</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-523"><a href="#L-523"><span class="linenos">523</span></a>
-</span><span id="L-524"><a href="#L-524"><span class="linenos">524</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-525"><a href="#L-525"><span class="linenos">525</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-526"><a href="#L-526"><span class="linenos">526</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-527"><a href="#L-527"><span class="linenos">527</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-</span><span id="L-528"><a href="#L-528"><span class="linenos">528</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-529"><a href="#L-529"><span class="linenos">529</span></a> <span class="p">)</span>
+</span><span id="L-524"><a href="#L-524"><span class="linenos">524</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-525"><a href="#L-525"><span class="linenos">525</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-526"><a href="#L-526"><span class="linenos">526</span></a>
+</span><span id="L-527"><a href="#L-527"><span class="linenos">527</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-528"><a href="#L-528"><span class="linenos">528</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-529"><a href="#L-529"><span class="linenos">529</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-530"><a href="#L-530"><span class="linenos">530</span></a>
-</span><span id="L-531"><a href="#L-531"><span class="linenos">531</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-532"><a href="#L-532"><span class="linenos">532</span></a>
-</span><span id="L-533"><a href="#L-533"><span class="linenos">533</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-534"><a href="#L-534"><span class="linenos">534</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-535"><a href="#L-535"><span class="linenos">535</span></a>
-</span><span id="L-536"><a href="#L-536"><span class="linenos">536</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-537"><a href="#L-537"><span class="linenos">537</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-538"><a href="#L-538"><span class="linenos">538</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-531"><a href="#L-531"><span class="linenos">531</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-532"><a href="#L-532"><span class="linenos">532</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-533"><a href="#L-533"><span class="linenos">533</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-534"><a href="#L-534"><span class="linenos">534</span></a>
+</span><span id="L-535"><a href="#L-535"><span class="linenos">535</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-536"><a href="#L-536"><span class="linenos">536</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-537"><a href="#L-537"><span class="linenos">537</span></a>
+</span><span id="L-538"><a href="#L-538"><span class="linenos">538</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-539"><a href="#L-539"><span class="linenos">539</span></a>
-</span><span id="L-540"><a href="#L-540"><span class="linenos">540</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-541"><a href="#L-541"><span class="linenos">541</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-542"><a href="#L-542"><span class="linenos">542</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-543"><a href="#L-543"><span class="linenos">543</span></a>
-</span><span id="L-544"><a href="#L-544"><span class="linenos">544</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-545"><a href="#L-545"><span class="linenos">545</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-546"><a href="#L-546"><span class="linenos">546</span></a>
-</span><span id="L-547"><a href="#L-547"><span class="linenos">547</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-548"><a href="#L-548"><span class="linenos">548</span></a>
-</span><span id="L-549"><a href="#L-549"><span class="linenos">549</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
-</span><span id="L-550"><a href="#L-550"><span class="linenos">550</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-551"><a href="#L-551"><span class="linenos">551</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-552"><a href="#L-552"><span class="linenos">552</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-553"><a href="#L-553"><span class="linenos">553</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-554"><a href="#L-554"><span class="linenos">554</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-555"><a href="#L-555"><span class="linenos">555</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-556"><a href="#L-556"><span class="linenos">556</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
-</span><span id="L-557"><a href="#L-557"><span class="linenos">557</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</span>
-</span><span id="L-558"><a href="#L-558"><span class="linenos">558</span></a>
-</span><span id="L-559"><a href="#L-559"><span class="linenos">559</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-560"><a href="#L-560"><span class="linenos">560</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-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="p">)</span>
+</span><span id="L-540"><a href="#L-540"><span class="linenos">540</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="L-541"><a href="#L-541"><span class="linenos">541</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-542"><a href="#L-542"><span class="linenos">542</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-543"><a href="#L-543"><span class="linenos">543</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-544"><a href="#L-544"><span class="linenos">544</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-545"><a href="#L-545"><span class="linenos">545</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-546"><a href="#L-546"><span class="linenos">546</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-547"><a href="#L-547"><span class="linenos">547</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="L-548"><a href="#L-548"><span class="linenos">548</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</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">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-551"><a href="#L-551"><span class="linenos">551</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-552"><a href="#L-552"><span class="linenos">552</span></a> <span class="p">)</span>
+</span><span id="L-553"><a href="#L-553"><span class="linenos">553</span></a>
+</span><span id="L-554"><a href="#L-554"><span class="linenos">554</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-555"><a href="#L-555"><span class="linenos">555</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-556"><a href="#L-556"><span class="linenos">556</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-557"><a href="#L-557"><span class="linenos">557</span></a>
+</span><span id="L-558"><a href="#L-558"><span class="linenos">558</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-559"><a href="#L-559"><span class="linenos">559</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="L-560"><a href="#L-560"><span class="linenos">560</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-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
</span><span id="L-562"><a href="#L-562"><span class="linenos">562</span></a>
-</span><span id="L-563"><a href="#L-563"><span class="linenos">563</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-564"><a href="#L-564"><span class="linenos">564</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-565"><a href="#L-565"><span class="linenos">565</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-566"><a href="#L-566"><span class="linenos">566</span></a>
-</span><span id="L-567"><a href="#L-567"><span class="linenos">567</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-568"><a href="#L-568"><span class="linenos">568</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="L-569"><a href="#L-569"><span class="linenos">569</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-570"><a href="#L-570"><span class="linenos">570</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="L-571"><a href="#L-571"><span class="linenos">571</span></a>
-</span><span id="L-572"><a href="#L-572"><span class="linenos">572</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="L-573"><a href="#L-573"><span class="linenos">573</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-574"><a href="#L-574"><span class="linenos">574</span></a>
-</span><span id="L-575"><a href="#L-575"><span class="linenos">575</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-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">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-578"><a href="#L-578"><span class="linenos">578</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-579"><a href="#L-579"><span class="linenos">579</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-580"><a href="#L-580"><span class="linenos">580</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-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">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-583"><a href="#L-583"><span class="linenos">583</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="L-584"><a href="#L-584"><span class="linenos">584</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-585"><a href="#L-585"><span class="linenos">585</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-586"><a href="#L-586"><span class="linenos">586</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-587"><a href="#L-587"><span class="linenos">587</span></a> <span class="p">):</span>
-</span><span id="L-588"><a href="#L-588"><span class="linenos">588</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="L-589"><a href="#L-589"><span class="linenos">589</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-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">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-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">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-593"><a href="#L-593"><span class="linenos">593</span></a>
-</span><span id="L-594"><a href="#L-594"><span class="linenos">594</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-595"><a href="#L-595"><span class="linenos">595</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="L-596"><a href="#L-596"><span class="linenos">596</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-597"><a href="#L-597"><span class="linenos">597</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-598"><a href="#L-598"><span class="linenos">598</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-563"><a href="#L-563"><span class="linenos">563</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="L-564"><a href="#L-564"><span class="linenos">564</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-565"><a href="#L-565"><span class="linenos">565</span></a>
+</span><span id="L-566"><a href="#L-566"><span class="linenos">566</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-567"><a href="#L-567"><span class="linenos">567</span></a>
+</span><span id="L-568"><a href="#L-568"><span class="linenos">568</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-569"><a href="#L-569"><span class="linenos">569</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-570"><a href="#L-570"><span class="linenos">570</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-571"><a href="#L-571"><span class="linenos">571</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-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">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-574"><a href="#L-574"><span class="linenos">574</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="L-575"><a href="#L-575"><span class="linenos">575</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-576"><a href="#L-576"><span class="linenos">576</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-577"><a href="#L-577"><span class="linenos">577</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-578"><a href="#L-578"><span class="linenos">578</span></a> <span class="p">):</span>
+</span><span id="L-579"><a href="#L-579"><span class="linenos">579</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="L-580"><a href="#L-580"><span class="linenos">580</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-581"><a href="#L-581"><span class="linenos">581</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-582"><a href="#L-582"><span class="linenos">582</span></a>
+</span><span id="L-583"><a href="#L-583"><span class="linenos">583</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-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">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-586"><a href="#L-586"><span class="linenos">586</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="L-587"><a href="#L-587"><span class="linenos">587</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-588"><a href="#L-588"><span class="linenos">588</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-589"><a href="#L-589"><span class="linenos">589</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-590"><a href="#L-590"><span class="linenos">590</span></a>
+</span><span id="L-591"><a href="#L-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">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><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="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-594"><a href="#L-594"><span class="linenos">594</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-595"><a href="#L-595"><span class="linenos">595</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-596"><a href="#L-596"><span class="linenos">596</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-597"><a href="#L-597"><span class="linenos">597</span></a>
+</span><span id="L-598"><a href="#L-598"><span class="linenos">598</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-599"><a href="#L-599"><span class="linenos">599</span></a>
-</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">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><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">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-603"><a href="#L-603"><span class="linenos">603</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-604"><a href="#L-604"><span class="linenos">604</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-605"><a href="#L-605"><span class="linenos">605</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-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="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-600"><a href="#L-600"><span class="linenos">600</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-601"><a href="#L-601"><span class="linenos">601</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-602"><a href="#L-602"><span class="linenos">602</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-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="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-605"><a href="#L-605"><span class="linenos">605</span></a>
+</span><span id="L-606"><a href="#L-606"><span class="linenos">606</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-607"><a href="#L-607"><span class="linenos">607</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-608"><a href="#L-608"><span class="linenos">608</span></a>
-</span><span id="L-609"><a href="#L-609"><span class="linenos">609</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-610"><a href="#L-610"><span class="linenos">610</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-611"><a href="#L-611"><span class="linenos">611</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-612"><a href="#L-612"><span class="linenos">612</span></a>
-</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">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="L-614"><a href="#L-614"><span class="linenos">614</span></a>
-</span><span id="L-615"><a href="#L-615"><span class="linenos">615</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-616"><a href="#L-616"><span class="linenos">616</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-617"><a href="#L-617"><span class="linenos">617</span></a>
-</span><span id="L-618"><a href="#L-618"><span class="linenos">618</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="L-609"><a href="#L-609"><span class="linenos">609</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="L-610"><a href="#L-610"><span class="linenos">610</span></a>
+</span><span id="L-611"><a href="#L-611"><span class="linenos">611</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-612"><a href="#L-612"><span class="linenos">612</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-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="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-615"><a href="#L-615"><span class="linenos">615</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-616"><a href="#L-616"><span class="linenos">616</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="L-617"><a href="#L-617"><span class="linenos">617</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="L-618"><a href="#L-618"><span class="linenos">618</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-619"><a href="#L-619"><span class="linenos">619</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="L-620"><a href="#L-620"><span class="linenos">620</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-621"><a href="#L-621"><span class="linenos">621</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-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="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-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">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>
@@ -941,457 +951,474 @@
</div>
<a class="headerlink" href="#DuckDB"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB-169"><a href="#DuckDB-169"><span class="linenos">169</span></a><span class="k">class</span> <span class="nc">DuckDB</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span>
-</span><span id="DuckDB-170"><a href="#DuckDB-170"><span class="linenos">170</span></a> <span class="n">NULL_ORDERING</span> <span class="o">=</span> <span class="s2">&quot;nulls_are_last&quot;</span>
-</span><span id="DuckDB-171"><a href="#DuckDB-171"><span class="linenos">171</span></a> <span class="n">SUPPORTS_USER_DEFINED_TYPES</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-172"><a href="#DuckDB-172"><span class="linenos">172</span></a> <span class="n">SAFE_DIVISION</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-173"><a href="#DuckDB-173"><span class="linenos">173</span></a> <span class="n">INDEX_OFFSET</span> <span class="o">=</span> <span class="mi">1</span>
-</span><span id="DuckDB-174"><a href="#DuckDB-174"><span class="linenos">174</span></a> <span class="n">CONCAT_COALESCE</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-175"><a href="#DuckDB-175"><span class="linenos">175</span></a>
-</span><span id="DuckDB-176"><a href="#DuckDB-176"><span class="linenos">176</span></a> <span class="c1"># https://duckdb.org/docs/sql/introduction.html#creating-a-new-table</span>
-</span><span id="DuckDB-177"><a href="#DuckDB-177"><span class="linenos">177</span></a> <span class="n">NORMALIZATION_STRATEGY</span> <span class="o">=</span> <span class="n">NormalizationStrategy</span><span class="o">.</span><span class="n">CASE_INSENSITIVE</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB-159"><a href="#DuckDB-159"><span class="linenos">159</span></a><span class="k">class</span> <span class="nc">DuckDB</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span>
+</span><span id="DuckDB-160"><a href="#DuckDB-160"><span class="linenos">160</span></a> <span class="n">NULL_ORDERING</span> <span class="o">=</span> <span class="s2">&quot;nulls_are_last&quot;</span>
+</span><span id="DuckDB-161"><a href="#DuckDB-161"><span class="linenos">161</span></a> <span class="n">SUPPORTS_USER_DEFINED_TYPES</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-162"><a href="#DuckDB-162"><span class="linenos">162</span></a> <span class="n">SAFE_DIVISION</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-163"><a href="#DuckDB-163"><span class="linenos">163</span></a> <span class="n">INDEX_OFFSET</span> <span class="o">=</span> <span class="mi">1</span>
+</span><span id="DuckDB-164"><a href="#DuckDB-164"><span class="linenos">164</span></a> <span class="n">CONCAT_COALESCE</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-165"><a href="#DuckDB-165"><span class="linenos">165</span></a>
+</span><span id="DuckDB-166"><a href="#DuckDB-166"><span class="linenos">166</span></a> <span class="c1"># https://duckdb.org/docs/sql/introduction.html#creating-a-new-table</span>
+</span><span id="DuckDB-167"><a href="#DuckDB-167"><span class="linenos">167</span></a> <span class="n">NORMALIZATION_STRATEGY</span> <span class="o">=</span> <span class="n">NormalizationStrategy</span><span class="o">.</span><span class="n">CASE_INSENSITIVE</span>
+</span><span id="DuckDB-168"><a href="#DuckDB-168"><span class="linenos">168</span></a>
+</span><span id="DuckDB-169"><a href="#DuckDB-169"><span class="linenos">169</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
+</span><span id="DuckDB-170"><a href="#DuckDB-170"><span class="linenos">170</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
+</span><span id="DuckDB-171"><a href="#DuckDB-171"><span class="linenos">171</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
+</span><span id="DuckDB-172"><a href="#DuckDB-172"><span class="linenos">172</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
+</span><span id="DuckDB-173"><a href="#DuckDB-173"><span class="linenos">173</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
+</span><span id="DuckDB-174"><a href="#DuckDB-174"><span class="linenos">174</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
+</span><span id="DuckDB-175"><a href="#DuckDB-175"><span class="linenos">175</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
+</span><span id="DuckDB-176"><a href="#DuckDB-176"><span class="linenos">176</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
+</span><span id="DuckDB-177"><a href="#DuckDB-177"><span class="linenos">177</span></a> <span class="k">return</span> <span class="n">path</span>
</span><span id="DuckDB-178"><a href="#DuckDB-178"><span class="linenos">178</span></a>
-</span><span id="DuckDB-179"><a href="#DuckDB-179"><span class="linenos">179</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
-</span><span id="DuckDB-180"><a href="#DuckDB-180"><span class="linenos">180</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
-</span><span id="DuckDB-181"><a href="#DuckDB-181"><span class="linenos">181</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
-</span><span id="DuckDB-182"><a href="#DuckDB-182"><span class="linenos">182</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
-</span><span id="DuckDB-183"><a href="#DuckDB-183"><span class="linenos">183</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
-</span><span id="DuckDB-184"><a href="#DuckDB-184"><span class="linenos">184</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
-</span><span id="DuckDB-185"><a href="#DuckDB-185"><span class="linenos">185</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
-</span><span id="DuckDB-186"><a href="#DuckDB-186"><span class="linenos">186</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
-</span><span id="DuckDB-187"><a href="#DuckDB-187"><span class="linenos">187</span></a> <span class="k">return</span> <span class="n">path</span>
-</span><span id="DuckDB-188"><a href="#DuckDB-188"><span class="linenos">188</span></a>
-</span><span id="DuckDB-189"><a href="#DuckDB-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
-</span><span id="DuckDB-190"><a href="#DuckDB-190"><span class="linenos">190</span></a>
-</span><span id="DuckDB-191"><a href="#DuckDB-191"><span class="linenos">191</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
-</span><span id="DuckDB-192"><a href="#DuckDB-192"><span class="linenos">192</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
-</span><span id="DuckDB-193"><a href="#DuckDB-193"><span class="linenos">193</span></a>
-</span><span id="DuckDB-194"><a href="#DuckDB-194"><span class="linenos">194</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-195"><a href="#DuckDB-195"><span class="linenos">195</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
-</span><span id="DuckDB-196"><a href="#DuckDB-196"><span class="linenos">196</span></a>
-</span><span id="DuckDB-197"><a href="#DuckDB-197"><span class="linenos">197</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-198"><a href="#DuckDB-198"><span class="linenos">198</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
-</span><span id="DuckDB-199"><a href="#DuckDB-199"><span class="linenos">199</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
-</span><span id="DuckDB-200"><a href="#DuckDB-200"><span class="linenos">200</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
-</span><span id="DuckDB-201"><a href="#DuckDB-201"><span class="linenos">201</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
-</span><span id="DuckDB-202"><a href="#DuckDB-202"><span class="linenos">202</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
-</span><span id="DuckDB-203"><a href="#DuckDB-203"><span class="linenos">203</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB-204"><a href="#DuckDB-204"><span class="linenos">204</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB-205"><a href="#DuckDB-205"><span class="linenos">205</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB-206"><a href="#DuckDB-206"><span class="linenos">206</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
-</span><span id="DuckDB-207"><a href="#DuckDB-207"><span class="linenos">207</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
-</span><span id="DuckDB-208"><a href="#DuckDB-208"><span class="linenos">208</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
-</span><span id="DuckDB-209"><a href="#DuckDB-209"><span class="linenos">209</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
-</span><span id="DuckDB-210"><a href="#DuckDB-210"><span class="linenos">210</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
-</span><span id="DuckDB-211"><a href="#DuckDB-211"><span class="linenos">211</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
-</span><span id="DuckDB-212"><a href="#DuckDB-212"><span class="linenos">212</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
-</span><span id="DuckDB-213"><a href="#DuckDB-213"><span class="linenos">213</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
-</span><span id="DuckDB-214"><a href="#DuckDB-214"><span class="linenos">214</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
-</span><span id="DuckDB-215"><a href="#DuckDB-215"><span class="linenos">215</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
-</span><span id="DuckDB-216"><a href="#DuckDB-216"><span class="linenos">216</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
-</span><span id="DuckDB-217"><a href="#DuckDB-217"><span class="linenos">217</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
-</span><span id="DuckDB-218"><a href="#DuckDB-218"><span class="linenos">218</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
-</span><span id="DuckDB-219"><a href="#DuckDB-219"><span class="linenos">219</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
-</span><span id="DuckDB-220"><a href="#DuckDB-220"><span class="linenos">220</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
-</span><span id="DuckDB-221"><a href="#DuckDB-221"><span class="linenos">221</span></a> <span class="p">}</span>
-</span><span id="DuckDB-222"><a href="#DuckDB-222"><span class="linenos">222</span></a>
-</span><span id="DuckDB-223"><a href="#DuckDB-223"><span class="linenos">223</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-224"><a href="#DuckDB-224"><span class="linenos">224</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
-</span><span id="DuckDB-225"><a href="#DuckDB-225"><span class="linenos">225</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
-</span><span id="DuckDB-226"><a href="#DuckDB-226"><span class="linenos">226</span></a> <span class="p">}</span>
-</span><span id="DuckDB-227"><a href="#DuckDB-227"><span class="linenos">227</span></a>
-</span><span id="DuckDB-228"><a href="#DuckDB-228"><span class="linenos">228</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
-</span><span id="DuckDB-229"><a href="#DuckDB-229"><span class="linenos">229</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-230"><a href="#DuckDB-230"><span class="linenos">230</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
-</span><span id="DuckDB-231"><a href="#DuckDB-231"><span class="linenos">231</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
-</span><span id="DuckDB-232"><a href="#DuckDB-232"><span class="linenos">232</span></a> <span class="p">}</span>
-</span><span id="DuckDB-233"><a href="#DuckDB-233"><span class="linenos">233</span></a>
-</span><span id="DuckDB-234"><a href="#DuckDB-234"><span class="linenos">234</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
-</span><span id="DuckDB-235"><a href="#DuckDB-235"><span class="linenos">235</span></a>
-</span><span id="DuckDB-236"><a href="#DuckDB-236"><span class="linenos">236</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-237"><a href="#DuckDB-237"><span class="linenos">237</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
-</span><span id="DuckDB-238"><a href="#DuckDB-238"><span class="linenos">238</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-239"><a href="#DuckDB-239"><span class="linenos">239</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="DuckDB-240"><a href="#DuckDB-240"><span class="linenos">240</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-241"><a href="#DuckDB-241"><span class="linenos">241</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="DuckDB-242"><a href="#DuckDB-242"><span class="linenos">242</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="DuckDB-243"><a href="#DuckDB-243"><span class="linenos">243</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="DuckDB-244"><a href="#DuckDB-244"><span class="linenos">244</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="DuckDB-245"><a href="#DuckDB-245"><span class="linenos">245</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
-</span><span id="DuckDB-246"><a href="#DuckDB-246"><span class="linenos">246</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-247"><a href="#DuckDB-247"><span class="linenos">247</span></a> <span class="p">),</span>
-</span><span id="DuckDB-248"><a href="#DuckDB-248"><span class="linenos">248</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
-</span><span id="DuckDB-249"><a href="#DuckDB-249"><span class="linenos">249</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-250"><a href="#DuckDB-250"><span class="linenos">250</span></a> <span class="p">),</span>
-</span><span id="DuckDB-251"><a href="#DuckDB-251"><span class="linenos">251</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-252"><a href="#DuckDB-252"><span class="linenos">252</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
-</span><span id="DuckDB-253"><a href="#DuckDB-253"><span class="linenos">253</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
-</span><span id="DuckDB-254"><a href="#DuckDB-254"><span class="linenos">254</span></a> <span class="p">),</span>
-</span><span id="DuckDB-255"><a href="#DuckDB-255"><span class="linenos">255</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-256"><a href="#DuckDB-256"><span class="linenos">256</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
-</span><span id="DuckDB-257"><a href="#DuckDB-257"><span class="linenos">257</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
-</span><span id="DuckDB-258"><a href="#DuckDB-258"><span class="linenos">258</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-259"><a href="#DuckDB-259"><span class="linenos">259</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="DuckDB-260"><a href="#DuckDB-260"><span class="linenos">260</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-261"><a href="#DuckDB-261"><span class="linenos">261</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-262"><a href="#DuckDB-262"><span class="linenos">262</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-263"><a href="#DuckDB-263"><span class="linenos">263</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
-</span><span id="DuckDB-264"><a href="#DuckDB-264"><span class="linenos">264</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
-</span><span id="DuckDB-265"><a href="#DuckDB-265"><span class="linenos">265</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
-</span><span id="DuckDB-266"><a href="#DuckDB-266"><span class="linenos">266</span></a> <span class="p">),</span>
-</span><span id="DuckDB-267"><a href="#DuckDB-267"><span class="linenos">267</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-268"><a href="#DuckDB-268"><span class="linenos">268</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-269"><a href="#DuckDB-269"><span class="linenos">269</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
-</span><span id="DuckDB-270"><a href="#DuckDB-270"><span class="linenos">270</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
-</span><span id="DuckDB-271"><a href="#DuckDB-271"><span class="linenos">271</span></a> <span class="p">),</span>
-</span><span id="DuckDB-272"><a href="#DuckDB-272"><span class="linenos">272</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-273"><a href="#DuckDB-273"><span class="linenos">273</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
-</span><span id="DuckDB-274"><a href="#DuckDB-274"><span class="linenos">274</span></a> <span class="n">this</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><span id="DuckDB-275"><a href="#DuckDB-275"><span class="linenos">275</span></a> <span class="n">expression</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-276"><a href="#DuckDB-276"><span class="linenos">276</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
-</span><span id="DuckDB-277"><a href="#DuckDB-277"><span class="linenos">277</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
-</span><span id="DuckDB-278"><a href="#DuckDB-278"><span class="linenos">278</span></a> <span class="p">),</span>
-</span><span id="DuckDB-279"><a href="#DuckDB-279"><span class="linenos">279</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-280"><a href="#DuckDB-280"><span class="linenos">280</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-281"><a href="#DuckDB-281"><span class="linenos">281</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-282"><a href="#DuckDB-282"><span class="linenos">282</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-283"><a href="#DuckDB-283"><span class="linenos">283</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-284"><a href="#DuckDB-284"><span class="linenos">284</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-285"><a href="#DuckDB-285"><span class="linenos">285</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-286"><a href="#DuckDB-286"><span class="linenos">286</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-287"><a href="#DuckDB-287"><span class="linenos">287</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-288"><a href="#DuckDB-288"><span class="linenos">288</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB-289"><a href="#DuckDB-289"><span class="linenos">289</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
-</span><span id="DuckDB-290"><a href="#DuckDB-290"><span class="linenos">290</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
-</span><span id="DuckDB-291"><a href="#DuckDB-291"><span class="linenos">291</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB-292"><a href="#DuckDB-292"><span class="linenos">292</span></a> <span class="p">}</span>
-</span><span id="DuckDB-293"><a href="#DuckDB-293"><span class="linenos">293</span></a>
-</span><span id="DuckDB-294"><a href="#DuckDB-294"><span class="linenos">294</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
-</span><span id="DuckDB-295"><a href="#DuckDB-295"><span class="linenos">295</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-179"><a href="#DuckDB-179"><span class="linenos">179</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+</span><span id="DuckDB-180"><a href="#DuckDB-180"><span class="linenos">180</span></a>
+</span><span id="DuckDB-181"><a href="#DuckDB-181"><span class="linenos">181</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
+</span><span id="DuckDB-182"><a href="#DuckDB-182"><span class="linenos">182</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
+</span><span id="DuckDB-183"><a href="#DuckDB-183"><span class="linenos">183</span></a>
+</span><span id="DuckDB-184"><a href="#DuckDB-184"><span class="linenos">184</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-185"><a href="#DuckDB-185"><span class="linenos">185</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
+</span><span id="DuckDB-186"><a href="#DuckDB-186"><span class="linenos">186</span></a>
+</span><span id="DuckDB-187"><a href="#DuckDB-187"><span class="linenos">187</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-188"><a href="#DuckDB-188"><span class="linenos">188</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
+</span><span id="DuckDB-189"><a href="#DuckDB-189"><span class="linenos">189</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
+</span><span id="DuckDB-190"><a href="#DuckDB-190"><span class="linenos">190</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
+</span><span id="DuckDB-191"><a href="#DuckDB-191"><span class="linenos">191</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
+</span><span id="DuckDB-192"><a href="#DuckDB-192"><span class="linenos">192</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
+</span><span id="DuckDB-193"><a href="#DuckDB-193"><span class="linenos">193</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB-194"><a href="#DuckDB-194"><span class="linenos">194</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB-195"><a href="#DuckDB-195"><span class="linenos">195</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB-196"><a href="#DuckDB-196"><span class="linenos">196</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
+</span><span id="DuckDB-197"><a href="#DuckDB-197"><span class="linenos">197</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
+</span><span id="DuckDB-198"><a href="#DuckDB-198"><span class="linenos">198</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
+</span><span id="DuckDB-199"><a href="#DuckDB-199"><span class="linenos">199</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
+</span><span id="DuckDB-200"><a href="#DuckDB-200"><span class="linenos">200</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
+</span><span id="DuckDB-201"><a href="#DuckDB-201"><span class="linenos">201</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
+</span><span id="DuckDB-202"><a href="#DuckDB-202"><span class="linenos">202</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
+</span><span id="DuckDB-203"><a href="#DuckDB-203"><span class="linenos">203</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
+</span><span id="DuckDB-204"><a href="#DuckDB-204"><span class="linenos">204</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
+</span><span id="DuckDB-205"><a href="#DuckDB-205"><span class="linenos">205</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
+</span><span id="DuckDB-206"><a href="#DuckDB-206"><span class="linenos">206</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
+</span><span id="DuckDB-207"><a href="#DuckDB-207"><span class="linenos">207</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
+</span><span id="DuckDB-208"><a href="#DuckDB-208"><span class="linenos">208</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
+</span><span id="DuckDB-209"><a href="#DuckDB-209"><span class="linenos">209</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
+</span><span id="DuckDB-210"><a href="#DuckDB-210"><span class="linenos">210</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
+</span><span id="DuckDB-211"><a href="#DuckDB-211"><span class="linenos">211</span></a> <span class="p">}</span>
+</span><span id="DuckDB-212"><a href="#DuckDB-212"><span class="linenos">212</span></a>
+</span><span id="DuckDB-213"><a href="#DuckDB-213"><span class="linenos">213</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-214"><a href="#DuckDB-214"><span class="linenos">214</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
+</span><span id="DuckDB-215"><a href="#DuckDB-215"><span class="linenos">215</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
+</span><span id="DuckDB-216"><a href="#DuckDB-216"><span class="linenos">216</span></a> <span class="p">}</span>
+</span><span id="DuckDB-217"><a href="#DuckDB-217"><span class="linenos">217</span></a>
+</span><span id="DuckDB-218"><a href="#DuckDB-218"><span class="linenos">218</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
+</span><span id="DuckDB-219"><a href="#DuckDB-219"><span class="linenos">219</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-220"><a href="#DuckDB-220"><span class="linenos">220</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
+</span><span id="DuckDB-221"><a href="#DuckDB-221"><span class="linenos">221</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
+</span><span id="DuckDB-222"><a href="#DuckDB-222"><span class="linenos">222</span></a> <span class="p">}</span>
+</span><span id="DuckDB-223"><a href="#DuckDB-223"><span class="linenos">223</span></a>
+</span><span id="DuckDB-224"><a href="#DuckDB-224"><span class="linenos">224</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
+</span><span id="DuckDB-225"><a href="#DuckDB-225"><span class="linenos">225</span></a>
+</span><span id="DuckDB-226"><a href="#DuckDB-226"><span class="linenos">226</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-227"><a href="#DuckDB-227"><span class="linenos">227</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
+</span><span id="DuckDB-228"><a href="#DuckDB-228"><span class="linenos">228</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-229"><a href="#DuckDB-229"><span class="linenos">229</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="DuckDB-230"><a href="#DuckDB-230"><span class="linenos">230</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-231"><a href="#DuckDB-231"><span class="linenos">231</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="DuckDB-232"><a href="#DuckDB-232"><span class="linenos">232</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="DuckDB-233"><a href="#DuckDB-233"><span class="linenos">233</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="DuckDB-234"><a href="#DuckDB-234"><span class="linenos">234</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="DuckDB-235"><a href="#DuckDB-235"><span class="linenos">235</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
+</span><span id="DuckDB-236"><a href="#DuckDB-236"><span class="linenos">236</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-237"><a href="#DuckDB-237"><span class="linenos">237</span></a> <span class="p">),</span>
+</span><span id="DuckDB-238"><a href="#DuckDB-238"><span class="linenos">238</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
+</span><span id="DuckDB-239"><a href="#DuckDB-239"><span class="linenos">239</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-240"><a href="#DuckDB-240"><span class="linenos">240</span></a> <span class="p">),</span>
+</span><span id="DuckDB-241"><a href="#DuckDB-241"><span class="linenos">241</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-242"><a href="#DuckDB-242"><span class="linenos">242</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
+</span><span id="DuckDB-243"><a href="#DuckDB-243"><span class="linenos">243</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
+</span><span id="DuckDB-244"><a href="#DuckDB-244"><span class="linenos">244</span></a> <span class="p">),</span>
+</span><span id="DuckDB-245"><a href="#DuckDB-245"><span class="linenos">245</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-246"><a href="#DuckDB-246"><span class="linenos">246</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
+</span><span id="DuckDB-247"><a href="#DuckDB-247"><span class="linenos">247</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
+</span><span id="DuckDB-248"><a href="#DuckDB-248"><span class="linenos">248</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-249"><a href="#DuckDB-249"><span class="linenos">249</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="DuckDB-250"><a href="#DuckDB-250"><span class="linenos">250</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-251"><a href="#DuckDB-251"><span class="linenos">251</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-252"><a href="#DuckDB-252"><span class="linenos">252</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-253"><a href="#DuckDB-253"><span class="linenos">253</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
+</span><span id="DuckDB-254"><a href="#DuckDB-254"><span class="linenos">254</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
+</span><span id="DuckDB-255"><a href="#DuckDB-255"><span class="linenos">255</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
+</span><span id="DuckDB-256"><a href="#DuckDB-256"><span class="linenos">256</span></a> <span class="p">),</span>
+</span><span id="DuckDB-257"><a href="#DuckDB-257"><span class="linenos">257</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-258"><a href="#DuckDB-258"><span class="linenos">258</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-259"><a href="#DuckDB-259"><span class="linenos">259</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
+</span><span id="DuckDB-260"><a href="#DuckDB-260"><span class="linenos">260</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
+</span><span id="DuckDB-261"><a href="#DuckDB-261"><span class="linenos">261</span></a> <span class="p">),</span>
+</span><span id="DuckDB-262"><a href="#DuckDB-262"><span class="linenos">262</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-263"><a href="#DuckDB-263"><span class="linenos">263</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
+</span><span id="DuckDB-264"><a href="#DuckDB-264"><span class="linenos">264</span></a> <span class="n">this</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><span id="DuckDB-265"><a href="#DuckDB-265"><span class="linenos">265</span></a> <span class="n">expression</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-266"><a href="#DuckDB-266"><span class="linenos">266</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
+</span><span id="DuckDB-267"><a href="#DuckDB-267"><span class="linenos">267</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
+</span><span id="DuckDB-268"><a href="#DuckDB-268"><span class="linenos">268</span></a> <span class="p">),</span>
+</span><span id="DuckDB-269"><a href="#DuckDB-269"><span class="linenos">269</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-270"><a href="#DuckDB-270"><span class="linenos">270</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-271"><a href="#DuckDB-271"><span class="linenos">271</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-272"><a href="#DuckDB-272"><span class="linenos">272</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-273"><a href="#DuckDB-273"><span class="linenos">273</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-274"><a href="#DuckDB-274"><span class="linenos">274</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-275"><a href="#DuckDB-275"><span class="linenos">275</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-276"><a href="#DuckDB-276"><span class="linenos">276</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-277"><a href="#DuckDB-277"><span class="linenos">277</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-278"><a href="#DuckDB-278"><span class="linenos">278</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB-279"><a href="#DuckDB-279"><span class="linenos">279</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
+</span><span id="DuckDB-280"><a href="#DuckDB-280"><span class="linenos">280</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
+</span><span id="DuckDB-281"><a href="#DuckDB-281"><span class="linenos">281</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB-282"><a href="#DuckDB-282"><span class="linenos">282</span></a> <span class="p">}</span>
+</span><span id="DuckDB-283"><a href="#DuckDB-283"><span class="linenos">283</span></a>
+</span><span id="DuckDB-284"><a href="#DuckDB-284"><span class="linenos">284</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+</span><span id="DuckDB-285"><a href="#DuckDB-285"><span class="linenos">285</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-286"><a href="#DuckDB-286"><span class="linenos">286</span></a>
+</span><span id="DuckDB-287"><a href="#DuckDB-287"><span class="linenos">287</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-288"><a href="#DuckDB-288"><span class="linenos">288</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="DuckDB-289"><a href="#DuckDB-289"><span class="linenos">289</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
+</span><span id="DuckDB-290"><a href="#DuckDB-290"><span class="linenos">290</span></a> <span class="p">}</span>
+</span><span id="DuckDB-291"><a href="#DuckDB-291"><span class="linenos">291</span></a>
+</span><span id="DuckDB-292"><a href="#DuckDB-292"><span class="linenos">292</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
+</span><span id="DuckDB-293"><a href="#DuckDB-293"><span class="linenos">293</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
+</span><span id="DuckDB-294"><a href="#DuckDB-294"><span class="linenos">294</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
+</span><span id="DuckDB-295"><a href="#DuckDB-295"><span class="linenos">295</span></a> <span class="p">}</span>
</span><span id="DuckDB-296"><a href="#DuckDB-296"><span class="linenos">296</span></a>
-</span><span id="DuckDB-297"><a href="#DuckDB-297"><span class="linenos">297</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-298"><a href="#DuckDB-298"><span class="linenos">298</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="DuckDB-299"><a href="#DuckDB-299"><span class="linenos">299</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
-</span><span id="DuckDB-300"><a href="#DuckDB-300"><span class="linenos">300</span></a> <span class="p">}</span>
-</span><span id="DuckDB-301"><a href="#DuckDB-301"><span class="linenos">301</span></a>
-</span><span id="DuckDB-302"><a href="#DuckDB-302"><span class="linenos">302</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
-</span><span id="DuckDB-303"><a href="#DuckDB-303"><span class="linenos">303</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
-</span><span id="DuckDB-304"><a href="#DuckDB-304"><span class="linenos">304</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
-</span><span id="DuckDB-305"><a href="#DuckDB-305"><span class="linenos">305</span></a> <span class="p">}</span>
-</span><span id="DuckDB-306"><a href="#DuckDB-306"><span class="linenos">306</span></a>
-</span><span id="DuckDB-307"><a href="#DuckDB-307"><span class="linenos">307</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-308"><a href="#DuckDB-308"><span class="linenos">308</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
-</span><span id="DuckDB-309"><a href="#DuckDB-309"><span class="linenos">309</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
-</span><span id="DuckDB-310"><a href="#DuckDB-310"><span class="linenos">310</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
-</span><span id="DuckDB-311"><a href="#DuckDB-311"><span class="linenos">311</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
-</span><span id="DuckDB-312"><a href="#DuckDB-312"><span class="linenos">312</span></a> <span class="k">else</span> <span class="kc">None</span>
-</span><span id="DuckDB-313"><a href="#DuckDB-313"><span class="linenos">313</span></a> <span class="p">),</span>
-</span><span id="DuckDB-314"><a href="#DuckDB-314"><span class="linenos">314</span></a> <span class="p">}</span>
-</span><span id="DuckDB-315"><a href="#DuckDB-315"><span class="linenos">315</span></a>
-</span><span id="DuckDB-316"><a href="#DuckDB-316"><span class="linenos">316</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
-</span><span id="DuckDB-317"><a href="#DuckDB-317"><span class="linenos">317</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="DuckDB-318"><a href="#DuckDB-318"><span class="linenos">318</span></a> <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>
-</span><span id="DuckDB-319"><a href="#DuckDB-319"><span class="linenos">319</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB-320"><a href="#DuckDB-320"><span class="linenos">320</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
-</span><span id="DuckDB-321"><a href="#DuckDB-321"><span class="linenos">321</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
-</span><span id="DuckDB-322"><a href="#DuckDB-322"><span class="linenos">322</span></a>
-</span><span id="DuckDB-323"><a href="#DuckDB-323"><span class="linenos">323</span></a> <span class="k">return</span> <span class="n">bracket</span>
-</span><span id="DuckDB-324"><a href="#DuckDB-324"><span class="linenos">324</span></a>
-</span><span id="DuckDB-325"><a href="#DuckDB-325"><span class="linenos">325</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
-</span><span id="DuckDB-326"><a href="#DuckDB-326"><span class="linenos">326</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-327"><a href="#DuckDB-327"><span class="linenos">327</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-297"><a href="#DuckDB-297"><span class="linenos">297</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-298"><a href="#DuckDB-298"><span class="linenos">298</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
+</span><span id="DuckDB-299"><a href="#DuckDB-299"><span class="linenos">299</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
+</span><span id="DuckDB-300"><a href="#DuckDB-300"><span class="linenos">300</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
+</span><span id="DuckDB-301"><a href="#DuckDB-301"><span class="linenos">301</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
+</span><span id="DuckDB-302"><a href="#DuckDB-302"><span class="linenos">302</span></a> <span class="k">else</span> <span class="kc">None</span>
+</span><span id="DuckDB-303"><a href="#DuckDB-303"><span class="linenos">303</span></a> <span class="p">),</span>
+</span><span id="DuckDB-304"><a href="#DuckDB-304"><span class="linenos">304</span></a> <span class="p">}</span>
+</span><span id="DuckDB-305"><a href="#DuckDB-305"><span class="linenos">305</span></a>
+</span><span id="DuckDB-306"><a href="#DuckDB-306"><span class="linenos">306</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
+</span><span id="DuckDB-307"><a href="#DuckDB-307"><span class="linenos">307</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="DuckDB-308"><a href="#DuckDB-308"><span class="linenos">308</span></a> <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>
+</span><span id="DuckDB-309"><a href="#DuckDB-309"><span class="linenos">309</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB-310"><a href="#DuckDB-310"><span class="linenos">310</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
+</span><span id="DuckDB-311"><a href="#DuckDB-311"><span class="linenos">311</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
+</span><span id="DuckDB-312"><a href="#DuckDB-312"><span class="linenos">312</span></a>
+</span><span id="DuckDB-313"><a href="#DuckDB-313"><span class="linenos">313</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB-314"><a href="#DuckDB-314"><span class="linenos">314</span></a>
+</span><span id="DuckDB-315"><a href="#DuckDB-315"><span class="linenos">315</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
+</span><span id="DuckDB-316"><a href="#DuckDB-316"><span class="linenos">316</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-317"><a href="#DuckDB-317"><span class="linenos">317</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-318"><a href="#DuckDB-318"><span class="linenos">318</span></a>
+</span><span id="DuckDB-319"><a href="#DuckDB-319"><span class="linenos">319</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-320"><a href="#DuckDB-320"><span class="linenos">320</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-321"><a href="#DuckDB-321"><span class="linenos">321</span></a>
+</span><span id="DuckDB-322"><a href="#DuckDB-322"><span class="linenos">322</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="DuckDB-323"><a href="#DuckDB-323"><span class="linenos">323</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-324"><a href="#DuckDB-324"><span class="linenos">324</span></a> <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>
+</span><span id="DuckDB-325"><a href="#DuckDB-325"><span class="linenos">325</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
+</span><span id="DuckDB-326"><a href="#DuckDB-326"><span class="linenos">326</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
+</span><span id="DuckDB-327"><a href="#DuckDB-327"><span class="linenos">327</span></a> <span class="p">)</span>
</span><span id="DuckDB-328"><a href="#DuckDB-328"><span class="linenos">328</span></a>
-</span><span id="DuckDB-329"><a href="#DuckDB-329"><span class="linenos">329</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-330"><a href="#DuckDB-330"><span class="linenos">330</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-331"><a href="#DuckDB-331"><span class="linenos">331</span></a>
-</span><span id="DuckDB-332"><a href="#DuckDB-332"><span class="linenos">332</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
-</span><span id="DuckDB-333"><a href="#DuckDB-333"><span class="linenos">333</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-334"><a href="#DuckDB-334"><span class="linenos">334</span></a> <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>
-</span><span id="DuckDB-335"><a href="#DuckDB-335"><span class="linenos">335</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
-</span><span id="DuckDB-336"><a href="#DuckDB-336"><span class="linenos">336</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
-</span><span id="DuckDB-337"><a href="#DuckDB-337"><span class="linenos">337</span></a> <span class="p">)</span>
-</span><span id="DuckDB-338"><a href="#DuckDB-338"><span class="linenos">338</span></a>
-</span><span id="DuckDB-339"><a href="#DuckDB-339"><span class="linenos">339</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
-</span><span id="DuckDB-340"><a href="#DuckDB-340"><span class="linenos">340</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
-</span><span id="DuckDB-341"><a href="#DuckDB-341"><span class="linenos">341</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB-342"><a href="#DuckDB-342"><span class="linenos">342</span></a> <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">DataType</span><span class="p">)</span>
-</span><span id="DuckDB-343"><a href="#DuckDB-343"><span class="linenos">343</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-344"><a href="#DuckDB-344"><span class="linenos">344</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="DuckDB-345"><a href="#DuckDB-345"><span class="linenos">345</span></a> <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="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-329"><a href="#DuckDB-329"><span class="linenos">329</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
+</span><span id="DuckDB-330"><a href="#DuckDB-330"><span class="linenos">330</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
+</span><span id="DuckDB-331"><a href="#DuckDB-331"><span class="linenos">331</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB-332"><a href="#DuckDB-332"><span class="linenos">332</span></a> <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">DataType</span><span class="p">)</span>
+</span><span id="DuckDB-333"><a href="#DuckDB-333"><span class="linenos">333</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-334"><a href="#DuckDB-334"><span class="linenos">334</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="DuckDB-335"><a href="#DuckDB-335"><span class="linenos">335</span></a> <span class="p">):</span>
+</span><span id="DuckDB-336"><a href="#DuckDB-336"><span class="linenos">336</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-337"><a href="#DuckDB-337"><span class="linenos">337</span></a>
+</span><span id="DuckDB-338"><a href="#DuckDB-338"><span class="linenos">338</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="DuckDB-339"><a href="#DuckDB-339"><span class="linenos">339</span></a>
+</span><span id="DuckDB-340"><a href="#DuckDB-340"><span class="linenos">340</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>
+</span><span id="DuckDB-341"><a href="#DuckDB-341"><span class="linenos">341</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
+</span><span id="DuckDB-342"><a href="#DuckDB-342"><span class="linenos">342</span></a>
+</span><span id="DuckDB-343"><a href="#DuckDB-343"><span class="linenos">343</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
+</span><span id="DuckDB-344"><a href="#DuckDB-344"><span class="linenos">344</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+</span><span id="DuckDB-345"><a href="#DuckDB-345"><span class="linenos">345</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</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="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</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">return</span> <span class="n">this</span>
-</span><span id="DuckDB-349"><a href="#DuckDB-349"><span class="linenos">349</span></a>
-</span><span id="DuckDB-350"><a href="#DuckDB-350"><span class="linenos">350</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>
-</span><span id="DuckDB-351"><a href="#DuckDB-351"><span class="linenos">351</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
-</span><span id="DuckDB-352"><a href="#DuckDB-352"><span class="linenos">352</span></a>
-</span><span id="DuckDB-353"><a href="#DuckDB-353"><span class="linenos">353</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
-</span><span id="DuckDB-354"><a href="#DuckDB-354"><span class="linenos">354</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-</span><span id="DuckDB-355"><a href="#DuckDB-355"><span class="linenos">355</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span>
-</span><span id="DuckDB-356"><a href="#DuckDB-356"><span class="linenos">356</span></a> <span class="k">return</span> <span class="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-357"><a href="#DuckDB-357"><span class="linenos">357</span></a>
-</span><span id="DuckDB-358"><a href="#DuckDB-358"><span class="linenos">358</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="DuckDB-359"><a href="#DuckDB-359"><span class="linenos">359</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="DuckDB-360"><a href="#DuckDB-360"><span class="linenos">360</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="DuckDB-361"><a href="#DuckDB-361"><span class="linenos">361</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-362"><a href="#DuckDB-362"><span class="linenos">362</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-363"><a href="#DuckDB-363"><span class="linenos">363</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-364"><a href="#DuckDB-364"><span class="linenos">364</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="DuckDB-365"><a href="#DuckDB-365"><span class="linenos">365</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="DuckDB-366"><a href="#DuckDB-366"><span class="linenos">366</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-367"><a href="#DuckDB-367"><span class="linenos">367</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-368"><a href="#DuckDB-368"><span class="linenos">368</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-369"><a href="#DuckDB-369"><span class="linenos">369</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
-</span><span id="DuckDB-370"><a href="#DuckDB-370"><span class="linenos">370</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
-</span><span id="DuckDB-371"><a href="#DuckDB-371"><span class="linenos">371</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-372"><a href="#DuckDB-372"><span class="linenos">372</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
-</span><span id="DuckDB-373"><a href="#DuckDB-373"><span class="linenos">373</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-374"><a href="#DuckDB-374"><span class="linenos">374</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-375"><a href="#DuckDB-375"><span class="linenos">375</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-376"><a href="#DuckDB-376"><span class="linenos">376</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-377"><a href="#DuckDB-377"><span class="linenos">377</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB-378"><a href="#DuckDB-378"><span class="linenos">378</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB-379"><a href="#DuckDB-379"><span class="linenos">379</span></a>
-</span><span id="DuckDB-380"><a href="#DuckDB-380"><span class="linenos">380</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-381"><a href="#DuckDB-381"><span class="linenos">381</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="DuckDB-382"><a href="#DuckDB-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
-</span><span id="DuckDB-383"><a href="#DuckDB-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
-</span><span id="DuckDB-384"><a href="#DuckDB-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-385"><a href="#DuckDB-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-386"><a href="#DuckDB-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-387"><a href="#DuckDB-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-388"><a href="#DuckDB-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
-</span><span id="DuckDB-389"><a href="#DuckDB-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-390"><a href="#DuckDB-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-391"><a href="#DuckDB-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
-</span><span id="DuckDB-392"><a href="#DuckDB-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-393"><a href="#DuckDB-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-394"><a href="#DuckDB-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-395"><a href="#DuckDB-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-396"><a href="#DuckDB-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-397"><a href="#DuckDB-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-398"><a href="#DuckDB-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
-</span><span id="DuckDB-399"><a href="#DuckDB-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
-</span><span id="DuckDB-400"><a href="#DuckDB-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB-401"><a href="#DuckDB-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-402"><a href="#DuckDB-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB-403"><a href="#DuckDB-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-404"><a href="#DuckDB-404"><span class="linenos">404</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB-405"><a href="#DuckDB-405"><span class="linenos">405</span></a> <span class="p">),</span>
-</span><span id="DuckDB-406"><a href="#DuckDB-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
-</span><span id="DuckDB-407"><a href="#DuckDB-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB-408"><a href="#DuckDB-408"><span class="linenos">408</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-409"><a href="#DuckDB-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="DuckDB-410"><a href="#DuckDB-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB-411"><a href="#DuckDB-411"><span class="linenos">411</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-412"><a href="#DuckDB-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="DuckDB-413"><a href="#DuckDB-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-414"><a href="#DuckDB-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-415"><a href="#DuckDB-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-416"><a href="#DuckDB-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-417"><a href="#DuckDB-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB-418"><a href="#DuckDB-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB-419"><a href="#DuckDB-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
-</span><span id="DuckDB-420"><a href="#DuckDB-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-421"><a href="#DuckDB-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-422"><a href="#DuckDB-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-423"><a href="#DuckDB-423"><span class="linenos">423</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-424"><a href="#DuckDB-424"><span class="linenos">424</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-425"><a href="#DuckDB-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB-426"><a href="#DuckDB-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB-427"><a href="#DuckDB-427"><span class="linenos">427</span></a> <span class="p">),</span>
-</span><span id="DuckDB-428"><a href="#DuckDB-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-429"><a href="#DuckDB-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_CONT&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-430"><a href="#DuckDB-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_DISC&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-431"><a href="#DuckDB-431"><span class="linenos">431</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
-</span><span id="DuckDB-432"><a href="#DuckDB-432"><span class="linenos">432</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
-</span><span id="DuckDB-433"><a href="#DuckDB-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
-</span><span id="DuckDB-434"><a href="#DuckDB-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB-435"><a href="#DuckDB-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-436"><a href="#DuckDB-436"><span class="linenos">436</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-437"><a href="#DuckDB-437"><span class="linenos">437</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="DuckDB-438"><a href="#DuckDB-438"><span class="linenos">438</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
-</span><span id="DuckDB-439"><a href="#DuckDB-439"><span class="linenos">439</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-440"><a href="#DuckDB-440"><span class="linenos">440</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-441"><a href="#DuckDB-441"><span class="linenos">441</span></a> <span class="p">),</span>
-</span><span id="DuckDB-442"><a href="#DuckDB-442"><span class="linenos">442</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-443"><a href="#DuckDB-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-444"><a href="#DuckDB-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-445"><a href="#DuckDB-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
-</span><span id="DuckDB-446"><a href="#DuckDB-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-447"><a href="#DuckDB-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
-</span><span id="DuckDB-448"><a href="#DuckDB-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
-</span><span id="DuckDB-449"><a href="#DuckDB-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-450"><a href="#DuckDB-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
-</span><span id="DuckDB-451"><a href="#DuckDB-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-452"><a href="#DuckDB-452"><span class="linenos">452</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
-</span><span id="DuckDB-453"><a href="#DuckDB-453"><span class="linenos">453</span></a> <span class="p">),</span>
-</span><span id="DuckDB-454"><a href="#DuckDB-454"><span class="linenos">454</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
-</span><span id="DuckDB-455"><a href="#DuckDB-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB-456"><a href="#DuckDB-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
-</span><span id="DuckDB-457"><a href="#DuckDB-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-458"><a href="#DuckDB-458"><span class="linenos">458</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB-459"><a href="#DuckDB-459"><span class="linenos">459</span></a> <span class="p">),</span>
-</span><span id="DuckDB-460"><a href="#DuckDB-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
-</span><span id="DuckDB-461"><a href="#DuckDB-461"><span class="linenos">461</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
-</span><span id="DuckDB-462"><a href="#DuckDB-462"><span class="linenos">462</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
-</span><span id="DuckDB-463"><a href="#DuckDB-463"><span class="linenos">463</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-464"><a href="#DuckDB-464"><span class="linenos">464</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
-</span><span id="DuckDB-465"><a href="#DuckDB-465"><span class="linenos">465</span></a> <span class="p">),</span>
-</span><span id="DuckDB-466"><a href="#DuckDB-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
-</span><span id="DuckDB-467"><a href="#DuckDB-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-468"><a href="#DuckDB-468"><span class="linenos">468</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB-469"><a href="#DuckDB-469"><span class="linenos">469</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-470"><a href="#DuckDB-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
-</span><span id="DuckDB-471"><a href="#DuckDB-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-472"><a href="#DuckDB-472"><span class="linenos">472</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-473"><a href="#DuckDB-473"><span class="linenos">473</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-474"><a href="#DuckDB-474"><span class="linenos">474</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="DuckDB-475"><a href="#DuckDB-475"><span class="linenos">475</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="DuckDB-476"><a href="#DuckDB-476"><span class="linenos">476</span></a> <span class="p">),</span>
-</span><span id="DuckDB-477"><a href="#DuckDB-477"><span class="linenos">477</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB-478"><a href="#DuckDB-478"><span class="linenos">478</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
-</span><span id="DuckDB-479"><a href="#DuckDB-479"><span class="linenos">479</span></a> <span class="p">),</span>
-</span><span id="DuckDB-480"><a href="#DuckDB-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
-</span><span id="DuckDB-481"><a href="#DuckDB-481"><span class="linenos">481</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-482"><a href="#DuckDB-482"><span class="linenos">482</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-483"><a href="#DuckDB-483"><span class="linenos">483</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB-484"><a href="#DuckDB-484"><span class="linenos">484</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
-</span><span id="DuckDB-485"><a href="#DuckDB-485"><span class="linenos">485</span></a> <span class="p">}</span>
-</span><span id="DuckDB-486"><a href="#DuckDB-486"><span class="linenos">486</span></a>
-</span><span id="DuckDB-487"><a href="#DuckDB-487"><span class="linenos">487</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-488"><a href="#DuckDB-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
-</span><span id="DuckDB-489"><a href="#DuckDB-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
-</span><span id="DuckDB-490"><a href="#DuckDB-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
-</span><span id="DuckDB-491"><a href="#DuckDB-491"><span class="linenos">491</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
-</span><span id="DuckDB-492"><a href="#DuckDB-492"><span class="linenos">492</span></a> <span class="p">}</span>
-</span><span id="DuckDB-493"><a href="#DuckDB-493"><span class="linenos">493</span></a>
-</span><span id="DuckDB-494"><a href="#DuckDB-494"><span class="linenos">494</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-495"><a href="#DuckDB-495"><span class="linenos">495</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
-</span><span id="DuckDB-496"><a href="#DuckDB-496"><span class="linenos">496</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-497"><a href="#DuckDB-497"><span class="linenos">497</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-498"><a href="#DuckDB-498"><span class="linenos">498</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-499"><a href="#DuckDB-499"><span class="linenos">499</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-500"><a href="#DuckDB-500"><span class="linenos">500</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-501"><a href="#DuckDB-501"><span class="linenos">501</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-502"><a href="#DuckDB-502"><span class="linenos">502</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-503"><a href="#DuckDB-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">VARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</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">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&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">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&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">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">,</span>
-</span><span id="DuckDB-507"><a href="#DuckDB-507"><span class="linenos">507</span></a> <span class="p">}</span>
-</span><span id="DuckDB-508"><a href="#DuckDB-508"><span class="linenos">508</span></a>
-</span><span id="DuckDB-509"><a href="#DuckDB-509"><span class="linenos">509</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+</span><span id="DuckDB-348"><a href="#DuckDB-348"><span class="linenos">348</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="DuckDB-349"><a href="#DuckDB-349"><span class="linenos">349</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="DuckDB-350"><a href="#DuckDB-350"><span class="linenos">350</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="DuckDB-351"><a href="#DuckDB-351"><span class="linenos">351</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-352"><a href="#DuckDB-352"><span class="linenos">352</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-353"><a href="#DuckDB-353"><span class="linenos">353</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-354"><a href="#DuckDB-354"><span class="linenos">354</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="DuckDB-355"><a href="#DuckDB-355"><span class="linenos">355</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB-356"><a href="#DuckDB-356"><span class="linenos">356</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-357"><a href="#DuckDB-357"><span class="linenos">357</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-358"><a href="#DuckDB-358"><span class="linenos">358</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-359"><a href="#DuckDB-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
+</span><span id="DuckDB-360"><a href="#DuckDB-360"><span class="linenos">360</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
+</span><span id="DuckDB-361"><a href="#DuckDB-361"><span class="linenos">361</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-362"><a href="#DuckDB-362"><span class="linenos">362</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
+</span><span id="DuckDB-363"><a href="#DuckDB-363"><span class="linenos">363</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-364"><a href="#DuckDB-364"><span class="linenos">364</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-365"><a href="#DuckDB-365"><span class="linenos">365</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-366"><a href="#DuckDB-366"><span class="linenos">366</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-367"><a href="#DuckDB-367"><span class="linenos">367</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB-368"><a href="#DuckDB-368"><span class="linenos">368</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB-369"><a href="#DuckDB-369"><span class="linenos">369</span></a>
+</span><span id="DuckDB-370"><a href="#DuckDB-370"><span class="linenos">370</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-371"><a href="#DuckDB-371"><span class="linenos">371</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
+</span><span id="DuckDB-372"><a href="#DuckDB-372"><span class="linenos">372</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
+</span><span id="DuckDB-373"><a href="#DuckDB-373"><span class="linenos">373</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
+</span><span id="DuckDB-374"><a href="#DuckDB-374"><span class="linenos">374</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-375"><a href="#DuckDB-375"><span class="linenos">375</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-376"><a href="#DuckDB-376"><span class="linenos">376</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-377"><a href="#DuckDB-377"><span class="linenos">377</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-378"><a href="#DuckDB-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
+</span><span id="DuckDB-379"><a href="#DuckDB-379"><span class="linenos">379</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-380"><a href="#DuckDB-380"><span class="linenos">380</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-381"><a href="#DuckDB-381"><span class="linenos">381</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
+</span><span id="DuckDB-382"><a href="#DuckDB-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-383"><a href="#DuckDB-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-384"><a href="#DuckDB-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-385"><a href="#DuckDB-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-386"><a href="#DuckDB-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-387"><a href="#DuckDB-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-388"><a href="#DuckDB-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
+</span><span id="DuckDB-389"><a href="#DuckDB-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
+</span><span id="DuckDB-390"><a href="#DuckDB-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB-391"><a href="#DuckDB-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-392"><a href="#DuckDB-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB-393"><a href="#DuckDB-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-394"><a href="#DuckDB-394"><span class="linenos">394</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB-395"><a href="#DuckDB-395"><span class="linenos">395</span></a> <span class="p">),</span>
+</span><span id="DuckDB-396"><a href="#DuckDB-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
+</span><span id="DuckDB-397"><a href="#DuckDB-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB-398"><a href="#DuckDB-398"><span class="linenos">398</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-399"><a href="#DuckDB-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="DuckDB-400"><a href="#DuckDB-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB-401"><a href="#DuckDB-401"><span class="linenos">401</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-402"><a href="#DuckDB-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="DuckDB-403"><a href="#DuckDB-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-404"><a href="#DuckDB-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-405"><a href="#DuckDB-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-406"><a href="#DuckDB-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-407"><a href="#DuckDB-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB-408"><a href="#DuckDB-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB-409"><a href="#DuckDB-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
+</span><span id="DuckDB-410"><a href="#DuckDB-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-411"><a href="#DuckDB-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-412"><a href="#DuckDB-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-413"><a href="#DuckDB-413"><span class="linenos">413</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-414"><a href="#DuckDB-414"><span class="linenos">414</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-415"><a href="#DuckDB-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB-416"><a href="#DuckDB-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB-417"><a href="#DuckDB-417"><span class="linenos">417</span></a> <span class="p">),</span>
+</span><span id="DuckDB-418"><a href="#DuckDB-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-419"><a href="#DuckDB-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-420"><a href="#DuckDB-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-421"><a href="#DuckDB-421"><span class="linenos">421</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
+</span><span id="DuckDB-422"><a href="#DuckDB-422"><span class="linenos">422</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
+</span><span id="DuckDB-423"><a href="#DuckDB-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
+</span><span id="DuckDB-424"><a href="#DuckDB-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB-425"><a href="#DuckDB-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-426"><a href="#DuckDB-426"><span class="linenos">426</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-427"><a href="#DuckDB-427"><span class="linenos">427</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="DuckDB-428"><a href="#DuckDB-428"><span class="linenos">428</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
+</span><span id="DuckDB-429"><a href="#DuckDB-429"><span class="linenos">429</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-430"><a href="#DuckDB-430"><span class="linenos">430</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-431"><a href="#DuckDB-431"><span class="linenos">431</span></a> <span class="p">),</span>
+</span><span id="DuckDB-432"><a href="#DuckDB-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-433"><a href="#DuckDB-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-434"><a href="#DuckDB-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-435"><a href="#DuckDB-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
+</span><span id="DuckDB-436"><a href="#DuckDB-436"><span class="linenos">436</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-437"><a href="#DuckDB-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
+</span><span id="DuckDB-438"><a href="#DuckDB-438"><span class="linenos">438</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
+</span><span id="DuckDB-439"><a href="#DuckDB-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-440"><a href="#DuckDB-440"><span class="linenos">440</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
+</span><span id="DuckDB-441"><a href="#DuckDB-441"><span class="linenos">441</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-442"><a href="#DuckDB-442"><span class="linenos">442</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
+</span><span id="DuckDB-443"><a href="#DuckDB-443"><span class="linenos">443</span></a> <span class="p">),</span>
+</span><span id="DuckDB-444"><a href="#DuckDB-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
+</span><span id="DuckDB-445"><a href="#DuckDB-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB-446"><a href="#DuckDB-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
+</span><span id="DuckDB-447"><a href="#DuckDB-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-448"><a href="#DuckDB-448"><span class="linenos">448</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB-449"><a href="#DuckDB-449"><span class="linenos">449</span></a> <span class="p">),</span>
+</span><span id="DuckDB-450"><a href="#DuckDB-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
+</span><span id="DuckDB-451"><a href="#DuckDB-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
+</span><span id="DuckDB-452"><a href="#DuckDB-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
+</span><span id="DuckDB-453"><a href="#DuckDB-453"><span class="linenos">453</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-454"><a href="#DuckDB-454"><span class="linenos">454</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
+</span><span id="DuckDB-455"><a href="#DuckDB-455"><span class="linenos">455</span></a> <span class="p">),</span>
+</span><span id="DuckDB-456"><a href="#DuckDB-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
+</span><span id="DuckDB-457"><a href="#DuckDB-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-458"><a href="#DuckDB-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB-459"><a href="#DuckDB-459"><span class="linenos">459</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-460"><a href="#DuckDB-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
+</span><span id="DuckDB-461"><a href="#DuckDB-461"><span class="linenos">461</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-462"><a href="#DuckDB-462"><span class="linenos">462</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-463"><a href="#DuckDB-463"><span class="linenos">463</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-464"><a href="#DuckDB-464"><span class="linenos">464</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="DuckDB-465"><a href="#DuckDB-465"><span class="linenos">465</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="DuckDB-466"><a href="#DuckDB-466"><span class="linenos">466</span></a> <span class="p">),</span>
+</span><span id="DuckDB-467"><a href="#DuckDB-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB-468"><a href="#DuckDB-468"><span class="linenos">468</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</span><span id="DuckDB-469"><a href="#DuckDB-469"><span class="linenos">469</span></a> <span class="p">),</span>
+</span><span id="DuckDB-470"><a href="#DuckDB-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
+</span><span id="DuckDB-471"><a href="#DuckDB-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-472"><a href="#DuckDB-472"><span class="linenos">472</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-473"><a href="#DuckDB-473"><span class="linenos">473</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB-474"><a href="#DuckDB-474"><span class="linenos">474</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
+</span><span id="DuckDB-475"><a href="#DuckDB-475"><span class="linenos">475</span></a> <span class="p">}</span>
+</span><span id="DuckDB-476"><a href="#DuckDB-476"><span class="linenos">476</span></a>
+</span><span id="DuckDB-477"><a href="#DuckDB-477"><span class="linenos">477</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-478"><a href="#DuckDB-478"><span class="linenos">478</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
+</span><span id="DuckDB-479"><a href="#DuckDB-479"><span class="linenos">479</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
+</span><span id="DuckDB-480"><a href="#DuckDB-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
+</span><span id="DuckDB-481"><a href="#DuckDB-481"><span class="linenos">481</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
+</span><span id="DuckDB-482"><a href="#DuckDB-482"><span class="linenos">482</span></a> <span class="p">}</span>
+</span><span id="DuckDB-483"><a href="#DuckDB-483"><span class="linenos">483</span></a>
+</span><span id="DuckDB-484"><a href="#DuckDB-484"><span class="linenos">484</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-485"><a href="#DuckDB-485"><span class="linenos">485</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
+</span><span id="DuckDB-486"><a href="#DuckDB-486"><span class="linenos">486</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-487"><a href="#DuckDB-487"><span class="linenos">487</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-488"><a href="#DuckDB-488"><span class="linenos">488</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-489"><a href="#DuckDB-489"><span class="linenos">489</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-490"><a href="#DuckDB-490"><span class="linenos">490</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-491"><a href="#DuckDB-491"><span class="linenos">491</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
+</span><span id="DuckDB-492"><a href="#DuckDB-492"><span class="linenos">492</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-493"><a href="#DuckDB-493"><span class="linenos">493</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-494"><a href="#DuckDB-494"><span class="linenos">494</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-495"><a href="#DuckDB-495"><span class="linenos">495</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-496"><a href="#DuckDB-496"><span class="linenos">496</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-497"><a href="#DuckDB-497"><span class="linenos">497</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-498"><a href="#DuckDB-498"><span class="linenos">498</span></a> <span class="p">}</span>
+</span><span id="DuckDB-499"><a href="#DuckDB-499"><span class="linenos">499</span></a>
+</span><span id="DuckDB-500"><a href="#DuckDB-500"><span class="linenos">500</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+</span><span id="DuckDB-501"><a href="#DuckDB-501"><span class="linenos">501</span></a>
+</span><span id="DuckDB-502"><a href="#DuckDB-502"><span class="linenos">502</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-503"><a href="#DuckDB-503"><span class="linenos">503</span></a>
+</span><span id="DuckDB-504"><a href="#DuckDB-504"><span class="linenos">504</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="DuckDB-505"><a href="#DuckDB-505"><span class="linenos">505</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="DuckDB-506"><a href="#DuckDB-506"><span class="linenos">506</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB-507"><a href="#DuckDB-507"><span class="linenos">507</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-508"><a href="#DuckDB-508"><span class="linenos">508</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-509"><a href="#DuckDB-509"><span class="linenos">509</span></a> <span class="p">}</span>
</span><span id="DuckDB-510"><a href="#DuckDB-510"><span class="linenos">510</span></a>
-</span><span id="DuckDB-511"><a href="#DuckDB-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="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"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="DuckDB-514"><a href="#DuckDB-514"><span class="linenos">514</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="DuckDB-515"><a href="#DuckDB-515"><span class="linenos">515</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB-516"><a href="#DuckDB-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="DuckDB-517"><a href="#DuckDB-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="DuckDB-518"><a href="#DuckDB-518"><span class="linenos">518</span></a> <span class="p">}</span>
-</span><span id="DuckDB-519"><a href="#DuckDB-519"><span class="linenos">519</span></a>
-</span><span id="DuckDB-520"><a href="#DuckDB-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="DuckDB-521"><a href="#DuckDB-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="DuckDB-522"><a href="#DuckDB-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="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">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-511"><a href="#DuckDB-511"><span class="linenos">511</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="DuckDB-512"><a href="#DuckDB-512"><span class="linenos">512</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="DuckDB-513"><a href="#DuckDB-513"><span class="linenos">513</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-514"><a href="#DuckDB-514"><span class="linenos">514</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-515"><a href="#DuckDB-515"><span class="linenos">515</span></a>
+</span><span id="DuckDB-516"><a href="#DuckDB-516"><span class="linenos">516</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-517"><a href="#DuckDB-517"><span class="linenos">517</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-518"><a href="#DuckDB-518"><span class="linenos">518</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-519"><a href="#DuckDB-519"><span class="linenos">519</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+</span><span id="DuckDB-520"><a href="#DuckDB-520"><span class="linenos">520</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-521"><a href="#DuckDB-521"><span class="linenos">521</span></a> <span class="p">)</span>
+</span><span id="DuckDB-522"><a href="#DuckDB-522"><span class="linenos">522</span></a>
+</span><span id="DuckDB-523"><a href="#DuckDB-523"><span class="linenos">523</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-524"><a href="#DuckDB-524"><span class="linenos">524</span></a>
-</span><span id="DuckDB-525"><a href="#DuckDB-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="DuckDB-526"><a href="#DuckDB-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="DuckDB-527"><a href="#DuckDB-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="DuckDB-528"><a href="#DuckDB-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="DuckDB-529"><a href="#DuckDB-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="DuckDB-530"><a href="#DuckDB-530"><span class="linenos">530</span></a> <span class="p">)</span>
+</span><span id="DuckDB-525"><a href="#DuckDB-525"><span class="linenos">525</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-526"><a href="#DuckDB-526"><span class="linenos">526</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-527"><a href="#DuckDB-527"><span class="linenos">527</span></a>
+</span><span id="DuckDB-528"><a href="#DuckDB-528"><span class="linenos">528</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-529"><a href="#DuckDB-529"><span class="linenos">529</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-530"><a href="#DuckDB-530"><span class="linenos">530</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-531"><a href="#DuckDB-531"><span class="linenos">531</span></a>
-</span><span id="DuckDB-532"><a href="#DuckDB-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="DuckDB-533"><a href="#DuckDB-533"><span class="linenos">533</span></a>
-</span><span id="DuckDB-534"><a href="#DuckDB-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="DuckDB-535"><a href="#DuckDB-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="DuckDB-536"><a href="#DuckDB-536"><span class="linenos">536</span></a>
-</span><span id="DuckDB-537"><a href="#DuckDB-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="DuckDB-538"><a href="#DuckDB-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="DuckDB-539"><a href="#DuckDB-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="DuckDB-532"><a href="#DuckDB-532"><span class="linenos">532</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-533"><a href="#DuckDB-533"><span class="linenos">533</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-534"><a href="#DuckDB-534"><span class="linenos">534</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-535"><a href="#DuckDB-535"><span class="linenos">535</span></a>
+</span><span id="DuckDB-536"><a href="#DuckDB-536"><span class="linenos">536</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-537"><a href="#DuckDB-537"><span class="linenos">537</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-538"><a href="#DuckDB-538"><span class="linenos">538</span></a>
+</span><span id="DuckDB-539"><a href="#DuckDB-539"><span class="linenos">539</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-540"><a href="#DuckDB-540"><span class="linenos">540</span></a>
-</span><span id="DuckDB-541"><a href="#DuckDB-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="DuckDB-542"><a href="#DuckDB-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="DuckDB-543"><a href="#DuckDB-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="DuckDB-544"><a href="#DuckDB-544"><span class="linenos">544</span></a>
-</span><span id="DuckDB-545"><a href="#DuckDB-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="DuckDB-546"><a href="#DuckDB-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="DuckDB-547"><a href="#DuckDB-547"><span class="linenos">547</span></a>
-</span><span id="DuckDB-548"><a href="#DuckDB-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="DuckDB-549"><a href="#DuckDB-549"><span class="linenos">549</span></a>
-</span><span id="DuckDB-550"><a href="#DuckDB-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="DuckDB-551"><a href="#DuckDB-551"><span class="linenos">551</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB-552"><a href="#DuckDB-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="DuckDB-553"><a href="#DuckDB-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="DuckDB-554"><a href="#DuckDB-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="DuckDB-555"><a href="#DuckDB-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="DuckDB-556"><a href="#DuckDB-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="DuckDB-557"><a href="#DuckDB-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="DuckDB-558"><a href="#DuckDB-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="DuckDB-559"><a href="#DuckDB-559"><span class="linenos">559</span></a>
-</span><span id="DuckDB-560"><a href="#DuckDB-560"><span class="linenos">560</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-561"><a href="#DuckDB-561"><span class="linenos">561</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-562"><a href="#DuckDB-562"><span class="linenos">562</span></a> <span class="p">)</span>
+</span><span id="DuckDB-541"><a href="#DuckDB-541"><span class="linenos">541</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB-542"><a href="#DuckDB-542"><span class="linenos">542</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB-543"><a href="#DuckDB-543"><span class="linenos">543</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-544"><a href="#DuckDB-544"><span class="linenos">544</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-545"><a href="#DuckDB-545"><span class="linenos">545</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-546"><a href="#DuckDB-546"><span class="linenos">546</span></a> <span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="DuckDB-547"><a href="#DuckDB-547"><span class="linenos">547</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-548"><a href="#DuckDB-548"><span class="linenos">548</span></a> <span class="c1"># This sample clause only applies to a single source, not the entire resulting relation</span>
+</span><span id="DuckDB-549"><a href="#DuckDB-549"><span class="linenos">549</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</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">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-552"><a href="#DuckDB-552"><span class="linenos">552</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-553"><a href="#DuckDB-553"><span class="linenos">553</span></a> <span class="p">)</span>
+</span><span id="DuckDB-554"><a href="#DuckDB-554"><span class="linenos">554</span></a>
+</span><span id="DuckDB-555"><a href="#DuckDB-555"><span class="linenos">555</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-556"><a href="#DuckDB-556"><span class="linenos">556</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-557"><a href="#DuckDB-557"><span class="linenos">557</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-558"><a href="#DuckDB-558"><span class="linenos">558</span></a>
+</span><span id="DuckDB-559"><a href="#DuckDB-559"><span class="linenos">559</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-560"><a href="#DuckDB-560"><span class="linenos">560</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="DuckDB-561"><a href="#DuckDB-561"><span class="linenos">561</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-562"><a href="#DuckDB-562"><span class="linenos">562</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
</span><span id="DuckDB-563"><a href="#DuckDB-563"><span class="linenos">563</span></a>
-</span><span id="DuckDB-564"><a href="#DuckDB-564"><span class="linenos">564</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-565"><a href="#DuckDB-565"><span class="linenos">565</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-566"><a href="#DuckDB-566"><span class="linenos">566</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-567"><a href="#DuckDB-567"><span class="linenos">567</span></a>
-</span><span id="DuckDB-568"><a href="#DuckDB-568"><span class="linenos">568</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-569"><a href="#DuckDB-569"><span class="linenos">569</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB-570"><a href="#DuckDB-570"><span class="linenos">570</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-571"><a href="#DuckDB-571"><span class="linenos">571</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB-572"><a href="#DuckDB-572"><span class="linenos">572</span></a>
-</span><span id="DuckDB-573"><a href="#DuckDB-573"><span class="linenos">573</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="DuckDB-574"><a href="#DuckDB-574"><span class="linenos">574</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-575"><a href="#DuckDB-575"><span class="linenos">575</span></a>
-</span><span id="DuckDB-576"><a href="#DuckDB-576"><span class="linenos">576</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-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">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-579"><a href="#DuckDB-579"><span class="linenos">579</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-580"><a href="#DuckDB-580"><span class="linenos">580</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-581"><a href="#DuckDB-581"><span class="linenos">581</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-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">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-584"><a href="#DuckDB-584"><span class="linenos">584</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB-585"><a href="#DuckDB-585"><span class="linenos">585</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-586"><a href="#DuckDB-586"><span class="linenos">586</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-587"><a href="#DuckDB-587"><span class="linenos">587</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-588"><a href="#DuckDB-588"><span class="linenos">588</span></a> <span class="p">):</span>
-</span><span id="DuckDB-589"><a href="#DuckDB-589"><span class="linenos">589</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB-590"><a href="#DuckDB-590"><span class="linenos">590</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-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">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-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">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-594"><a href="#DuckDB-594"><span class="linenos">594</span></a>
-</span><span id="DuckDB-595"><a href="#DuckDB-595"><span class="linenos">595</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-596"><a href="#DuckDB-596"><span class="linenos">596</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="DuckDB-597"><a href="#DuckDB-597"><span class="linenos">597</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-598"><a href="#DuckDB-598"><span class="linenos">598</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-599"><a href="#DuckDB-599"><span class="linenos">599</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-564"><a href="#DuckDB-564"><span class="linenos">564</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB-565"><a href="#DuckDB-565"><span class="linenos">565</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-566"><a href="#DuckDB-566"><span class="linenos">566</span></a>
+</span><span id="DuckDB-567"><a href="#DuckDB-567"><span class="linenos">567</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-568"><a href="#DuckDB-568"><span class="linenos">568</span></a>
+</span><span id="DuckDB-569"><a href="#DuckDB-569"><span class="linenos">569</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-570"><a href="#DuckDB-570"><span class="linenos">570</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-571"><a href="#DuckDB-571"><span class="linenos">571</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-572"><a href="#DuckDB-572"><span class="linenos">572</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-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">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-575"><a href="#DuckDB-575"><span class="linenos">575</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB-576"><a href="#DuckDB-576"><span class="linenos">576</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-577"><a href="#DuckDB-577"><span class="linenos">577</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-578"><a href="#DuckDB-578"><span class="linenos">578</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-579"><a href="#DuckDB-579"><span class="linenos">579</span></a> <span class="p">):</span>
+</span><span id="DuckDB-580"><a href="#DuckDB-580"><span class="linenos">580</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB-581"><a href="#DuckDB-581"><span class="linenos">581</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-582"><a href="#DuckDB-582"><span class="linenos">582</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-583"><a href="#DuckDB-583"><span class="linenos">583</span></a>
+</span><span id="DuckDB-584"><a href="#DuckDB-584"><span class="linenos">584</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-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">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-587"><a href="#DuckDB-587"><span class="linenos">587</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="DuckDB-588"><a href="#DuckDB-588"><span class="linenos">588</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-589"><a href="#DuckDB-589"><span class="linenos">589</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-590"><a href="#DuckDB-590"><span class="linenos">590</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-591"><a href="#DuckDB-591"><span class="linenos">591</span></a>
+</span><span id="DuckDB-592"><a href="#DuckDB-592"><span class="linenos">592</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-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="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-595"><a href="#DuckDB-595"><span class="linenos">595</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-596"><a href="#DuckDB-596"><span class="linenos">596</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-597"><a href="#DuckDB-597"><span class="linenos">597</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-598"><a href="#DuckDB-598"><span class="linenos">598</span></a>
+</span><span id="DuckDB-599"><a href="#DuckDB-599"><span class="linenos">599</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-600"><a href="#DuckDB-600"><span class="linenos">600</span></a>
-</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">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><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">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-604"><a href="#DuckDB-604"><span class="linenos">604</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-605"><a href="#DuckDB-605"><span class="linenos">605</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-606"><a href="#DuckDB-606"><span class="linenos">606</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-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="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-601"><a href="#DuckDB-601"><span class="linenos">601</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-602"><a href="#DuckDB-602"><span class="linenos">602</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-603"><a href="#DuckDB-603"><span class="linenos">603</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-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="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-606"><a href="#DuckDB-606"><span class="linenos">606</span></a>
+</span><span id="DuckDB-607"><a href="#DuckDB-607"><span class="linenos">607</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-608"><a href="#DuckDB-608"><span class="linenos">608</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-609"><a href="#DuckDB-609"><span class="linenos">609</span></a>
-</span><span id="DuckDB-610"><a href="#DuckDB-610"><span class="linenos">610</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-611"><a href="#DuckDB-611"><span class="linenos">611</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-612"><a href="#DuckDB-612"><span class="linenos">612</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-613"><a href="#DuckDB-613"><span class="linenos">613</span></a>
-</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">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB-615"><a href="#DuckDB-615"><span class="linenos">615</span></a>
-</span><span id="DuckDB-616"><a href="#DuckDB-616"><span class="linenos">616</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-617"><a href="#DuckDB-617"><span class="linenos">617</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-618"><a href="#DuckDB-618"><span class="linenos">618</span></a>
-</span><span id="DuckDB-619"><a href="#DuckDB-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB-610"><a href="#DuckDB-610"><span class="linenos">610</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB-611"><a href="#DuckDB-611"><span class="linenos">611</span></a>
+</span><span id="DuckDB-612"><a href="#DuckDB-612"><span class="linenos">612</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-613"><a href="#DuckDB-613"><span class="linenos">613</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-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="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-616"><a href="#DuckDB-616"><span class="linenos">616</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-617"><a href="#DuckDB-617"><span class="linenos">617</span></a> <span class="c1"># Make the order key the first arg and slide the fraction to the right</span>
+</span><span id="DuckDB-618"><a href="#DuckDB-618"><span class="linenos">618</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB-619"><a href="#DuckDB-619"><span class="linenos">619</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-620"><a href="#DuckDB-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB-621"><a href="#DuckDB-621"><span class="linenos">621</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-622"><a href="#DuckDB-622"><span class="linenos">622</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-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="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-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">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>
@@ -1493,17 +1520,17 @@ Possible values: <code>"nulls_are_small"</code>, <code>"nulls_are_large"</code>,
</div>
<a class="headerlink" href="#DuckDB.to_json_path"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.to_json_path-179"><a href="#DuckDB.to_json_path-179"><span class="linenos">179</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
-</span><span id="DuckDB.to_json_path-180"><a href="#DuckDB.to_json_path-180"><span class="linenos">180</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
-</span><span id="DuckDB.to_json_path-181"><a href="#DuckDB.to_json_path-181"><span class="linenos">181</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
-</span><span id="DuckDB.to_json_path-182"><a href="#DuckDB.to_json_path-182"><span class="linenos">182</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
-</span><span id="DuckDB.to_json_path-183"><a href="#DuckDB.to_json_path-183"><span class="linenos">183</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
-</span><span id="DuckDB.to_json_path-184"><a href="#DuckDB.to_json_path-184"><span class="linenos">184</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
-</span><span id="DuckDB.to_json_path-185"><a href="#DuckDB.to_json_path-185"><span class="linenos">185</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
-</span><span id="DuckDB.to_json_path-186"><a href="#DuckDB.to_json_path-186"><span class="linenos">186</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
-</span><span id="DuckDB.to_json_path-187"><a href="#DuckDB.to_json_path-187"><span class="linenos">187</span></a> <span class="k">return</span> <span class="n">path</span>
-</span><span id="DuckDB.to_json_path-188"><a href="#DuckDB.to_json_path-188"><span class="linenos">188</span></a>
-</span><span id="DuckDB.to_json_path-189"><a href="#DuckDB.to_json_path-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.to_json_path-169"><a href="#DuckDB.to_json_path-169"><span class="linenos">169</span></a> <span class="k">def</span> <span class="nf">to_json_path</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</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="n">exp</span><span class="o">.</span><span class="n">Expression</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>
+</span><span id="DuckDB.to_json_path-170"><a href="#DuckDB.to_json_path-170"><span class="linenos">170</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="p">):</span>
+</span><span id="DuckDB.to_json_path-171"><a href="#DuckDB.to_json_path-171"><span class="linenos">171</span></a> <span class="c1"># DuckDB also supports the JSON pointer syntax, where every path starts with a `/`.</span>
+</span><span id="DuckDB.to_json_path-172"><a href="#DuckDB.to_json_path-172"><span class="linenos">172</span></a> <span class="c1"># Additionally, it allows accessing the back of lists using the `[#-i]` syntax.</span>
+</span><span id="DuckDB.to_json_path-173"><a href="#DuckDB.to_json_path-173"><span class="linenos">173</span></a> <span class="c1"># This check ensures we&#39;ll avoid trying to parse these as JSON paths, which can</span>
+</span><span id="DuckDB.to_json_path-174"><a href="#DuckDB.to_json_path-174"><span class="linenos">174</span></a> <span class="c1"># either result in a noisy warning or in an invalid representation of the path.</span>
+</span><span id="DuckDB.to_json_path-175"><a href="#DuckDB.to_json_path-175"><span class="linenos">175</span></a> <span class="n">path_text</span> <span class="o">=</span> <span class="n">path</span><span class="o">.</span><span class="n">name</span>
+</span><span id="DuckDB.to_json_path-176"><a href="#DuckDB.to_json_path-176"><span class="linenos">176</span></a> <span class="k">if</span> <span class="n">path_text</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">&quot;[#&quot;</span> <span class="ow">in</span> <span class="n">path_text</span><span class="p">:</span>
+</span><span id="DuckDB.to_json_path-177"><a href="#DuckDB.to_json_path-177"><span class="linenos">177</span></a> <span class="k">return</span> <span class="n">path</span>
+</span><span id="DuckDB.to_json_path-178"><a href="#DuckDB.to_json_path-178"><span class="linenos">178</span></a>
+</span><span id="DuckDB.to_json_path-179"><a href="#DuckDB.to_json_path-179"><span class="linenos">179</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">to_json_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
</span></pre></div>
@@ -1804,42 +1831,42 @@ Possible values: <code>"nulls_are_small"</code>, <code>"nulls_are_large"</code>,
</div>
<a class="headerlink" href="#DuckDB.Tokenizer"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Tokenizer-191"><a href="#DuckDB.Tokenizer-191"><span class="linenos">191</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
-</span><span id="DuckDB.Tokenizer-192"><a href="#DuckDB.Tokenizer-192"><span class="linenos">192</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
-</span><span id="DuckDB.Tokenizer-193"><a href="#DuckDB.Tokenizer-193"><span class="linenos">193</span></a>
-</span><span id="DuckDB.Tokenizer-194"><a href="#DuckDB.Tokenizer-194"><span class="linenos">194</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB.Tokenizer-195"><a href="#DuckDB.Tokenizer-195"><span class="linenos">195</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
-</span><span id="DuckDB.Tokenizer-196"><a href="#DuckDB.Tokenizer-196"><span class="linenos">196</span></a>
-</span><span id="DuckDB.Tokenizer-197"><a href="#DuckDB.Tokenizer-197"><span class="linenos">197</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Tokenizer-198"><a href="#DuckDB.Tokenizer-198"><span class="linenos">198</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-199"><a href="#DuckDB.Tokenizer-199"><span class="linenos">199</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-200"><a href="#DuckDB.Tokenizer-200"><span class="linenos">200</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-201"><a href="#DuckDB.Tokenizer-201"><span class="linenos">201</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-202"><a href="#DuckDB.Tokenizer-202"><span class="linenos">202</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-203"><a href="#DuckDB.Tokenizer-203"><span class="linenos">203</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-204"><a href="#DuckDB.Tokenizer-204"><span class="linenos">204</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-205"><a href="#DuckDB.Tokenizer-205"><span class="linenos">205</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-206"><a href="#DuckDB.Tokenizer-206"><span class="linenos">206</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-207"><a href="#DuckDB.Tokenizer-207"><span class="linenos">207</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-208"><a href="#DuckDB.Tokenizer-208"><span class="linenos">208</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-209"><a href="#DuckDB.Tokenizer-209"><span class="linenos">209</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-210"><a href="#DuckDB.Tokenizer-210"><span class="linenos">210</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-211"><a href="#DuckDB.Tokenizer-211"><span class="linenos">211</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-212"><a href="#DuckDB.Tokenizer-212"><span class="linenos">212</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-213"><a href="#DuckDB.Tokenizer-213"><span class="linenos">213</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-214"><a href="#DuckDB.Tokenizer-214"><span class="linenos">214</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-215"><a href="#DuckDB.Tokenizer-215"><span class="linenos">215</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-216"><a href="#DuckDB.Tokenizer-216"><span class="linenos">216</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-217"><a href="#DuckDB.Tokenizer-217"><span class="linenos">217</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-218"><a href="#DuckDB.Tokenizer-218"><span class="linenos">218</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-219"><a href="#DuckDB.Tokenizer-219"><span class="linenos">219</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-220"><a href="#DuckDB.Tokenizer-220"><span class="linenos">220</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-221"><a href="#DuckDB.Tokenizer-221"><span class="linenos">221</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Tokenizer-222"><a href="#DuckDB.Tokenizer-222"><span class="linenos">222</span></a>
-</span><span id="DuckDB.Tokenizer-223"><a href="#DuckDB.Tokenizer-223"><span class="linenos">223</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Tokenizer-224"><a href="#DuckDB.Tokenizer-224"><span class="linenos">224</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-225"><a href="#DuckDB.Tokenizer-225"><span class="linenos">225</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
-</span><span id="DuckDB.Tokenizer-226"><a href="#DuckDB.Tokenizer-226"><span class="linenos">226</span></a> <span class="p">}</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Tokenizer-181"><a href="#DuckDB.Tokenizer-181"><span class="linenos">181</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span>
+</span><span id="DuckDB.Tokenizer-182"><a href="#DuckDB.Tokenizer-182"><span class="linenos">182</span></a> <span class="n">HEREDOC_STRINGS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">]</span>
+</span><span id="DuckDB.Tokenizer-183"><a href="#DuckDB.Tokenizer-183"><span class="linenos">183</span></a>
+</span><span id="DuckDB.Tokenizer-184"><a href="#DuckDB.Tokenizer-184"><span class="linenos">184</span></a> <span class="n">HEREDOC_TAG_IS_IDENTIFIER</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB.Tokenizer-185"><a href="#DuckDB.Tokenizer-185"><span class="linenos">185</span></a> <span class="n">HEREDOC_STRING_ALTERNATIVE</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span>
+</span><span id="DuckDB.Tokenizer-186"><a href="#DuckDB.Tokenizer-186"><span class="linenos">186</span></a>
+</span><span id="DuckDB.Tokenizer-187"><a href="#DuckDB.Tokenizer-187"><span class="linenos">187</span></a> <span class="n">KEYWORDS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Tokenizer-188"><a href="#DuckDB.Tokenizer-188"><span class="linenos">188</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-189"><a href="#DuckDB.Tokenizer-189"><span class="linenos">189</span></a> <span class="s2">&quot;//&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-190"><a href="#DuckDB.Tokenizer-190"><span class="linenos">190</span></a> <span class="s2">&quot;ATTACH&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-191"><a href="#DuckDB.Tokenizer-191"><span class="linenos">191</span></a> <span class="s2">&quot;BINARY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-192"><a href="#DuckDB.Tokenizer-192"><span class="linenos">192</span></a> <span class="s2">&quot;BITSTRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-193"><a href="#DuckDB.Tokenizer-193"><span class="linenos">193</span></a> <span class="s2">&quot;BPCHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-194"><a href="#DuckDB.Tokenizer-194"><span class="linenos">194</span></a> <span class="s2">&quot;CHAR&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-195"><a href="#DuckDB.Tokenizer-195"><span class="linenos">195</span></a> <span class="s2">&quot;CHARACTER VARYING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-196"><a href="#DuckDB.Tokenizer-196"><span class="linenos">196</span></a> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-197"><a href="#DuckDB.Tokenizer-197"><span class="linenos">197</span></a> <span class="s2">&quot;LOGICAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-198"><a href="#DuckDB.Tokenizer-198"><span class="linenos">198</span></a> <span class="s2">&quot;ONLY&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ONLY</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-199"><a href="#DuckDB.Tokenizer-199"><span class="linenos">199</span></a> <span class="s2">&quot;PIVOT_WIDER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-200"><a href="#DuckDB.Tokenizer-200"><span class="linenos">200</span></a> <span class="s2">&quot;POSITIONAL&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">POSITIONAL</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-201"><a href="#DuckDB.Tokenizer-201"><span class="linenos">201</span></a> <span class="s2">&quot;SIGNED&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-202"><a href="#DuckDB.Tokenizer-202"><span class="linenos">202</span></a> <span class="s2">&quot;STRING&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-203"><a href="#DuckDB.Tokenizer-203"><span class="linenos">203</span></a> <span class="s2">&quot;UBIGINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UBIGINT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-204"><a href="#DuckDB.Tokenizer-204"><span class="linenos">204</span></a> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UINT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-205"><a href="#DuckDB.Tokenizer-205"><span class="linenos">205</span></a> <span class="s2">&quot;USMALLINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USMALLINT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-206"><a href="#DuckDB.Tokenizer-206"><span class="linenos">206</span></a> <span class="s2">&quot;UTINYINT&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-207"><a href="#DuckDB.Tokenizer-207"><span class="linenos">207</span></a> <span class="s2">&quot;TIMESTAMP_S&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_S</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-208"><a href="#DuckDB.Tokenizer-208"><span class="linenos">208</span></a> <span class="s2">&quot;TIMESTAMP_MS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_MS</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-209"><a href="#DuckDB.Tokenizer-209"><span class="linenos">209</span></a> <span class="s2">&quot;TIMESTAMP_NS&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_NS</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-210"><a href="#DuckDB.Tokenizer-210"><span class="linenos">210</span></a> <span class="s2">&quot;TIMESTAMP_US&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-211"><a href="#DuckDB.Tokenizer-211"><span class="linenos">211</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Tokenizer-212"><a href="#DuckDB.Tokenizer-212"><span class="linenos">212</span></a>
+</span><span id="DuckDB.Tokenizer-213"><a href="#DuckDB.Tokenizer-213"><span class="linenos">213</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Tokenizer-214"><a href="#DuckDB.Tokenizer-214"><span class="linenos">214</span></a> <span class="o">**</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-215"><a href="#DuckDB.Tokenizer-215"><span class="linenos">215</span></a> <span class="s2">&quot;$&quot;</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span>
+</span><span id="DuckDB.Tokenizer-216"><a href="#DuckDB.Tokenizer-216"><span class="linenos">216</span></a> <span class="p">}</span>
</span></pre></div>
@@ -1950,135 +1977,135 @@ Possible values: <code>"nulls_are_small"</code>, <code>"nulls_are_large"</code>,
</div>
<a class="headerlink" href="#DuckDB.Parser"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Parser-228"><a href="#DuckDB.Parser-228"><span class="linenos">228</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
-</span><span id="DuckDB.Parser-229"><a href="#DuckDB.Parser-229"><span class="linenos">229</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Parser-230"><a href="#DuckDB.Parser-230"><span class="linenos">230</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-231"><a href="#DuckDB.Parser-231"><span class="linenos">231</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-232"><a href="#DuckDB.Parser-232"><span class="linenos">232</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Parser-233"><a href="#DuckDB.Parser-233"><span class="linenos">233</span></a>
-</span><span id="DuckDB.Parser-234"><a href="#DuckDB.Parser-234"><span class="linenos">234</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
-</span><span id="DuckDB.Parser-235"><a href="#DuckDB.Parser-235"><span class="linenos">235</span></a>
-</span><span id="DuckDB.Parser-236"><a href="#DuckDB.Parser-236"><span class="linenos">236</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Parser-237"><a href="#DuckDB.Parser-237"><span class="linenos">237</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-238"><a href="#DuckDB.Parser-238"><span class="linenos">238</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-239"><a href="#DuckDB.Parser-239"><span class="linenos">239</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-240"><a href="#DuckDB.Parser-240"><span class="linenos">240</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-241"><a href="#DuckDB.Parser-241"><span class="linenos">241</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-242"><a href="#DuckDB.Parser-242"><span class="linenos">242</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-243"><a href="#DuckDB.Parser-243"><span class="linenos">243</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-244"><a href="#DuckDB.Parser-244"><span class="linenos">244</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-245"><a href="#DuckDB.Parser-245"><span class="linenos">245</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-246"><a href="#DuckDB.Parser-246"><span class="linenos">246</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-247"><a href="#DuckDB.Parser-247"><span class="linenos">247</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-248"><a href="#DuckDB.Parser-248"><span class="linenos">248</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-249"><a href="#DuckDB.Parser-249"><span class="linenos">249</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-250"><a href="#DuckDB.Parser-250"><span class="linenos">250</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-251"><a href="#DuckDB.Parser-251"><span class="linenos">251</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-252"><a href="#DuckDB.Parser-252"><span class="linenos">252</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-253"><a href="#DuckDB.Parser-253"><span class="linenos">253</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
-</span><span id="DuckDB.Parser-254"><a href="#DuckDB.Parser-254"><span class="linenos">254</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-255"><a href="#DuckDB.Parser-255"><span class="linenos">255</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-256"><a href="#DuckDB.Parser-256"><span class="linenos">256</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-257"><a href="#DuckDB.Parser-257"><span class="linenos">257</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-258"><a href="#DuckDB.Parser-258"><span class="linenos">258</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-259"><a href="#DuckDB.Parser-259"><span class="linenos">259</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-260"><a href="#DuckDB.Parser-260"><span class="linenos">260</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-261"><a href="#DuckDB.Parser-261"><span class="linenos">261</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-262"><a href="#DuckDB.Parser-262"><span class="linenos">262</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-263"><a href="#DuckDB.Parser-263"><span class="linenos">263</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-264"><a href="#DuckDB.Parser-264"><span class="linenos">264</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-265"><a href="#DuckDB.Parser-265"><span class="linenos">265</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-266"><a href="#DuckDB.Parser-266"><span class="linenos">266</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-267"><a href="#DuckDB.Parser-267"><span class="linenos">267</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-268"><a href="#DuckDB.Parser-268"><span class="linenos">268</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-269"><a href="#DuckDB.Parser-269"><span class="linenos">269</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-270"><a href="#DuckDB.Parser-270"><span class="linenos">270</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-271"><a href="#DuckDB.Parser-271"><span class="linenos">271</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-272"><a href="#DuckDB.Parser-272"><span class="linenos">272</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-273"><a href="#DuckDB.Parser-273"><span class="linenos">273</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-274"><a href="#DuckDB.Parser-274"><span class="linenos">274</span></a> <span class="n">this</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><span id="DuckDB.Parser-275"><a href="#DuckDB.Parser-275"><span class="linenos">275</span></a> <span class="n">expression</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-276"><a href="#DuckDB.Parser-276"><span class="linenos">276</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-277"><a href="#DuckDB.Parser-277"><span class="linenos">277</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-278"><a href="#DuckDB.Parser-278"><span class="linenos">278</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-279"><a href="#DuckDB.Parser-279"><span class="linenos">279</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-280"><a href="#DuckDB.Parser-280"><span class="linenos">280</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-281"><a href="#DuckDB.Parser-281"><span class="linenos">281</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-282"><a href="#DuckDB.Parser-282"><span class="linenos">282</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-283"><a href="#DuckDB.Parser-283"><span class="linenos">283</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-284"><a href="#DuckDB.Parser-284"><span class="linenos">284</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-285"><a href="#DuckDB.Parser-285"><span class="linenos">285</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-286"><a href="#DuckDB.Parser-286"><span class="linenos">286</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-287"><a href="#DuckDB.Parser-287"><span class="linenos">287</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-288"><a href="#DuckDB.Parser-288"><span class="linenos">288</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-289"><a href="#DuckDB.Parser-289"><span class="linenos">289</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-290"><a href="#DuckDB.Parser-290"><span class="linenos">290</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
-</span><span id="DuckDB.Parser-291"><a href="#DuckDB.Parser-291"><span class="linenos">291</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB.Parser-292"><a href="#DuckDB.Parser-292"><span class="linenos">292</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Parser-293"><a href="#DuckDB.Parser-293"><span class="linenos">293</span></a>
-</span><span id="DuckDB.Parser-294"><a href="#DuckDB.Parser-294"><span class="linenos">294</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
-</span><span id="DuckDB.Parser-295"><a href="#DuckDB.Parser-295"><span class="linenos">295</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Parser-218"><a href="#DuckDB.Parser-218"><span class="linenos">218</span></a> <span class="k">class</span> <span class="nc">Parser</span><span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="p">):</span>
+</span><span id="DuckDB.Parser-219"><a href="#DuckDB.Parser-219"><span class="linenos">219</span></a> <span class="n">BITWISE</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Parser-220"><a href="#DuckDB.Parser-220"><span class="linenos">220</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">BITWISE</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-221"><a href="#DuckDB.Parser-221"><span class="linenos">221</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-222"><a href="#DuckDB.Parser-222"><span class="linenos">222</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Parser-223"><a href="#DuckDB.Parser-223"><span class="linenos">223</span></a>
+</span><span id="DuckDB.Parser-224"><a href="#DuckDB.Parser-224"><span class="linenos">224</span></a> <span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span> <span class="o">=</span> <span class="p">{</span><span class="o">*</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS_WITH_ALIASED_ARGS</span><span class="p">,</span> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">}</span>
+</span><span id="DuckDB.Parser-225"><a href="#DuckDB.Parser-225"><span class="linenos">225</span></a>
+</span><span id="DuckDB.Parser-226"><a href="#DuckDB.Parser-226"><span class="linenos">226</span></a> <span class="n">FUNCTIONS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Parser-227"><a href="#DuckDB.Parser-227"><span class="linenos">227</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTIONS</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-228"><a href="#DuckDB.Parser-228"><span class="linenos">228</span></a> <span class="s2">&quot;ARRAY_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-229"><a href="#DuckDB.Parser-229"><span class="linenos">229</span></a> <span class="s2">&quot;ARRAY_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-230"><a href="#DuckDB.Parser-230"><span class="linenos">230</span></a> <span class="s2">&quot;ARRAY_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-231"><a href="#DuckDB.Parser-231"><span class="linenos">231</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-232"><a href="#DuckDB.Parser-232"><span class="linenos">232</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">:</span> <span class="n">_build_date_diff</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-233"><a href="#DuckDB.Parser-233"><span class="linenos">233</span></a> <span class="s2">&quot;DATE_TRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-234"><a href="#DuckDB.Parser-234"><span class="linenos">234</span></a> <span class="s2">&quot;DATETRUNC&quot;</span><span class="p">:</span> <span class="n">date_trunc_to_time</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-235"><a href="#DuckDB.Parser-235"><span class="linenos">235</span></a> <span class="s2">&quot;DECODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-236"><a href="#DuckDB.Parser-236"><span class="linenos">236</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-237"><a href="#DuckDB.Parser-237"><span class="linenos">237</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-238"><a href="#DuckDB.Parser-238"><span class="linenos">238</span></a> <span class="s2">&quot;ENCODE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-239"><a href="#DuckDB.Parser-239"><span class="linenos">239</span></a> <span class="n">this</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">charset</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">string</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-240"><a href="#DuckDB.Parser-240"><span class="linenos">240</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-241"><a href="#DuckDB.Parser-241"><span class="linenos">241</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-242"><a href="#DuckDB.Parser-242"><span class="linenos">242</span></a> <span class="s2">&quot;EPOCH_MS&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-243"><a href="#DuckDB.Parser-243"><span class="linenos">243</span></a> <span class="n">this</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">scale</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">MILLIS</span>
+</span><span id="DuckDB.Parser-244"><a href="#DuckDB.Parser-244"><span class="linenos">244</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-245"><a href="#DuckDB.Parser-245"><span class="linenos">245</span></a> <span class="s2">&quot;JSON&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-246"><a href="#DuckDB.Parser-246"><span class="linenos">246</span></a> <span class="s2">&quot;JSON_EXTRACT_PATH&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-247"><a href="#DuckDB.Parser-247"><span class="linenos">247</span></a> <span class="s2">&quot;JSON_EXTRACT_STRING&quot;</span><span class="p">:</span> <span class="n">parser</span><span class="o">.</span><span class="n">build_extract_json_with_path</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-248"><a href="#DuckDB.Parser-248"><span class="linenos">248</span></a> <span class="s2">&quot;LIST_HAS&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayContains</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-249"><a href="#DuckDB.Parser-249"><span class="linenos">249</span></a> <span class="s2">&quot;LIST_REVERSE_SORT&quot;</span><span class="p">:</span> <span class="n">_build_sort_array_desc</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-250"><a href="#DuckDB.Parser-250"><span class="linenos">250</span></a> <span class="s2">&quot;LIST_SORT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-251"><a href="#DuckDB.Parser-251"><span class="linenos">251</span></a> <span class="s2">&quot;LIST_VALUE&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-252"><a href="#DuckDB.Parser-252"><span class="linenos">252</span></a> <span class="s2">&quot;MAKE_TIME&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">TimeFromParts</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-253"><a href="#DuckDB.Parser-253"><span class="linenos">253</span></a> <span class="s2">&quot;MAKE_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">_build_make_timestamp</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-254"><a href="#DuckDB.Parser-254"><span class="linenos">254</span></a> <span class="s2">&quot;MEDIAN&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-255"><a href="#DuckDB.Parser-255"><span class="linenos">255</span></a> <span class="n">this</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">expression</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">0.5</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-256"><a href="#DuckDB.Parser-256"><span class="linenos">256</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-257"><a href="#DuckDB.Parser-257"><span class="linenos">257</span></a> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-258"><a href="#DuckDB.Parser-258"><span class="linenos">258</span></a> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-259"><a href="#DuckDB.Parser-259"><span class="linenos">259</span></a> <span class="s2">&quot;REGEXP_EXTRACT&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-260"><a href="#DuckDB.Parser-260"><span class="linenos">260</span></a> <span class="n">this</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">expression</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 class="n">group</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">2</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-261"><a href="#DuckDB.Parser-261"><span class="linenos">261</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-262"><a href="#DuckDB.Parser-262"><span class="linenos">262</span></a> <span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-263"><a href="#DuckDB.Parser-263"><span class="linenos">263</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">args</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-264"><a href="#DuckDB.Parser-264"><span class="linenos">264</span></a> <span class="n">this</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><span id="DuckDB.Parser-265"><a href="#DuckDB.Parser-265"><span class="linenos">265</span></a> <span class="n">expression</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-266"><a href="#DuckDB.Parser-266"><span class="linenos">266</span></a> <span class="n">replacement</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">2</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-267"><a href="#DuckDB.Parser-267"><span class="linenos">267</span></a> <span class="n">modifiers</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">3</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-268"><a href="#DuckDB.Parser-268"><span class="linenos">268</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-269"><a href="#DuckDB.Parser-269"><span class="linenos">269</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-270"><a href="#DuckDB.Parser-270"><span class="linenos">270</span></a> <span class="s2">&quot;STRING_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-271"><a href="#DuckDB.Parser-271"><span class="linenos">271</span></a> <span class="s2">&quot;STRING_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-272"><a href="#DuckDB.Parser-272"><span class="linenos">272</span></a> <span class="s2">&quot;STRING_TO_ARRAY&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-273"><a href="#DuckDB.Parser-273"><span class="linenos">273</span></a> <span class="s2">&quot;STRPTIME&quot;</span><span class="p">:</span> <span class="n">build_formatted_time</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">,</span> <span class="s2">&quot;duckdb&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-274"><a href="#DuckDB.Parser-274"><span class="linenos">274</span></a> <span class="s2">&quot;STRUCT_PACK&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-275"><a href="#DuckDB.Parser-275"><span class="linenos">275</span></a> <span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-276"><a href="#DuckDB.Parser-276"><span class="linenos">276</span></a> <span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-277"><a href="#DuckDB.Parser-277"><span class="linenos">277</span></a> <span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-278"><a href="#DuckDB.Parser-278"><span class="linenos">278</span></a> <span class="s2">&quot;UNNEST&quot;</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-279"><a href="#DuckDB.Parser-279"><span class="linenos">279</span></a> <span class="s2">&quot;XOR&quot;</span><span class="p">:</span> <span class="n">binary_from_function</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-280"><a href="#DuckDB.Parser-280"><span class="linenos">280</span></a> <span class="s2">&quot;GENERATE_SERIES&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(),</span>
+</span><span id="DuckDB.Parser-281"><a href="#DuckDB.Parser-281"><span class="linenos">281</span></a> <span class="s2">&quot;RANGE&quot;</span><span class="p">:</span> <span class="n">_build_generate_series</span><span class="p">(</span><span class="n">end_exclusive</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB.Parser-282"><a href="#DuckDB.Parser-282"><span class="linenos">282</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Parser-283"><a href="#DuckDB.Parser-283"><span class="linenos">283</span></a>
+</span><span id="DuckDB.Parser-284"><a href="#DuckDB.Parser-284"><span class="linenos">284</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+</span><span id="DuckDB.Parser-285"><a href="#DuckDB.Parser-285"><span class="linenos">285</span></a> <span class="n">FUNCTION_PARSERS</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;DECODE&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-286"><a href="#DuckDB.Parser-286"><span class="linenos">286</span></a>
+</span><span id="DuckDB.Parser-287"><a href="#DuckDB.Parser-287"><span class="linenos">287</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Parser-288"><a href="#DuckDB.Parser-288"><span class="linenos">288</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-289"><a href="#DuckDB.Parser-289"><span class="linenos">289</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
+</span><span id="DuckDB.Parser-290"><a href="#DuckDB.Parser-290"><span class="linenos">290</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Parser-291"><a href="#DuckDB.Parser-291"><span class="linenos">291</span></a>
+</span><span id="DuckDB.Parser-292"><a href="#DuckDB.Parser-292"><span class="linenos">292</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
+</span><span id="DuckDB.Parser-293"><a href="#DuckDB.Parser-293"><span class="linenos">293</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-294"><a href="#DuckDB.Parser-294"><span class="linenos">294</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-295"><a href="#DuckDB.Parser-295"><span class="linenos">295</span></a> <span class="p">}</span>
</span><span id="DuckDB.Parser-296"><a href="#DuckDB.Parser-296"><span class="linenos">296</span></a>
-</span><span id="DuckDB.Parser-297"><a href="#DuckDB.Parser-297"><span class="linenos">297</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Parser-298"><a href="#DuckDB.Parser-298"><span class="linenos">298</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">NO_PAREN_FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-299"><a href="#DuckDB.Parser-299"><span class="linenos">299</span></a> <span class="s2">&quot;MAP&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_map</span><span class="p">(),</span>
-</span><span id="DuckDB.Parser-300"><a href="#DuckDB.Parser-300"><span class="linenos">300</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Parser-301"><a href="#DuckDB.Parser-301"><span class="linenos">301</span></a>
-</span><span id="DuckDB.Parser-302"><a href="#DuckDB.Parser-302"><span class="linenos">302</span></a> <span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">TABLE_ALIAS_TOKENS</span> <span class="o">-</span> <span class="p">{</span>
-</span><span id="DuckDB.Parser-303"><a href="#DuckDB.Parser-303"><span class="linenos">303</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-304"><a href="#DuckDB.Parser-304"><span class="linenos">304</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-305"><a href="#DuckDB.Parser-305"><span class="linenos">305</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Parser-306"><a href="#DuckDB.Parser-306"><span class="linenos">306</span></a>
-</span><span id="DuckDB.Parser-307"><a href="#DuckDB.Parser-307"><span class="linenos">307</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Parser-308"><a href="#DuckDB.Parser-308"><span class="linenos">308</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
-</span><span id="DuckDB.Parser-309"><a href="#DuckDB.Parser-309"><span class="linenos">309</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
-</span><span id="DuckDB.Parser-310"><a href="#DuckDB.Parser-310"><span class="linenos">310</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-311"><a href="#DuckDB.Parser-311"><span class="linenos">311</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-312"><a href="#DuckDB.Parser-312"><span class="linenos">312</span></a> <span class="k">else</span> <span class="kc">None</span>
-</span><span id="DuckDB.Parser-313"><a href="#DuckDB.Parser-313"><span class="linenos">313</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Parser-314"><a href="#DuckDB.Parser-314"><span class="linenos">314</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Parser-315"><a href="#DuckDB.Parser-315"><span class="linenos">315</span></a>
-</span><span id="DuckDB.Parser-316"><a href="#DuckDB.Parser-316"><span class="linenos">316</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-317"><a href="#DuckDB.Parser-317"><span class="linenos">317</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="DuckDB.Parser-318"><a href="#DuckDB.Parser-318"><span class="linenos">318</span></a> <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>
-</span><span id="DuckDB.Parser-319"><a href="#DuckDB.Parser-319"><span class="linenos">319</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-320"><a href="#DuckDB.Parser-320"><span class="linenos">320</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
-</span><span id="DuckDB.Parser-321"><a href="#DuckDB.Parser-321"><span class="linenos">321</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-322"><a href="#DuckDB.Parser-322"><span class="linenos">322</span></a>
-</span><span id="DuckDB.Parser-323"><a href="#DuckDB.Parser-323"><span class="linenos">323</span></a> <span class="k">return</span> <span class="n">bracket</span>
-</span><span id="DuckDB.Parser-324"><a href="#DuckDB.Parser-324"><span class="linenos">324</span></a>
-</span><span id="DuckDB.Parser-325"><a href="#DuckDB.Parser-325"><span class="linenos">325</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
-</span><span id="DuckDB.Parser-326"><a href="#DuckDB.Parser-326"><span class="linenos">326</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-327"><a href="#DuckDB.Parser-327"><span class="linenos">327</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-297"><a href="#DuckDB.Parser-297"><span class="linenos">297</span></a> <span class="n">PLACEHOLDER_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Parser-298"><a href="#DuckDB.Parser-298"><span class="linenos">298</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">PLACEHOLDER_PARSERS</span><span class="p">,</span>
+</span><span id="DuckDB.Parser-299"><a href="#DuckDB.Parser-299"><span class="linenos">299</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="p">(</span>
+</span><span id="DuckDB.Parser-300"><a href="#DuckDB.Parser-300"><span class="linenos">300</span></a> <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">Placeholder</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">_prev</span><span class="o">.</span><span class="n">text</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-301"><a href="#DuckDB.Parser-301"><span class="linenos">301</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">NUMBER</span><span class="p">)</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ID_VAR_TOKENS</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-302"><a href="#DuckDB.Parser-302"><span class="linenos">302</span></a> <span class="k">else</span> <span class="kc">None</span>
+</span><span id="DuckDB.Parser-303"><a href="#DuckDB.Parser-303"><span class="linenos">303</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Parser-304"><a href="#DuckDB.Parser-304"><span class="linenos">304</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Parser-305"><a href="#DuckDB.Parser-305"><span class="linenos">305</span></a>
+</span><span id="DuckDB.Parser-306"><a href="#DuckDB.Parser-306"><span class="linenos">306</span></a> <span class="k">def</span> <span class="nf">_parse_bracket</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-307"><a href="#DuckDB.Parser-307"><span class="linenos">307</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">this</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="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="DuckDB.Parser-308"><a href="#DuckDB.Parser-308"><span class="linenos">308</span></a> <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>
+</span><span id="DuckDB.Parser-309"><a href="#DuckDB.Parser-309"><span class="linenos">309</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">_parse_bracket</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-310"><a href="#DuckDB.Parser-310"><span class="linenos">310</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">bracket</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Bracket</span><span class="p">):</span>
+</span><span id="DuckDB.Parser-311"><a href="#DuckDB.Parser-311"><span class="linenos">311</span></a> <span class="n">bracket</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;returns_list_for_maps&quot;</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-312"><a href="#DuckDB.Parser-312"><span class="linenos">312</span></a>
+</span><span id="DuckDB.Parser-313"><a href="#DuckDB.Parser-313"><span class="linenos">313</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Parser-314"><a href="#DuckDB.Parser-314"><span class="linenos">314</span></a>
+</span><span id="DuckDB.Parser-315"><a href="#DuckDB.Parser-315"><span class="linenos">315</span></a> <span class="k">def</span> <span class="nf">_parse_map</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">ToMap</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span>
+</span><span id="DuckDB.Parser-316"><a href="#DuckDB.Parser-316"><span class="linenos">316</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-317"><a href="#DuckDB.Parser-317"><span class="linenos">317</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-318"><a href="#DuckDB.Parser-318"><span class="linenos">318</span></a>
+</span><span id="DuckDB.Parser-319"><a href="#DuckDB.Parser-319"><span class="linenos">319</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-320"><a href="#DuckDB.Parser-320"><span class="linenos">320</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-321"><a href="#DuckDB.Parser-321"><span class="linenos">321</span></a>
+</span><span id="DuckDB.Parser-322"><a href="#DuckDB.Parser-322"><span class="linenos">322</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-323"><a href="#DuckDB.Parser-323"><span class="linenos">323</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB.Parser-324"><a href="#DuckDB.Parser-324"><span class="linenos">324</span></a> <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>
+</span><span id="DuckDB.Parser-325"><a href="#DuckDB.Parser-325"><span class="linenos">325</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
+</span><span id="DuckDB.Parser-326"><a href="#DuckDB.Parser-326"><span class="linenos">326</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
+</span><span id="DuckDB.Parser-327"><a href="#DuckDB.Parser-327"><span class="linenos">327</span></a> <span class="p">)</span>
</span><span id="DuckDB.Parser-328"><a href="#DuckDB.Parser-328"><span class="linenos">328</span></a>
-</span><span id="DuckDB.Parser-329"><a href="#DuckDB.Parser-329"><span class="linenos">329</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-330"><a href="#DuckDB.Parser-330"><span class="linenos">330</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-331"><a href="#DuckDB.Parser-331"><span class="linenos">331</span></a>
-</span><span id="DuckDB.Parser-332"><a href="#DuckDB.Parser-332"><span class="linenos">332</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-333"><a href="#DuckDB.Parser-333"><span class="linenos">333</span></a> <span class="bp">self</span><span class="p">,</span> <span class="n">check_func</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="n">schema</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="n">allow_identifiers</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB.Parser-334"><a href="#DuckDB.Parser-334"><span class="linenos">334</span></a> <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>
-</span><span id="DuckDB.Parser-335"><a href="#DuckDB.Parser-335"><span class="linenos">335</span></a> <span class="n">this</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_parse_types</span><span class="p">(</span>
-</span><span id="DuckDB.Parser-336"><a href="#DuckDB.Parser-336"><span class="linenos">336</span></a> <span class="n">check_func</span><span class="o">=</span><span class="n">check_func</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span> <span class="n">allow_identifiers</span><span class="o">=</span><span class="n">allow_identifiers</span>
-</span><span id="DuckDB.Parser-337"><a href="#DuckDB.Parser-337"><span class="linenos">337</span></a> <span class="p">)</span>
-</span><span id="DuckDB.Parser-338"><a href="#DuckDB.Parser-338"><span class="linenos">338</span></a>
-</span><span id="DuckDB.Parser-339"><a href="#DuckDB.Parser-339"><span class="linenos">339</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
-</span><span id="DuckDB.Parser-340"><a href="#DuckDB.Parser-340"><span class="linenos">340</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
-</span><span id="DuckDB.Parser-341"><a href="#DuckDB.Parser-341"><span class="linenos">341</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB.Parser-342"><a href="#DuckDB.Parser-342"><span class="linenos">342</span></a> <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">DataType</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-343"><a href="#DuckDB.Parser-343"><span class="linenos">343</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-344"><a href="#DuckDB.Parser-344"><span class="linenos">344</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="DuckDB.Parser-345"><a href="#DuckDB.Parser-345"><span class="linenos">345</span></a> <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="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</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">return</span> <span class="n">this</span>
-</span><span id="DuckDB.Parser-349"><a href="#DuckDB.Parser-349"><span class="linenos">349</span></a>
-</span><span id="DuckDB.Parser-350"><a href="#DuckDB.Parser-350"><span class="linenos">350</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>
-</span><span id="DuckDB.Parser-351"><a href="#DuckDB.Parser-351"><span class="linenos">351</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
-</span><span id="DuckDB.Parser-352"><a href="#DuckDB.Parser-352"><span class="linenos">352</span></a>
-</span><span id="DuckDB.Parser-353"><a href="#DuckDB.Parser-353"><span class="linenos">353</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
-</span><span id="DuckDB.Parser-354"><a href="#DuckDB.Parser-354"><span class="linenos">354</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-</span><span id="DuckDB.Parser-355"><a href="#DuckDB.Parser-355"><span class="linenos">355</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span>
-</span><span id="DuckDB.Parser-356"><a href="#DuckDB.Parser-356"><span class="linenos">356</span></a> <span class="k">return</span> <span class="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-329"><a href="#DuckDB.Parser-329"><span class="linenos">329</span></a> <span class="c1"># DuckDB treats NUMERIC and DECIMAL without precision as DECIMAL(18, 3)</span>
+</span><span id="DuckDB.Parser-330"><a href="#DuckDB.Parser-330"><span class="linenos">330</span></a> <span class="c1"># See: https://duckdb.org/docs/sql/data_types/numeric</span>
+</span><span id="DuckDB.Parser-331"><a href="#DuckDB.Parser-331"><span class="linenos">331</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB.Parser-332"><a href="#DuckDB.Parser-332"><span class="linenos">332</span></a> <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">DataType</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-333"><a href="#DuckDB.Parser-333"><span class="linenos">333</span></a> <span class="ow">and</span> <span class="n">this</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;numeric&quot;</span><span class="p">,</span> <span class="s2">&quot;decimal&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-334"><a href="#DuckDB.Parser-334"><span class="linenos">334</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">this</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="DuckDB.Parser-335"><a href="#DuckDB.Parser-335"><span class="linenos">335</span></a> <span class="p">):</span>
+</span><span id="DuckDB.Parser-336"><a href="#DuckDB.Parser-336"><span class="linenos">336</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;DECIMAL(18, 3)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Parser-337"><a href="#DuckDB.Parser-337"><span class="linenos">337</span></a>
+</span><span id="DuckDB.Parser-338"><a href="#DuckDB.Parser-338"><span class="linenos">338</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="DuckDB.Parser-339"><a href="#DuckDB.Parser-339"><span class="linenos">339</span></a>
+</span><span id="DuckDB.Parser-340"><a href="#DuckDB.Parser-340"><span class="linenos">340</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>
+</span><span id="DuckDB.Parser-341"><a href="#DuckDB.Parser-341"><span class="linenos">341</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_field_def</span><span class="p">()</span>
+</span><span id="DuckDB.Parser-342"><a href="#DuckDB.Parser-342"><span class="linenos">342</span></a>
+</span><span id="DuckDB.Parser-343"><a href="#DuckDB.Parser-343"><span class="linenos">343</span></a> <span class="k">def</span> <span class="nf">_pivot_column_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">aggregations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
+</span><span id="DuckDB.Parser-344"><a href="#DuckDB.Parser-344"><span class="linenos">344</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aggregations</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+</span><span id="DuckDB.Parser-345"><a href="#DuckDB.Parser-345"><span class="linenos">345</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_pivot_column_names</span><span class="p">(</span><span class="n">aggregations</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="n">pivot_column_names</span><span class="p">(</span><span class="n">aggregations</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">&quot;duckdb&quot;</span><span class="p">)</span>
</span></pre></div>
@@ -2115,7 +2142,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_PACK&#39;, &#39;STRUCT&#39;}</span>
+<span class="default_value">{&#39;STRUCT&#39;, &#39;STRUCT_PACK&#39;}</span>
</div>
@@ -2167,7 +2194,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.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;, &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &lt;TokenType.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.FINAL: &#39;FINAL&#39;&gt;, &lt;TokenType.TRUNCATE: &#39;TRUNCATE&#39;&gt;, &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.MODEL: &#39;MODEL&#39;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.AGGREGATEFUNCTION: &#39;AGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.SIMPLEAGGREGATEFUNCTION: &#39;SIMPLEAGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.SEQUENCE: &#39;SEQUENCE&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.IPV4: &#39;IPV4&#39;&gt;, &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.TOP: &#39;TOP&#39;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.TINYTEXT: &#39;TINYTEXT&#39;&gt;, &lt;TokenType.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.STORAGE_INTEGRATION: &#39;STORAGE_INTEGRATION&#39;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.IPV6: &#39;IPV6&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &lt;TokenType.NAME: &#39;NAME&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.DATE32: &#39;DATE32&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;TokenType.TINYBLOB: &#39;TINYBLOB&#39;&gt;, &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &lt;TokenType.END: &#39;END&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.BPCHAR: &#39;BPCHAR&#39;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;, &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &lt;TokenType.OBJECT_IDENTIFIER: &#39;OBJECT_IDENTIFIER&#39;&gt;, &lt;TokenType.REFRESH: &#39;REFRESH&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &lt;TokenType.DICTIONARY: &#39;DICTIONARY&#39;&gt;, &lt;TokenType.IS: &#39;IS&#39;&gt;, &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &lt;TokenType.KILL: &#39;KILL&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.OPERATOR: &#39;OPERATOR&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#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.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.IPV4: &#39;IPV4&#39;&gt;, &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &lt;TokenType.NAME: &#39;NAME&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.TIMESTAMP_MS: &#39;TIMESTAMP_MS&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.FINAL: &#39;FINAL&#39;&gt;, &lt;TokenType.IPV6: &#39;IPV6&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.MODEL: &#39;MODEL&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &lt;TokenType.IS: &#39;IS&#39;&gt;, &lt;TokenType.TIMESTAMP_NS: &#39;TIMESTAMP_NS&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.KILL: &#39;KILL&#39;&gt;, &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.AGGREGATEFUNCTION: &#39;AGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &lt;TokenType.SEQUENCE: &#39;SEQUENCE&#39;&gt;, &lt;TokenType.OBJECT_IDENTIFIER: &#39;OBJECT_IDENTIFIER&#39;&gt;, &lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &lt;TokenType.DATE32: &#39;DATE32&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &lt;TokenType.STORAGE_INTEGRATION: &#39;STORAGE_INTEGRATION&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &lt;TokenType.TOP: &#39;TOP&#39;&gt;, &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &lt;TokenType.BPCHAR: &#39;BPCHAR&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.REFRESH: &#39;REFRESH&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.SIMPLEAGGREGATEFUNCTION: &#39;SIMPLEAGGREGATEFUNCTION&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.TRUNCATE: &#39;TRUNCATE&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;, &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &lt;TokenType.UMEDIUMINT: &#39;UMEDIUMINT&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &lt;TokenType.DICTIONARY: &#39;DICTIONARY&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &lt;TokenType.TINYBLOB: &#39;TINYBLOB&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.TINYTEXT: &#39;TINYTEXT&#39;&gt;, &lt;TokenType.TIMESTAMP_S: &#39;TIMESTAMP_S&#39;&gt;, &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.UDECIMAL: &#39;UDECIMAL&#39;&gt;, &lt;TokenType.OPERATOR: &#39;OPERATOR&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;, &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &lt;TokenType.END: &#39;END&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;}</span>
</div>
@@ -2310,6 +2337,7 @@ Default: 3</li>
<dd id="DuckDB.Parser.VALUES_FOLLOWED_BY_PAREN" class="variable"><a href="../parser.html#Parser.VALUES_FOLLOWED_BY_PAREN">VALUES_FOLLOWED_BY_PAREN</a></dd>
<dd id="DuckDB.Parser.SUPPORTS_IMPLICIT_UNNEST" class="variable"><a href="../parser.html#Parser.SUPPORTS_IMPLICIT_UNNEST">SUPPORTS_IMPLICIT_UNNEST</a></dd>
<dd id="DuckDB.Parser.INTERVAL_SPANS" class="variable"><a href="../parser.html#Parser.INTERVAL_SPANS">INTERVAL_SPANS</a></dd>
+ <dd id="DuckDB.Parser.SUPPORTS_PARTITION_SELECTION" class="variable"><a href="../parser.html#Parser.SUPPORTS_PARTITION_SELECTION">SUPPORTS_PARTITION_SELECTION</a></dd>
<dd id="DuckDB.Parser.error_level" class="variable"><a href="../parser.html#Parser.error_level">error_level</a></dd>
<dd id="DuckDB.Parser.error_message_context" class="variable"><a href="../parser.html#Parser.error_message_context">error_message_context</a></dd>
<dd id="DuckDB.Parser.max_errors" class="variable"><a href="../parser.html#Parser.max_errors">max_errors</a></dd>
@@ -2339,268 +2367,285 @@ Default: 3</li>
</div>
<a class="headerlink" href="#DuckDB.Generator"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator-358"><a href="#DuckDB.Generator-358"><span class="linenos">358</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="DuckDB.Generator-359"><a href="#DuckDB.Generator-359"><span class="linenos">359</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="DuckDB.Generator-360"><a href="#DuckDB.Generator-360"><span class="linenos">360</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
-</span><span id="DuckDB.Generator-361"><a href="#DuckDB.Generator-361"><span class="linenos">361</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-362"><a href="#DuckDB.Generator-362"><span class="linenos">362</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-363"><a href="#DuckDB.Generator-363"><span class="linenos">363</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-364"><a href="#DuckDB.Generator-364"><span class="linenos">364</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="DuckDB.Generator-365"><a href="#DuckDB.Generator-365"><span class="linenos">365</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-366"><a href="#DuckDB.Generator-366"><span class="linenos">366</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-367"><a href="#DuckDB.Generator-367"><span class="linenos">367</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-368"><a href="#DuckDB.Generator-368"><span class="linenos">368</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-369"><a href="#DuckDB.Generator-369"><span class="linenos">369</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
-</span><span id="DuckDB.Generator-370"><a href="#DuckDB.Generator-370"><span class="linenos">370</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
-</span><span id="DuckDB.Generator-371"><a href="#DuckDB.Generator-371"><span class="linenos">371</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-372"><a href="#DuckDB.Generator-372"><span class="linenos">372</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
-</span><span id="DuckDB.Generator-373"><a href="#DuckDB.Generator-373"><span class="linenos">373</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB.Generator-374"><a href="#DuckDB.Generator-374"><span class="linenos">374</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-375"><a href="#DuckDB.Generator-375"><span class="linenos">375</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-376"><a href="#DuckDB.Generator-376"><span class="linenos">376</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-377"><a href="#DuckDB.Generator-377"><span class="linenos">377</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="DuckDB.Generator-378"><a href="#DuckDB.Generator-378"><span class="linenos">378</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="DuckDB.Generator-379"><a href="#DuckDB.Generator-379"><span class="linenos">379</span></a>
-</span><span id="DuckDB.Generator-380"><a href="#DuckDB.Generator-380"><span class="linenos">380</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Generator-381"><a href="#DuckDB.Generator-381"><span class="linenos">381</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-382"><a href="#DuckDB.Generator-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-383"><a href="#DuckDB.Generator-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-384"><a href="#DuckDB.Generator-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-385"><a href="#DuckDB.Generator-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-386"><a href="#DuckDB.Generator-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-387"><a href="#DuckDB.Generator-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-388"><a href="#DuckDB.Generator-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-389"><a href="#DuckDB.Generator-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-390"><a href="#DuckDB.Generator-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-391"><a href="#DuckDB.Generator-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-392"><a href="#DuckDB.Generator-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-393"><a href="#DuckDB.Generator-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-394"><a href="#DuckDB.Generator-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-395"><a href="#DuckDB.Generator-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-396"><a href="#DuckDB.Generator-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-397"><a href="#DuckDB.Generator-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-398"><a href="#DuckDB.Generator-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-399"><a href="#DuckDB.Generator-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-400"><a href="#DuckDB.Generator-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-401"><a href="#DuckDB.Generator-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-402"><a href="#DuckDB.Generator-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-403"><a href="#DuckDB.Generator-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-404"><a href="#DuckDB.Generator-404"><span class="linenos">404</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator-405"><a href="#DuckDB.Generator-405"><span class="linenos">405</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-406"><a href="#DuckDB.Generator-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-407"><a href="#DuckDB.Generator-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-408"><a href="#DuckDB.Generator-408"><span class="linenos">408</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-409"><a href="#DuckDB.Generator-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-410"><a href="#DuckDB.Generator-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-411"><a href="#DuckDB.Generator-411"><span class="linenos">411</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-412"><a href="#DuckDB.Generator-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-413"><a href="#DuckDB.Generator-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-414"><a href="#DuckDB.Generator-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-415"><a href="#DuckDB.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-416"><a href="#DuckDB.Generator-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-417"><a href="#DuckDB.Generator-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-418"><a href="#DuckDB.Generator-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-419"><a href="#DuckDB.Generator-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-420"><a href="#DuckDB.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-421"><a href="#DuckDB.Generator-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-422"><a href="#DuckDB.Generator-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-423"><a href="#DuckDB.Generator-423"><span class="linenos">423</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-424"><a href="#DuckDB.Generator-424"><span class="linenos">424</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-425"><a href="#DuckDB.Generator-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-426"><a href="#DuckDB.Generator-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-427"><a href="#DuckDB.Generator-427"><span class="linenos">427</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-428"><a href="#DuckDB.Generator-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-429"><a href="#DuckDB.Generator-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_CONT&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-430"><a href="#DuckDB.Generator-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">_rename_unless_within_group</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_DISC&quot;</span><span class="p">,</span> <span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-431"><a href="#DuckDB.Generator-431"><span class="linenos">431</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
-</span><span id="DuckDB.Generator-432"><a href="#DuckDB.Generator-432"><span class="linenos">432</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
-</span><span id="DuckDB.Generator-433"><a href="#DuckDB.Generator-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
-</span><span id="DuckDB.Generator-434"><a href="#DuckDB.Generator-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-435"><a href="#DuckDB.Generator-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-436"><a href="#DuckDB.Generator-436"><span class="linenos">436</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-437"><a href="#DuckDB.Generator-437"><span class="linenos">437</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-438"><a href="#DuckDB.Generator-438"><span class="linenos">438</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-439"><a href="#DuckDB.Generator-439"><span class="linenos">439</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-440"><a href="#DuckDB.Generator-440"><span class="linenos">440</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-441"><a href="#DuckDB.Generator-441"><span class="linenos">441</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-442"><a href="#DuckDB.Generator-442"><span class="linenos">442</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-443"><a href="#DuckDB.Generator-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-444"><a href="#DuckDB.Generator-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-445"><a href="#DuckDB.Generator-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-446"><a href="#DuckDB.Generator-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-447"><a href="#DuckDB.Generator-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-448"><a href="#DuckDB.Generator-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-449"><a href="#DuckDB.Generator-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-450"><a href="#DuckDB.Generator-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-451"><a href="#DuckDB.Generator-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-452"><a href="#DuckDB.Generator-452"><span class="linenos">452</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
-</span><span id="DuckDB.Generator-453"><a href="#DuckDB.Generator-453"><span class="linenos">453</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-454"><a href="#DuckDB.Generator-454"><span class="linenos">454</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-455"><a href="#DuckDB.Generator-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-456"><a href="#DuckDB.Generator-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-457"><a href="#DuckDB.Generator-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-458"><a href="#DuckDB.Generator-458"><span class="linenos">458</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
-</span><span id="DuckDB.Generator-459"><a href="#DuckDB.Generator-459"><span class="linenos">459</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-460"><a href="#DuckDB.Generator-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-461"><a href="#DuckDB.Generator-461"><span class="linenos">461</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
-</span><span id="DuckDB.Generator-462"><a href="#DuckDB.Generator-462"><span class="linenos">462</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-463"><a href="#DuckDB.Generator-463"><span class="linenos">463</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-464"><a href="#DuckDB.Generator-464"><span class="linenos">464</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-465"><a href="#DuckDB.Generator-465"><span class="linenos">465</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-466"><a href="#DuckDB.Generator-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
-</span><span id="DuckDB.Generator-467"><a href="#DuckDB.Generator-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-468"><a href="#DuckDB.Generator-468"><span class="linenos">468</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-469"><a href="#DuckDB.Generator-469"><span class="linenos">469</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-470"><a href="#DuckDB.Generator-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-471"><a href="#DuckDB.Generator-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-472"><a href="#DuckDB.Generator-472"><span class="linenos">472</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-473"><a href="#DuckDB.Generator-473"><span class="linenos">473</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-474"><a href="#DuckDB.Generator-474"><span class="linenos">474</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-475"><a href="#DuckDB.Generator-475"><span class="linenos">475</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-476"><a href="#DuckDB.Generator-476"><span class="linenos">476</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-477"><a href="#DuckDB.Generator-477"><span class="linenos">477</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
-</span><span id="DuckDB.Generator-478"><a href="#DuckDB.Generator-478"><span class="linenos">478</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-479"><a href="#DuckDB.Generator-479"><span class="linenos">479</span></a> <span class="p">),</span>
-</span><span id="DuckDB.Generator-480"><a href="#DuckDB.Generator-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-481"><a href="#DuckDB.Generator-481"><span class="linenos">481</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-482"><a href="#DuckDB.Generator-482"><span class="linenos">482</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-483"><a href="#DuckDB.Generator-483"><span class="linenos">483</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
-</span><span id="DuckDB.Generator-484"><a href="#DuckDB.Generator-484"><span class="linenos">484</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-485"><a href="#DuckDB.Generator-485"><span class="linenos">485</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Generator-486"><a href="#DuckDB.Generator-486"><span class="linenos">486</span></a>
-</span><span id="DuckDB.Generator-487"><a href="#DuckDB.Generator-487"><span class="linenos">487</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Generator-488"><a href="#DuckDB.Generator-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-489"><a href="#DuckDB.Generator-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-490"><a href="#DuckDB.Generator-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-491"><a href="#DuckDB.Generator-491"><span class="linenos">491</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-492"><a href="#DuckDB.Generator-492"><span class="linenos">492</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Generator-493"><a href="#DuckDB.Generator-493"><span class="linenos">493</span></a>
-</span><span id="DuckDB.Generator-494"><a href="#DuckDB.Generator-494"><span class="linenos">494</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Generator-495"><a href="#DuckDB.Generator-495"><span class="linenos">495</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-496"><a href="#DuckDB.Generator-496"><span class="linenos">496</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-497"><a href="#DuckDB.Generator-497"><span class="linenos">497</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-498"><a href="#DuckDB.Generator-498"><span class="linenos">498</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-499"><a href="#DuckDB.Generator-499"><span class="linenos">499</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-500"><a href="#DuckDB.Generator-500"><span class="linenos">500</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-501"><a href="#DuckDB.Generator-501"><span class="linenos">501</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-502"><a href="#DuckDB.Generator-502"><span class="linenos">502</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-503"><a href="#DuckDB.Generator-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">VARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
-</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">TIMESTAMP_S</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_S&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">TIMESTAMP_MS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_MS&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">TIMESTAMP_NS</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP_NS&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="p">}</span>
-</span><span id="DuckDB.Generator-508"><a href="#DuckDB.Generator-508"><span class="linenos">508</span></a>
-</span><span id="DuckDB.Generator-509"><a href="#DuckDB.Generator-509"><span class="linenos">509</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator-348"><a href="#DuckDB.Generator-348"><span class="linenos">348</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="DuckDB.Generator-349"><a href="#DuckDB.Generator-349"><span class="linenos">349</span></a> <span class="n">PARAMETER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="DuckDB.Generator-350"><a href="#DuckDB.Generator-350"><span class="linenos">350</span></a> <span class="n">NAMED_PLACEHOLDER_TOKEN</span> <span class="o">=</span> <span class="s2">&quot;$&quot;</span>
+</span><span id="DuckDB.Generator-351"><a href="#DuckDB.Generator-351"><span class="linenos">351</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-352"><a href="#DuckDB.Generator-352"><span class="linenos">352</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-353"><a href="#DuckDB.Generator-353"><span class="linenos">353</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-354"><a href="#DuckDB.Generator-354"><span class="linenos">354</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="DuckDB.Generator-355"><a href="#DuckDB.Generator-355"><span class="linenos">355</span></a> <span class="n">STRUCT_DELIMITER</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;(&quot;</span><span class="p">,</span> <span class="s2">&quot;)&quot;</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-356"><a href="#DuckDB.Generator-356"><span class="linenos">356</span></a> <span class="n">RENAME_TABLE_WITH_DB</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-357"><a href="#DuckDB.Generator-357"><span class="linenos">357</span></a> <span class="n">NVL2_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-358"><a href="#DuckDB.Generator-358"><span class="linenos">358</span></a> <span class="n">SEMI_ANTI_JOIN_WITH_SIDE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-359"><a href="#DuckDB.Generator-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_KEYWORDS</span> <span class="o">=</span> <span class="s2">&quot;USING SAMPLE&quot;</span>
+</span><span id="DuckDB.Generator-360"><a href="#DuckDB.Generator-360"><span class="linenos">360</span></a> <span class="n">TABLESAMPLE_SEED_KEYWORD</span> <span class="o">=</span> <span class="s2">&quot;REPEATABLE&quot;</span>
+</span><span id="DuckDB.Generator-361"><a href="#DuckDB.Generator-361"><span class="linenos">361</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-362"><a href="#DuckDB.Generator-362"><span class="linenos">362</span></a> <span class="n">JSON_KEY_VALUE_PAIR_SEP</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span>
+</span><span id="DuckDB.Generator-363"><a href="#DuckDB.Generator-363"><span class="linenos">363</span></a> <span class="n">IGNORE_NULLS_IN_FUNC</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB.Generator-364"><a href="#DuckDB.Generator-364"><span class="linenos">364</span></a> <span class="n">JSON_PATH_BRACKETED_KEY_SUPPORTED</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-365"><a href="#DuckDB.Generator-365"><span class="linenos">365</span></a> <span class="n">SUPPORTS_CREATE_TABLE_LIKE</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-366"><a href="#DuckDB.Generator-366"><span class="linenos">366</span></a> <span class="n">MULTI_ARG_DISTINCT</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-367"><a href="#DuckDB.Generator-367"><span class="linenos">367</span></a> <span class="n">CAN_IMPLEMENT_ARRAY_ANY</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="DuckDB.Generator-368"><a href="#DuckDB.Generator-368"><span class="linenos">368</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="DuckDB.Generator-369"><a href="#DuckDB.Generator-369"><span class="linenos">369</span></a>
+</span><span id="DuckDB.Generator-370"><a href="#DuckDB.Generator-370"><span class="linenos">370</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Generator-371"><a href="#DuckDB.Generator-371"><span class="linenos">371</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-372"><a href="#DuckDB.Generator-372"><span class="linenos">372</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-373"><a href="#DuckDB.Generator-373"><span class="linenos">373</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_unless_query</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-374"><a href="#DuckDB.Generator-374"><span class="linenos">374</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayFilter</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_FILTER&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-375"><a href="#DuckDB.Generator-375"><span class="linenos">375</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ARRAY_LENGTH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-376"><a href="#DuckDB.Generator-376"><span class="linenos">376</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MAX&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-377"><a href="#DuckDB.Generator-377"><span class="linenos">377</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">&quot;ARG_MIN&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-378"><a href="#DuckDB.Generator-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-379"><a href="#DuckDB.Generator-379"><span class="linenos">379</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySum</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LIST_SUM&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-380"><a href="#DuckDB.Generator-380"><span class="linenos">380</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">BitwiseXor</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;XOR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-381"><a href="#DuckDB.Generator-381"><span class="linenos">381</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CommentColumnConstraint</span><span class="p">:</span> <span class="n">no_comment_column_constraint_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-382"><a href="#DuckDB.Generator-382"><span class="linenos">382</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_DATE&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-383"><a href="#DuckDB.Generator-383"><span class="linenos">383</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTime</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIME&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-384"><a href="#DuckDB.Generator-384"><span class="linenos">384</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">CurrentTimestamp</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">&quot;CURRENT_TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-385"><a href="#DuckDB.Generator-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFMONTH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-386"><a href="#DuckDB.Generator-386"><span class="linenos">386</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfWeek</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFWEEK&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-387"><a href="#DuckDB.Generator-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DayOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;DAYOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-388"><a href="#DuckDB.Generator-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">:</span> <span class="n">_datatype_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-389"><a href="#DuckDB.Generator-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Date</span><span class="p">:</span> <span class="n">_date_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-390"><a href="#DuckDB.Generator-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-391"><a href="#DuckDB.Generator-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateFromParts</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;MAKE_DATE&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-392"><a href="#DuckDB.Generator-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-393"><a href="#DuckDB.Generator-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-394"><a href="#DuckDB.Generator-394"><span class="linenos">394</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator-395"><a href="#DuckDB.Generator-395"><span class="linenos">395</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-396"><a href="#DuckDB.Generator-396"><span class="linenos">396</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-397"><a href="#DuckDB.Generator-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-398"><a href="#DuckDB.Generator-398"><span class="linenos">398</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRFTIME(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-399"><a href="#DuckDB.Generator-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Decode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;DECODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-400"><a href="#DuckDB.Generator-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-401"><a href="#DuckDB.Generator-401"><span class="linenos">401</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(STRPTIME(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), </span><span class="si">{</span><span class="n">DuckDB</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">) AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-402"><a href="#DuckDB.Generator-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Encode</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">encode_decode_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="s2">&quot;ENCODE&quot;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">False</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-403"><a href="#DuckDB.Generator-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Explode</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNNEST&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-404"><a href="#DuckDB.Generator-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IntDiv</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">&quot;//&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-405"><a href="#DuckDB.Generator-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsInf</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISINF&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-406"><a href="#DuckDB.Generator-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;ISNAN&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-407"><a href="#DuckDB.Generator-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-408"><a href="#DuckDB.Generator-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">arrow_json_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-409"><a href="#DuckDB.Generator-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-410"><a href="#DuckDB.Generator-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalOr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_OR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-411"><a href="#DuckDB.Generator-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LogicalAnd</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BOOL_AND&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-412"><a href="#DuckDB.Generator-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MonthsBetween</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-413"><a href="#DuckDB.Generator-413"><span class="linenos">413</span></a> <span class="s2">&quot;DATEDIFF&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-414"><a href="#DuckDB.Generator-414"><span class="linenos">414</span></a> <span class="s2">&quot;&#39;month&#39;&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-415"><a href="#DuckDB.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-416"><a href="#DuckDB.Generator-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-417"><a href="#DuckDB.Generator-417"><span class="linenos">417</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-418"><a href="#DuckDB.Generator-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;JSON&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-419"><a href="#DuckDB.Generator-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileCont</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_CONT&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-420"><a href="#DuckDB.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PercentileDisc</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;QUANTILE_DISC&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-421"><a href="#DuckDB.Generator-421"><span class="linenos">421</span></a> <span class="c1"># DuckDB doesn&#39;t allow qualified columns inside of PIVOT expressions.</span>
+</span><span id="DuckDB.Generator-422"><a href="#DuckDB.Generator-422"><span class="linenos">422</span></a> <span class="c1"># See: https://github.com/duckdb/duckdb/blob/671faf92411182f81dce42ac43de8bfb05d9909e/src/planner/binder/tableref/bind_pivot.cpp#L61-L62</span>
+</span><span id="DuckDB.Generator-423"><a href="#DuckDB.Generator-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Pivot</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">([</span><span class="n">transforms</span><span class="o">.</span><span class="n">unqualify_columns</span><span class="p">]),</span>
+</span><span id="DuckDB.Generator-424"><a href="#DuckDB.Generator-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-425"><a href="#DuckDB.Generator-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-426"><a href="#DuckDB.Generator-426"><span class="linenos">426</span></a> <span class="s2">&quot;REGEXP_REPLACE&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-427"><a href="#DuckDB.Generator-427"><span class="linenos">427</span></a> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-428"><a href="#DuckDB.Generator-428"><span class="linenos">428</span></a> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-429"><a href="#DuckDB.Generator-429"><span class="linenos">429</span></a> <span class="n">e</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;replacement&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-430"><a href="#DuckDB.Generator-430"><span class="linenos">430</span></a> <span class="n">e</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;modifiers&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-431"><a href="#DuckDB.Generator-431"><span class="linenos">431</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-432"><a href="#DuckDB.Generator-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;REGEXP_MATCHES&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-433"><a href="#DuckDB.Generator-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT_REGEX&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-434"><a href="#DuckDB.Generator-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Rand</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;RANDOM&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-435"><a href="#DuckDB.Generator-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-436"><a href="#DuckDB.Generator-436"><span class="linenos">436</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;STR_SPLIT&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-437"><a href="#DuckDB.Generator-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SortArray</span><span class="p">:</span> <span class="n">_sort_array_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-438"><a href="#DuckDB.Generator-438"><span class="linenos">438</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">str_position_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-439"><a href="#DuckDB.Generator-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="n">str_to_time_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-440"><a href="#DuckDB.Generator-440"><span class="linenos">440</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToTime</span><span class="p">:</span> <span class="n">str_to_time_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-441"><a href="#DuckDB.Generator-441"><span class="linenos">441</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-442"><a href="#DuckDB.Generator-442"><span class="linenos">442</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRPTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
+</span><span id="DuckDB.Generator-443"><a href="#DuckDB.Generator-443"><span class="linenos">443</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-444"><a href="#DuckDB.Generator-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Struct</span><span class="p">:</span> <span class="n">_struct_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-445"><a href="#DuckDB.Generator-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeAdd</span><span class="p">:</span> <span class="n">_date_delta_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-446"><a href="#DuckDB.Generator-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Timestamp</span><span class="p">:</span> <span class="n">no_timestamp_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-447"><a href="#DuckDB.Generator-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-448"><a href="#DuckDB.Generator-448"><span class="linenos">448</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Literal</span><span class="o">.</span><span class="n">string</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">unit</span><span class="p">),</span> <span class="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span>
+</span><span id="DuckDB.Generator-449"><a href="#DuckDB.Generator-449"><span class="linenos">449</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-450"><a href="#DuckDB.Generator-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimestampTrunc</span><span class="p">:</span> <span class="n">timestamptrunc_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-451"><a href="#DuckDB.Generator-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">DATE</span><span class="p">)),</span>
+</span><span id="DuckDB.Generator-452"><a href="#DuckDB.Generator-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-453"><a href="#DuckDB.Generator-453"><span class="linenos">453</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-454"><a href="#DuckDB.Generator-454"><span class="linenos">454</span></a> <span class="s2">&quot;EPOCH&quot;</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-455"><a href="#DuckDB.Generator-455"><span class="linenos">455</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-456"><a href="#DuckDB.Generator-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span>
+</span><span id="DuckDB.Generator-457"><a href="#DuckDB.Generator-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;EPOCH&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-458"><a href="#DuckDB.Generator-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-459"><a href="#DuckDB.Generator-459"><span class="linenos">459</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(SUBSTR(REPLACE(CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS TEXT), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-460"><a href="#DuckDB.Generator-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_ts_or_ds_add_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-461"><a href="#DuckDB.Generator-461"><span class="linenos">461</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-462"><a href="#DuckDB.Generator-462"><span class="linenos">462</span></a> <span class="s2">&quot;DATE_DIFF&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-463"><a href="#DuckDB.Generator-463"><span class="linenos">463</span></a> <span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">e</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="s1">&#39;unit&#39;</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="s1">&#39;DAY&#39;</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-464"><a href="#DuckDB.Generator-464"><span class="linenos">464</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-465"><a href="#DuckDB.Generator-465"><span class="linenos">465</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">e</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-466"><a href="#DuckDB.Generator-466"><span class="linenos">466</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-467"><a href="#DuckDB.Generator-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-468"><a href="#DuckDB.Generator-468"><span class="linenos">468</span></a> <span class="s2">&quot;STRFTIME&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">&quot;TO_TIMESTAMP&quot;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</span><span id="DuckDB.Generator-469"><a href="#DuckDB.Generator-469"><span class="linenos">469</span></a> <span class="p">),</span>
+</span><span id="DuckDB.Generator-470"><a href="#DuckDB.Generator-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-471"><a href="#DuckDB.Generator-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(TO_TIMESTAMP(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">) AS TEXT)&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-472"><a href="#DuckDB.Generator-472"><span class="linenos">472</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VariancePop</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;VAR_POP&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-473"><a href="#DuckDB.Generator-473"><span class="linenos">473</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WeekOfYear</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;WEEKOFYEAR&quot;</span><span class="p">),</span>
+</span><span id="DuckDB.Generator-474"><a href="#DuckDB.Generator-474"><span class="linenos">474</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Xor</span><span class="p">:</span> <span class="n">bool_xor_sql</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-475"><a href="#DuckDB.Generator-475"><span class="linenos">475</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Generator-476"><a href="#DuckDB.Generator-476"><span class="linenos">476</span></a>
+</span><span id="DuckDB.Generator-477"><a href="#DuckDB.Generator-477"><span class="linenos">477</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Generator-478"><a href="#DuckDB.Generator-478"><span class="linenos">478</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathKey</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-479"><a href="#DuckDB.Generator-479"><span class="linenos">479</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathRoot</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-480"><a href="#DuckDB.Generator-480"><span class="linenos">480</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-481"><a href="#DuckDB.Generator-481"><span class="linenos">481</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-482"><a href="#DuckDB.Generator-482"><span class="linenos">482</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Generator-483"><a href="#DuckDB.Generator-483"><span class="linenos">483</span></a>
+</span><span id="DuckDB.Generator-484"><a href="#DuckDB.Generator-484"><span class="linenos">484</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="DuckDB.Generator-485"><a href="#DuckDB.Generator-485"><span class="linenos">485</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TYPE_MAPPING</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-486"><a href="#DuckDB.Generator-486"><span class="linenos">486</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">BINARY</span><span class="p">:</span> <span class="s2">&quot;BLOB&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-487"><a href="#DuckDB.Generator-487"><span class="linenos">487</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">CHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-488"><a href="#DuckDB.Generator-488"><span class="linenos">488</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">FLOAT</span><span class="p">:</span> <span class="s2">&quot;REAL&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-489"><a href="#DuckDB.Generator-489"><span class="linenos">489</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">NCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-490"><a href="#DuckDB.Generator-490"><span class="linenos">490</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">NVARCHAR</span><span class="p">:</span> <span class="s2">&quot;TEXT&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-491"><a href="#DuckDB.Generator-491"><span class="linenos">491</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">UINT</span><span class="p">:</span> <span class="s2">&quot;UINTEGER&quot;</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-492"><a href="#DuckDB.Generator-492"><span class="linenos">492</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-493"><a href="#DuckDB.Generator-493"><span class="linenos">493</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-494"><a href="#DuckDB.Generator-494"><span class="linenos">494</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-495"><a href="#DuckDB.Generator-495"><span class="linenos">495</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-496"><a href="#DuckDB.Generator-496"><span class="linenos">496</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-497"><a href="#DuckDB.Generator-497"><span class="linenos">497</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-498"><a href="#DuckDB.Generator-498"><span class="linenos">498</span></a> <span class="p">}</span>
+</span><span id="DuckDB.Generator-499"><a href="#DuckDB.Generator-499"><span class="linenos">499</span></a>
+</span><span id="DuckDB.Generator-500"><a href="#DuckDB.Generator-500"><span class="linenos">500</span></a> <span class="n">STAR_MAPPING</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">STAR_MAPPING</span><span class="p">,</span> <span class="s2">&quot;except&quot;</span><span class="p">:</span> <span class="s2">&quot;EXCLUDE&quot;</span><span class="p">}</span>
+</span><span id="DuckDB.Generator-501"><a href="#DuckDB.Generator-501"><span class="linenos">501</span></a>
+</span><span id="DuckDB.Generator-502"><a href="#DuckDB.Generator-502"><span class="linenos">502</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-503"><a href="#DuckDB.Generator-503"><span class="linenos">503</span></a>
+</span><span id="DuckDB.Generator-504"><a href="#DuckDB.Generator-504"><span class="linenos">504</span></a> <span class="c1"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
+</span><span id="DuckDB.Generator-505"><a href="#DuckDB.Generator-505"><span class="linenos">505</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
+</span><span id="DuckDB.Generator-506"><a href="#DuckDB.Generator-506"><span class="linenos">506</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</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">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-508"><a href="#DuckDB.Generator-508"><span class="linenos">508</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-509"><a href="#DuckDB.Generator-509"><span class="linenos">509</span></a> <span class="p">}</span>
</span><span id="DuckDB.Generator-510"><a href="#DuckDB.Generator-510"><span class="linenos">510</span></a>
-</span><span id="DuckDB.Generator-511"><a href="#DuckDB.Generator-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="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"># DuckDB doesn&#39;t generally support CREATE TABLE .. properties</span>
-</span><span id="DuckDB.Generator-514"><a href="#DuckDB.Generator-514"><span class="linenos">514</span></a> <span class="c1"># https://duckdb.org/docs/sql/statements/create_table.html</span>
-</span><span id="DuckDB.Generator-515"><a href="#DuckDB.Generator-515"><span class="linenos">515</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="DuckDB.Generator-516"><a href="#DuckDB.Generator-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="DuckDB.Generator-517"><a href="#DuckDB.Generator-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="DuckDB.Generator-518"><a href="#DuckDB.Generator-518"><span class="linenos">518</span></a> <span class="p">}</span>
-</span><span id="DuckDB.Generator-519"><a href="#DuckDB.Generator-519"><span class="linenos">519</span></a>
-</span><span id="DuckDB.Generator-520"><a href="#DuckDB.Generator-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="DuckDB.Generator-521"><a href="#DuckDB.Generator-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="DuckDB.Generator-522"><a href="#DuckDB.Generator-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="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">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-511"><a href="#DuckDB.Generator-511"><span class="linenos">511</span></a> <span class="c1"># There are a few exceptions (e.g. temporary tables) which are supported or</span>
+</span><span id="DuckDB.Generator-512"><a href="#DuckDB.Generator-512"><span class="linenos">512</span></a> <span class="c1"># can be transpiled to DuckDB, so we explicitly override them accordingly</span>
+</span><span id="DuckDB.Generator-513"><a href="#DuckDB.Generator-513"><span class="linenos">513</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-514"><a href="#DuckDB.Generator-514"><span class="linenos">514</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-515"><a href="#DuckDB.Generator-515"><span class="linenos">515</span></a>
+</span><span id="DuckDB.Generator-516"><a href="#DuckDB.Generator-516"><span class="linenos">516</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-517"><a href="#DuckDB.Generator-517"><span class="linenos">517</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-518"><a href="#DuckDB.Generator-518"><span class="linenos">518</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-519"><a href="#DuckDB.Generator-519"><span class="linenos">519</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-520"><a href="#DuckDB.Generator-520"><span class="linenos">520</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-521"><a href="#DuckDB.Generator-521"><span class="linenos">521</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-522"><a href="#DuckDB.Generator-522"><span class="linenos">522</span></a>
+</span><span id="DuckDB.Generator-523"><a href="#DuckDB.Generator-523"><span class="linenos">523</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-524"><a href="#DuckDB.Generator-524"><span class="linenos">524</span></a>
-</span><span id="DuckDB.Generator-525"><a href="#DuckDB.Generator-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="DuckDB.Generator-526"><a href="#DuckDB.Generator-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="DuckDB.Generator-527"><a href="#DuckDB.Generator-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="DuckDB.Generator-528"><a href="#DuckDB.Generator-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="DuckDB.Generator-529"><a href="#DuckDB.Generator-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="DuckDB.Generator-530"><a href="#DuckDB.Generator-530"><span class="linenos">530</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-525"><a href="#DuckDB.Generator-525"><span class="linenos">525</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-526"><a href="#DuckDB.Generator-526"><span class="linenos">526</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-527"><a href="#DuckDB.Generator-527"><span class="linenos">527</span></a>
+</span><span id="DuckDB.Generator-528"><a href="#DuckDB.Generator-528"><span class="linenos">528</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-529"><a href="#DuckDB.Generator-529"><span class="linenos">529</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-530"><a href="#DuckDB.Generator-530"><span class="linenos">530</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-531"><a href="#DuckDB.Generator-531"><span class="linenos">531</span></a>
-</span><span id="DuckDB.Generator-532"><a href="#DuckDB.Generator-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="DuckDB.Generator-533"><a href="#DuckDB.Generator-533"><span class="linenos">533</span></a>
-</span><span id="DuckDB.Generator-534"><a href="#DuckDB.Generator-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="DuckDB.Generator-535"><a href="#DuckDB.Generator-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="DuckDB.Generator-536"><a href="#DuckDB.Generator-536"><span class="linenos">536</span></a>
-</span><span id="DuckDB.Generator-537"><a href="#DuckDB.Generator-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="DuckDB.Generator-538"><a href="#DuckDB.Generator-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="DuckDB.Generator-539"><a href="#DuckDB.Generator-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="DuckDB.Generator-532"><a href="#DuckDB.Generator-532"><span class="linenos">532</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-533"><a href="#DuckDB.Generator-533"><span class="linenos">533</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-534"><a href="#DuckDB.Generator-534"><span class="linenos">534</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-535"><a href="#DuckDB.Generator-535"><span class="linenos">535</span></a>
+</span><span id="DuckDB.Generator-536"><a href="#DuckDB.Generator-536"><span class="linenos">536</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-537"><a href="#DuckDB.Generator-537"><span class="linenos">537</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-538"><a href="#DuckDB.Generator-538"><span class="linenos">538</span></a>
+</span><span id="DuckDB.Generator-539"><a href="#DuckDB.Generator-539"><span class="linenos">539</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-540"><a href="#DuckDB.Generator-540"><span class="linenos">540</span></a>
-</span><span id="DuckDB.Generator-541"><a href="#DuckDB.Generator-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="DuckDB.Generator-542"><a href="#DuckDB.Generator-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="DuckDB.Generator-543"><a href="#DuckDB.Generator-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="DuckDB.Generator-544"><a href="#DuckDB.Generator-544"><span class="linenos">544</span></a>
-</span><span id="DuckDB.Generator-545"><a href="#DuckDB.Generator-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="DuckDB.Generator-546"><a href="#DuckDB.Generator-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="DuckDB.Generator-547"><a href="#DuckDB.Generator-547"><span class="linenos">547</span></a>
-</span><span id="DuckDB.Generator-548"><a href="#DuckDB.Generator-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="DuckDB.Generator-549"><a href="#DuckDB.Generator-549"><span class="linenos">549</span></a>
-</span><span id="DuckDB.Generator-550"><a href="#DuckDB.Generator-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="DuckDB.Generator-551"><a href="#DuckDB.Generator-551"><span class="linenos">551</span></a> <span class="bp">self</span><span class="p">,</span>
-</span><span id="DuckDB.Generator-552"><a href="#DuckDB.Generator-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="DuckDB.Generator-553"><a href="#DuckDB.Generator-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="DuckDB.Generator-554"><a href="#DuckDB.Generator-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="DuckDB.Generator-555"><a href="#DuckDB.Generator-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="DuckDB.Generator-556"><a href="#DuckDB.Generator-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="DuckDB.Generator-557"><a href="#DuckDB.Generator-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="DuckDB.Generator-558"><a href="#DuckDB.Generator-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="DuckDB.Generator-559"><a href="#DuckDB.Generator-559"><span class="linenos">559</span></a>
-</span><span id="DuckDB.Generator-560"><a href="#DuckDB.Generator-560"><span class="linenos">560</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-561"><a href="#DuckDB.Generator-561"><span class="linenos">561</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-562"><a href="#DuckDB.Generator-562"><span class="linenos">562</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-541"><a href="#DuckDB.Generator-541"><span class="linenos">541</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator-542"><a href="#DuckDB.Generator-542"><span class="linenos">542</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator-543"><a href="#DuckDB.Generator-543"><span class="linenos">543</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-544"><a href="#DuckDB.Generator-544"><span class="linenos">544</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-545"><a href="#DuckDB.Generator-545"><span class="linenos">545</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-546"><a href="#DuckDB.Generator-546"><span class="linenos">546</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-547"><a href="#DuckDB.Generator-547"><span class="linenos">547</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-548"><a href="#DuckDB.Generator-548"><span class="linenos">548</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-549"><a href="#DuckDB.Generator-549"><span class="linenos">549</span></a> <span class="n">tablesample_keyword</span> <span class="o">=</span> <span class="s2">&quot;TABLESAMPLE&quot;</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">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-552"><a href="#DuckDB.Generator-552"><span class="linenos">552</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-553"><a href="#DuckDB.Generator-553"><span class="linenos">553</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator-554"><a href="#DuckDB.Generator-554"><span class="linenos">554</span></a>
+</span><span id="DuckDB.Generator-555"><a href="#DuckDB.Generator-555"><span class="linenos">555</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-556"><a href="#DuckDB.Generator-556"><span class="linenos">556</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-557"><a href="#DuckDB.Generator-557"><span class="linenos">557</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-558"><a href="#DuckDB.Generator-558"><span class="linenos">558</span></a>
+</span><span id="DuckDB.Generator-559"><a href="#DuckDB.Generator-559"><span class="linenos">559</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-560"><a href="#DuckDB.Generator-560"><span class="linenos">560</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</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">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-562"><a href="#DuckDB.Generator-562"><span class="linenos">562</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
</span><span id="DuckDB.Generator-563"><a href="#DuckDB.Generator-563"><span class="linenos">563</span></a>
-</span><span id="DuckDB.Generator-564"><a href="#DuckDB.Generator-564"><span class="linenos">564</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-565"><a href="#DuckDB.Generator-565"><span class="linenos">565</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-566"><a href="#DuckDB.Generator-566"><span class="linenos">566</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-567"><a href="#DuckDB.Generator-567"><span class="linenos">567</span></a>
-</span><span id="DuckDB.Generator-568"><a href="#DuckDB.Generator-568"><span class="linenos">568</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-569"><a href="#DuckDB.Generator-569"><span class="linenos">569</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB.Generator-570"><a href="#DuckDB.Generator-570"><span class="linenos">570</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-571"><a href="#DuckDB.Generator-571"><span class="linenos">571</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB.Generator-572"><a href="#DuckDB.Generator-572"><span class="linenos">572</span></a>
-</span><span id="DuckDB.Generator-573"><a href="#DuckDB.Generator-573"><span class="linenos">573</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
-</span><span id="DuckDB.Generator-574"><a href="#DuckDB.Generator-574"><span class="linenos">574</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-575"><a href="#DuckDB.Generator-575"><span class="linenos">575</span></a>
-</span><span id="DuckDB.Generator-576"><a href="#DuckDB.Generator-576"><span class="linenos">576</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-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">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-579"><a href="#DuckDB.Generator-579"><span class="linenos">579</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-580"><a href="#DuckDB.Generator-580"><span class="linenos">580</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-581"><a href="#DuckDB.Generator-581"><span class="linenos">581</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-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">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-584"><a href="#DuckDB.Generator-584"><span class="linenos">584</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB.Generator-585"><a href="#DuckDB.Generator-585"><span class="linenos">585</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-586"><a href="#DuckDB.Generator-586"><span class="linenos">586</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-587"><a href="#DuckDB.Generator-587"><span class="linenos">587</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-588"><a href="#DuckDB.Generator-588"><span class="linenos">588</span></a> <span class="p">):</span>
-</span><span id="DuckDB.Generator-589"><a href="#DuckDB.Generator-589"><span class="linenos">589</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB.Generator-590"><a href="#DuckDB.Generator-590"><span class="linenos">590</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-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">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-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">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-594"><a href="#DuckDB.Generator-594"><span class="linenos">594</span></a>
-</span><span id="DuckDB.Generator-595"><a href="#DuckDB.Generator-595"><span class="linenos">595</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-596"><a href="#DuckDB.Generator-596"><span class="linenos">596</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
-</span><span id="DuckDB.Generator-597"><a href="#DuckDB.Generator-597"><span class="linenos">597</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-598"><a href="#DuckDB.Generator-598"><span class="linenos">598</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-599"><a href="#DuckDB.Generator-599"><span class="linenos">599</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-564"><a href="#DuckDB.Generator-564"><span class="linenos">564</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-565"><a href="#DuckDB.Generator-565"><span class="linenos">565</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-566"><a href="#DuckDB.Generator-566"><span class="linenos">566</span></a>
+</span><span id="DuckDB.Generator-567"><a href="#DuckDB.Generator-567"><span class="linenos">567</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-568"><a href="#DuckDB.Generator-568"><span class="linenos">568</span></a>
+</span><span id="DuckDB.Generator-569"><a href="#DuckDB.Generator-569"><span class="linenos">569</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-570"><a href="#DuckDB.Generator-570"><span class="linenos">570</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-571"><a href="#DuckDB.Generator-571"><span class="linenos">571</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-572"><a href="#DuckDB.Generator-572"><span class="linenos">572</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-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">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-575"><a href="#DuckDB.Generator-575"><span class="linenos">575</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB.Generator-576"><a href="#DuckDB.Generator-576"><span class="linenos">576</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-577"><a href="#DuckDB.Generator-577"><span class="linenos">577</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-578"><a href="#DuckDB.Generator-578"><span class="linenos">578</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-579"><a href="#DuckDB.Generator-579"><span class="linenos">579</span></a> <span class="p">):</span>
+</span><span id="DuckDB.Generator-580"><a href="#DuckDB.Generator-580"><span class="linenos">580</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB.Generator-581"><a href="#DuckDB.Generator-581"><span class="linenos">581</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-582"><a href="#DuckDB.Generator-582"><span class="linenos">582</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-583"><a href="#DuckDB.Generator-583"><span class="linenos">583</span></a>
+</span><span id="DuckDB.Generator-584"><a href="#DuckDB.Generator-584"><span class="linenos">584</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-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">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-587"><a href="#DuckDB.Generator-587"><span class="linenos">587</span></a> <span class="c1"># GENERATE_SERIES(a, b) -&gt; [a, b], RANGE(a, b) -&gt; [a, b)</span>
+</span><span id="DuckDB.Generator-588"><a href="#DuckDB.Generator-588"><span class="linenos">588</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-589"><a href="#DuckDB.Generator-589"><span class="linenos">589</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-590"><a href="#DuckDB.Generator-590"><span class="linenos">590</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-591"><a href="#DuckDB.Generator-591"><span class="linenos">591</span></a>
+</span><span id="DuckDB.Generator-592"><a href="#DuckDB.Generator-592"><span class="linenos">592</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-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="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-595"><a href="#DuckDB.Generator-595"><span class="linenos">595</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-596"><a href="#DuckDB.Generator-596"><span class="linenos">596</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-597"><a href="#DuckDB.Generator-597"><span class="linenos">597</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-598"><a href="#DuckDB.Generator-598"><span class="linenos">598</span></a>
+</span><span id="DuckDB.Generator-599"><a href="#DuckDB.Generator-599"><span class="linenos">599</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-600"><a href="#DuckDB.Generator-600"><span class="linenos">600</span></a>
-</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">generateseries_sql</span><span class="p">(</span><span class="n">expression</span><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">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-604"><a href="#DuckDB.Generator-604"><span class="linenos">604</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-605"><a href="#DuckDB.Generator-605"><span class="linenos">605</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-606"><a href="#DuckDB.Generator-606"><span class="linenos">606</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-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="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-601"><a href="#DuckDB.Generator-601"><span class="linenos">601</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-602"><a href="#DuckDB.Generator-602"><span class="linenos">602</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-603"><a href="#DuckDB.Generator-603"><span class="linenos">603</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-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="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-606"><a href="#DuckDB.Generator-606"><span class="linenos">606</span></a>
+</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">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-608"><a href="#DuckDB.Generator-608"><span class="linenos">608</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-609"><a href="#DuckDB.Generator-609"><span class="linenos">609</span></a>
-</span><span id="DuckDB.Generator-610"><a href="#DuckDB.Generator-610"><span class="linenos">610</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-611"><a href="#DuckDB.Generator-611"><span class="linenos">611</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-612"><a href="#DuckDB.Generator-612"><span class="linenos">612</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-613"><a href="#DuckDB.Generator-613"><span class="linenos">613</span></a>
-</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">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator-615"><a href="#DuckDB.Generator-615"><span class="linenos">615</span></a>
-</span><span id="DuckDB.Generator-616"><a href="#DuckDB.Generator-616"><span class="linenos">616</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-617"><a href="#DuckDB.Generator-617"><span class="linenos">617</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-618"><a href="#DuckDB.Generator-618"><span class="linenos">618</span></a>
-</span><span id="DuckDB.Generator-619"><a href="#DuckDB.Generator-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Generator-610"><a href="#DuckDB.Generator-610"><span class="linenos">610</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Generator-611"><a href="#DuckDB.Generator-611"><span class="linenos">611</span></a>
+</span><span id="DuckDB.Generator-612"><a href="#DuckDB.Generator-612"><span class="linenos">612</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-613"><a href="#DuckDB.Generator-613"><span class="linenos">613</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-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="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-616"><a href="#DuckDB.Generator-616"><span class="linenos">616</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-617"><a href="#DuckDB.Generator-617"><span class="linenos">617</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-618"><a href="#DuckDB.Generator-618"><span class="linenos">618</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB.Generator-619"><a href="#DuckDB.Generator-619"><span class="linenos">619</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-620"><a href="#DuckDB.Generator-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB.Generator-621"><a href="#DuckDB.Generator-621"><span class="linenos">621</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-622"><a href="#DuckDB.Generator-622"><span class="linenos">622</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-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="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-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">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>
@@ -2889,7 +2934,7 @@ Default: True</li>
<div class="attr variable">
<span class="name">TRANSFORMS</span> =
<input id="DuckDB.Generator.TRANSFORMS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="DuckDB.Generator.TRANSFORMS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>&#39;&gt;: &lt;function no_comment_column_constraint_sql&gt;, &lt;class &#39;<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EphemeralColumnConstraint">sqlglot.expressions.EphemeralColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExcludeColumnConstraint">sqlglot.expressions.ExcludeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntervalSpan">sqlglot.expressions.IntervalSpan</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONExtract">sqlglot.expressions.JSONExtract</a>&#39;&gt;: &lt;function arrow_json_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#JSONExtractScalar">sqlglot.expressions.JSONExtractScalar</a>&#39;&gt;: &lt;function arrow_json_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>&#39;&gt;: &lt;function no_timestamp_sql&gt;, &lt;class &#39;<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithOperator">sqlglot.expressions.WithOperator</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;: &lt;function approx_count_distinct_sql&gt;, &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;: &lt;function inline_array_unless_query&gt;, &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;: &lt;function arg_max_or_min_no_count.&lt;locals&gt;._arg_max_or_min_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;: &lt;function arg_max_or_min_no_count.&lt;locals&gt;._arg_max_or_min_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArraySort">sqlglot.expressions.ArraySort</a>&#39;&gt;: &lt;function _array_sort_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArraySum">sqlglot.expressions.ArraySum</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#BitwiseXor">sqlglot.expressions.BitwiseXor</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentDate">sqlglot.expressions.CurrentDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentTime">sqlglot.expressions.CurrentTime</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentTimestamp">sqlglot.expressions.CurrentTimestamp</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DataType">sqlglot.expressions.DataType</a>&#39;&gt;: &lt;function _datatype_sql&gt;, &lt;class &#39;<a href="../expressions.html#Date">sqlglot.expressions.Date</a>&#39;&gt;: &lt;function _date_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateSub">sqlglot.expressions.DateSub</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateDiff">sqlglot.expressions.DateDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>&#39;&gt;: &lt;function datestrtodate_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Decode">sqlglot.expressions.Decode</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Encode">sqlglot.expressions.Encode</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntDiv">sqlglot.expressions.IntDiv</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>&#39;&gt;: &lt;function _json_format_sql&gt;, &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;: &lt;function _rename_unless_within_group.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;: &lt;function _rename_unless_within_group.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Pivot">sqlglot.expressions.Pivot</a>&#39;&gt;: &lt;function preprocess.&lt;locals&gt;._to_sql&gt;, &lt;class &#39;<a href="../expressions.html#RegexpExtract">sqlglot.expressions.RegexpExtract</a>&#39;&gt;: &lt;function regexp_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#RegexpReplace">sqlglot.expressions.RegexpReplace</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>&#39;&gt;: &lt;function no_safe_divide_sql&gt;, &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;: &lt;function _sort_array_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>&#39;&gt;: &lt;function str_position_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>&#39;&gt;: &lt;function str_to_time_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;: &lt;function _struct_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeAdd">sqlglot.expressions.TimeAdd</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimestampTrunc">sqlglot.expressions.TimestampTrunc</a>&#39;&gt;: &lt;function timestamptrunc_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>&#39;&gt;: &lt;function timestrtotime_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;: &lt;function _ts_or_ds_add_sql&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;: &lt;function _unix_to_time_sql&gt;, &lt;class &#39;<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Xor">sqlglot.expressions.Xor</a>&#39;&gt;: &lt;function bool_xor_sql&gt;}</span>
+ <label class="view-value-button pdoc-button" for="DuckDB.Generator.TRANSFORMS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;: &lt;function &lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>&#39;&gt;: &lt;function no_comment_column_constraint_sql&gt;, &lt;class &#39;<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EphemeralColumnConstraint">sqlglot.expressions.EphemeralColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExcludeColumnConstraint">sqlglot.expressions.ExcludeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntervalSpan">sqlglot.expressions.IntervalSpan</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONExtract">sqlglot.expressions.JSONExtract</a>&#39;&gt;: &lt;function arrow_json_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#JSONExtractScalar">sqlglot.expressions.JSONExtractScalar</a>&#39;&gt;: &lt;function arrow_json_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>&#39;&gt;: &lt;function no_timestamp_sql&gt;, &lt;class &#39;<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithOperator">sqlglot.expressions.WithOperator</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>&#39;&gt;: &lt;function approx_count_distinct_sql&gt;, &lt;class &#39;<a href="../expressions.html#Array">sqlglot.expressions.Array</a>&#39;&gt;: &lt;function inline_array_unless_query&gt;, &lt;class &#39;<a href="../expressions.html#ArrayFilter">sqlglot.expressions.ArrayFilter</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>&#39;&gt;: &lt;function arg_max_or_min_no_count.&lt;locals&gt;._arg_max_or_min_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>&#39;&gt;: &lt;function arg_max_or_min_no_count.&lt;locals&gt;._arg_max_or_min_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArraySort">sqlglot.expressions.ArraySort</a>&#39;&gt;: &lt;function _array_sort_sql&gt;, &lt;class &#39;<a href="../expressions.html#ArraySum">sqlglot.expressions.ArraySum</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#BitwiseXor">sqlglot.expressions.BitwiseXor</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentDate">sqlglot.expressions.CurrentDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentTime">sqlglot.expressions.CurrentTime</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CurrentTimestamp">sqlglot.expressions.CurrentTimestamp</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfMonth">sqlglot.expressions.DayOfMonth</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfWeek">sqlglot.expressions.DayOfWeek</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DayOfYear">sqlglot.expressions.DayOfYear</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DataType">sqlglot.expressions.DataType</a>&#39;&gt;: &lt;function _datatype_sql&gt;, &lt;class &#39;<a href="../expressions.html#Date">sqlglot.expressions.Date</a>&#39;&gt;: &lt;function _date_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateFromParts">sqlglot.expressions.DateFromParts</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateSub">sqlglot.expressions.DateSub</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateDiff">sqlglot.expressions.DateDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>&#39;&gt;: &lt;function datestrtodate_sql&gt;, &lt;class &#39;<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Decode">sqlglot.expressions.Decode</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Encode">sqlglot.expressions.Encode</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Explode">sqlglot.expressions.Explode</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntDiv">sqlglot.expressions.IntDiv</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IsInf">sqlglot.expressions.IsInf</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>&#39;&gt;: &lt;function _json_format_sql&gt;, &lt;class &#39;<a href="../expressions.html#LogicalOr">sqlglot.expressions.LogicalOr</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogicalAnd">sqlglot.expressions.LogicalAnd</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PercentileCont">sqlglot.expressions.PercentileCont</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PercentileDisc">sqlglot.expressions.PercentileDisc</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Pivot">sqlglot.expressions.Pivot</a>&#39;&gt;: &lt;function preprocess.&lt;locals&gt;._to_sql&gt;, &lt;class &#39;<a href="../expressions.html#RegexpExtract">sqlglot.expressions.RegexpExtract</a>&#39;&gt;: &lt;function regexp_extract_sql&gt;, &lt;class &#39;<a href="../expressions.html#RegexpReplace">sqlglot.expressions.RegexpReplace</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Rand">sqlglot.expressions.Rand</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>&#39;&gt;: &lt;function no_safe_divide_sql&gt;, &lt;class &#39;<a href="../expressions.html#Split">sqlglot.expressions.Split</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SortArray">sqlglot.expressions.SortArray</a>&#39;&gt;: &lt;function _sort_array_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>&#39;&gt;: &lt;function str_position_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>&#39;&gt;: &lt;function str_to_time_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Struct">sqlglot.expressions.Struct</a>&#39;&gt;: &lt;function _struct_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeAdd">sqlglot.expressions.TimeAdd</a>&#39;&gt;: &lt;function _date_delta_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimestampDiff">sqlglot.expressions.TimestampDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimestampTrunc">sqlglot.expressions.TimestampTrunc</a>&#39;&gt;: &lt;function timestamptrunc_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>&#39;&gt;: &lt;function timestrtotime_sql&gt;, &lt;class &#39;<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;: &lt;function _ts_or_ds_add_sql&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>&#39;&gt;: &lt;function _unix_to_time_sql&gt;, &lt;class &#39;<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>&#39;&gt;: &lt;function <a href="#DuckDB.Generator">DuckDB.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VariancePop">sqlglot.expressions.VariancePop</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WeekOfYear">sqlglot.expressions.WeekOfYear</a>&#39;&gt;: &lt;function rename_func.&lt;locals&gt;.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Xor">sqlglot.expressions.Xor</a>&#39;&gt;: &lt;function bool_xor_sql&gt;}</span>
</div>
@@ -2902,7 +2947,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#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &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;}</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#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>&#39;&gt;, &lt;class &#39;<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>&#39;&gt;}</span>
</div>
@@ -2915,7 +2960,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.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.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>
@@ -2972,14 +3017,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-525"><a href="#DuckDB.Generator.timefromparts_sql-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="DuckDB.Generator.timefromparts_sql-526"><a href="#DuckDB.Generator.timefromparts_sql-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="DuckDB.Generator.timefromparts_sql-527"><a href="#DuckDB.Generator.timefromparts_sql-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="DuckDB.Generator.timefromparts_sql-528"><a href="#DuckDB.Generator.timefromparts_sql-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="DuckDB.Generator.timefromparts_sql-529"><a href="#DuckDB.Generator.timefromparts_sql-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="DuckDB.Generator.timefromparts_sql-530"><a href="#DuckDB.Generator.timefromparts_sql-530"><span class="linenos">530</span></a> <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><span id="DuckDB.Generator.timefromparts_sql-532"><a href="#DuckDB.Generator.timefromparts_sql-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>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timefromparts_sql-516"><a href="#DuckDB.Generator.timefromparts_sql-516"><span class="linenos">516</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-517"><a href="#DuckDB.Generator.timefromparts_sql-517"><span class="linenos">517</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-518"><a href="#DuckDB.Generator.timefromparts_sql-518"><span class="linenos">518</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-519"><a href="#DuckDB.Generator.timefromparts_sql-519"><span class="linenos">519</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-520"><a href="#DuckDB.Generator.timefromparts_sql-520"><span class="linenos">520</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-521"><a href="#DuckDB.Generator.timefromparts_sql-521"><span class="linenos">521</span></a> <span class="p">)</span>
+</span><span id="DuckDB.Generator.timefromparts_sql-522"><a href="#DuckDB.Generator.timefromparts_sql-522"><span class="linenos">522</span></a>
+</span><span id="DuckDB.Generator.timefromparts_sql-523"><a href="#DuckDB.Generator.timefromparts_sql-523"><span class="linenos">523</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>
@@ -2997,21 +3042,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-534"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-535"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-536"><a href="#DuckDB.Generator.timestampfromparts_sql-536"><span class="linenos">536</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-537"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-538"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-539"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-540"><a href="#DuckDB.Generator.timestampfromparts_sql-540"><span class="linenos">540</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-541"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-542"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-543"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-544"><a href="#DuckDB.Generator.timestampfromparts_sql-544"><span class="linenos">544</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-545"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-546"><a href="#DuckDB.Generator.timestampfromparts_sql-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="DuckDB.Generator.timestampfromparts_sql-547"><a href="#DuckDB.Generator.timestampfromparts_sql-547"><span class="linenos">547</span></a>
-</span><span id="DuckDB.Generator.timestampfromparts_sql-548"><a href="#DuckDB.Generator.timestampfromparts_sql-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>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.timestampfromparts_sql-525"><a href="#DuckDB.Generator.timestampfromparts_sql-525"><span class="linenos">525</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-526"><a href="#DuckDB.Generator.timestampfromparts_sql-526"><span class="linenos">526</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-527"><a href="#DuckDB.Generator.timestampfromparts_sql-527"><span class="linenos">527</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-528"><a href="#DuckDB.Generator.timestampfromparts_sql-528"><span class="linenos">528</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-529"><a href="#DuckDB.Generator.timestampfromparts_sql-529"><span class="linenos">529</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-530"><a href="#DuckDB.Generator.timestampfromparts_sql-530"><span class="linenos">530</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-531"><a href="#DuckDB.Generator.timestampfromparts_sql-531"><span class="linenos">531</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-532"><a href="#DuckDB.Generator.timestampfromparts_sql-532"><span class="linenos">532</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-533"><a href="#DuckDB.Generator.timestampfromparts_sql-533"><span class="linenos">533</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-534"><a href="#DuckDB.Generator.timestampfromparts_sql-534"><span class="linenos">534</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-535"><a href="#DuckDB.Generator.timestampfromparts_sql-535"><span class="linenos">535</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-536"><a href="#DuckDB.Generator.timestampfromparts_sql-536"><span class="linenos">536</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-537"><a href="#DuckDB.Generator.timestampfromparts_sql-537"><span class="linenos">537</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-538"><a href="#DuckDB.Generator.timestampfromparts_sql-538"><span class="linenos">538</span></a>
+</span><span id="DuckDB.Generator.timestampfromparts_sql-539"><a href="#DuckDB.Generator.timestampfromparts_sql-539"><span class="linenos">539</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>
@@ -3029,19 +3074,19 @@ 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-550"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-551"><a href="#DuckDB.Generator.tablesample_sql-551"><span class="linenos">551</span></a> <span class="bp">self</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="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-553"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-554"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-555"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-556"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-557"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-558"><a href="#DuckDB.Generator.tablesample_sql-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="DuckDB.Generator.tablesample_sql-559"><a href="#DuckDB.Generator.tablesample_sql-559"><span class="linenos">559</span></a>
-</span><span id="DuckDB.Generator.tablesample_sql-560"><a href="#DuckDB.Generator.tablesample_sql-560"><span class="linenos">560</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-561"><a href="#DuckDB.Generator.tablesample_sql-561"><span class="linenos">561</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-562"><a href="#DuckDB.Generator.tablesample_sql-562"><span class="linenos">562</span></a> <span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.tablesample_sql-541"><a href="#DuckDB.Generator.tablesample_sql-541"><span class="linenos">541</span></a> <span class="k">def</span> <span class="nf">tablesample_sql</span><span class="p">(</span>
+</span><span id="DuckDB.Generator.tablesample_sql-542"><a href="#DuckDB.Generator.tablesample_sql-542"><span class="linenos">542</span></a> <span class="bp">self</span><span class="p">,</span>
+</span><span id="DuckDB.Generator.tablesample_sql-543"><a href="#DuckDB.Generator.tablesample_sql-543"><span class="linenos">543</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-544"><a href="#DuckDB.Generator.tablesample_sql-544"><span class="linenos">544</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-545"><a href="#DuckDB.Generator.tablesample_sql-545"><span class="linenos">545</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-546"><a href="#DuckDB.Generator.tablesample_sql-546"><span class="linenos">546</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-547"><a href="#DuckDB.Generator.tablesample_sql-547"><span class="linenos">547</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-548"><a href="#DuckDB.Generator.tablesample_sql-548"><span class="linenos">548</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-549"><a href="#DuckDB.Generator.tablesample_sql-549"><span class="linenos">549</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-550"><a href="#DuckDB.Generator.tablesample_sql-550"><span class="linenos">550</span></a>
+</span><span id="DuckDB.Generator.tablesample_sql-551"><a href="#DuckDB.Generator.tablesample_sql-551"><span class="linenos">551</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-552"><a href="#DuckDB.Generator.tablesample_sql-552"><span class="linenos">552</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-553"><a href="#DuckDB.Generator.tablesample_sql-553"><span class="linenos">553</span></a> <span class="p">)</span>
</span></pre></div>
@@ -3059,19 +3104,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-564"><a href="#DuckDB.Generator.interval_sql-564"><span class="linenos">564</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-565"><a href="#DuckDB.Generator.interval_sql-565"><span class="linenos">565</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-566"><a href="#DuckDB.Generator.interval_sql-566"><span class="linenos">566</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-567"><a href="#DuckDB.Generator.interval_sql-567"><span class="linenos">567</span></a>
-</span><span id="DuckDB.Generator.interval_sql-568"><a href="#DuckDB.Generator.interval_sql-568"><span class="linenos">568</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-569"><a href="#DuckDB.Generator.interval_sql-569"><span class="linenos">569</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
-</span><span id="DuckDB.Generator.interval_sql-570"><a href="#DuckDB.Generator.interval_sql-570"><span class="linenos">570</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-571"><a href="#DuckDB.Generator.interval_sql-571"><span class="linenos">571</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
-</span><span id="DuckDB.Generator.interval_sql-572"><a href="#DuckDB.Generator.interval_sql-572"><span class="linenos">572</span></a>
-</span><span id="DuckDB.Generator.interval_sql-573"><a href="#DuckDB.Generator.interval_sql-573"><span class="linenos">573</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</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">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-575"><a href="#DuckDB.Generator.interval_sql-575"><span class="linenos">575</span></a>
-</span><span id="DuckDB.Generator.interval_sql-576"><a href="#DuckDB.Generator.interval_sql-576"><span class="linenos">576</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-555"><a href="#DuckDB.Generator.interval_sql-555"><span class="linenos">555</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-556"><a href="#DuckDB.Generator.interval_sql-556"><span class="linenos">556</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-557"><a href="#DuckDB.Generator.interval_sql-557"><span class="linenos">557</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-558"><a href="#DuckDB.Generator.interval_sql-558"><span class="linenos">558</span></a>
+</span><span id="DuckDB.Generator.interval_sql-559"><a href="#DuckDB.Generator.interval_sql-559"><span class="linenos">559</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-560"><a href="#DuckDB.Generator.interval_sql-560"><span class="linenos">560</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">7</span>
+</span><span id="DuckDB.Generator.interval_sql-561"><a href="#DuckDB.Generator.interval_sql-561"><span class="linenos">561</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-562"><a href="#DuckDB.Generator.interval_sql-562"><span class="linenos">562</span></a> <span class="n">multiplier</span> <span class="o">=</span> <span class="mi">90</span>
+</span><span id="DuckDB.Generator.interval_sql-563"><a href="#DuckDB.Generator.interval_sql-563"><span class="linenos">563</span></a>
+</span><span id="DuckDB.Generator.interval_sql-564"><a href="#DuckDB.Generator.interval_sql-564"><span class="linenos">564</span></a> <span class="k">if</span> <span class="n">multiplier</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.interval_sql-565"><a href="#DuckDB.Generator.interval_sql-565"><span class="linenos">565</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-566"><a href="#DuckDB.Generator.interval_sql-566"><span class="linenos">566</span></a>
+</span><span id="DuckDB.Generator.interval_sql-567"><a href="#DuckDB.Generator.interval_sql-567"><span class="linenos">567</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>
@@ -3089,10 +3134,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-578"><a href="#DuckDB.Generator.columndef_sql-578"><span class="linenos">578</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-579"><a href="#DuckDB.Generator.columndef_sql-579"><span class="linenos">579</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-580"><a href="#DuckDB.Generator.columndef_sql-580"><span class="linenos">580</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-581"><a href="#DuckDB.Generator.columndef_sql-581"><span class="linenos">581</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-569"><a href="#DuckDB.Generator.columndef_sql-569"><span class="linenos">569</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-570"><a href="#DuckDB.Generator.columndef_sql-570"><span class="linenos">570</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-571"><a href="#DuckDB.Generator.columndef_sql-571"><span class="linenos">571</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-572"><a href="#DuckDB.Generator.columndef_sql-572"><span class="linenos">572</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>
@@ -3110,17 +3155,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-583"><a href="#DuckDB.Generator.join_sql-583"><span class="linenos">583</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-584"><a href="#DuckDB.Generator.join_sql-584"><span class="linenos">584</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="DuckDB.Generator.join_sql-585"><a href="#DuckDB.Generator.join_sql-585"><span class="linenos">585</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-586"><a href="#DuckDB.Generator.join_sql-586"><span class="linenos">586</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-587"><a href="#DuckDB.Generator.join_sql-587"><span class="linenos">587</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-588"><a href="#DuckDB.Generator.join_sql-588"><span class="linenos">588</span></a> <span class="p">):</span>
-</span><span id="DuckDB.Generator.join_sql-589"><a href="#DuckDB.Generator.join_sql-589"><span class="linenos">589</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
-</span><span id="DuckDB.Generator.join_sql-590"><a href="#DuckDB.Generator.join_sql-590"><span class="linenos">590</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-591"><a href="#DuckDB.Generator.join_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">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-592"><a href="#DuckDB.Generator.join_sql-592"><span class="linenos">592</span></a>
-</span><span id="DuckDB.Generator.join_sql-593"><a href="#DuckDB.Generator.join_sql-593"><span class="linenos">593</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-574"><a href="#DuckDB.Generator.join_sql-574"><span class="linenos">574</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-575"><a href="#DuckDB.Generator.join_sql-575"><span class="linenos">575</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="DuckDB.Generator.join_sql-576"><a href="#DuckDB.Generator.join_sql-576"><span class="linenos">576</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-577"><a href="#DuckDB.Generator.join_sql-577"><span class="linenos">577</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-578"><a href="#DuckDB.Generator.join_sql-578"><span class="linenos">578</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-579"><a href="#DuckDB.Generator.join_sql-579"><span class="linenos">579</span></a> <span class="p">):</span>
+</span><span id="DuckDB.Generator.join_sql-580"><a href="#DuckDB.Generator.join_sql-580"><span class="linenos">580</span></a> <span class="c1"># Some dialects support `LEFT JOIN UNNEST(...)` without an explicit ON clause</span>
+</span><span id="DuckDB.Generator.join_sql-581"><a href="#DuckDB.Generator.join_sql-581"><span class="linenos">581</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-582"><a href="#DuckDB.Generator.join_sql-582"><span class="linenos">582</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-583"><a href="#DuckDB.Generator.join_sql-583"><span class="linenos">583</span></a>
+</span><span id="DuckDB.Generator.join_sql-584"><a href="#DuckDB.Generator.join_sql-584"><span class="linenos">584</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>
@@ -3138,13 +3183,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-595"><a href="#DuckDB.Generator.generateseries_sql-595"><span class="linenos">595</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-596"><a href="#DuckDB.Generator.generateseries_sql-596"><span class="linenos">596</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-597"><a href="#DuckDB.Generator.generateseries_sql-597"><span class="linenos">597</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-598"><a href="#DuckDB.Generator.generateseries_sql-598"><span class="linenos">598</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-599"><a href="#DuckDB.Generator.generateseries_sql-599"><span class="linenos">599</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-600"><a href="#DuckDB.Generator.generateseries_sql-600"><span class="linenos">600</span></a>
-</span><span id="DuckDB.Generator.generateseries_sql-601"><a href="#DuckDB.Generator.generateseries_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">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-586"><a href="#DuckDB.Generator.generateseries_sql-586"><span class="linenos">586</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-587"><a href="#DuckDB.Generator.generateseries_sql-587"><span class="linenos">587</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-588"><a href="#DuckDB.Generator.generateseries_sql-588"><span class="linenos">588</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-589"><a href="#DuckDB.Generator.generateseries_sql-589"><span class="linenos">589</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-590"><a href="#DuckDB.Generator.generateseries_sql-590"><span class="linenos">590</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-591"><a href="#DuckDB.Generator.generateseries_sql-591"><span class="linenos">591</span></a>
+</span><span id="DuckDB.Generator.generateseries_sql-592"><a href="#DuckDB.Generator.generateseries_sql-592"><span class="linenos">592</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>
@@ -3162,23 +3207,55 @@ 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-603"><a href="#DuckDB.Generator.bracket_sql-603"><span class="linenos">603</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-604"><a href="#DuckDB.Generator.bracket_sql-604"><span class="linenos">604</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-605"><a href="#DuckDB.Generator.bracket_sql-605"><span class="linenos">605</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-606"><a href="#DuckDB.Generator.bracket_sql-606"><span class="linenos">606</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-607"><a href="#DuckDB.Generator.bracket_sql-607"><span class="linenos">607</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-608"><a href="#DuckDB.Generator.bracket_sql-608"><span class="linenos">608</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>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.bracket_sql-594"><a href="#DuckDB.Generator.bracket_sql-594"><span class="linenos">594</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-595"><a href="#DuckDB.Generator.bracket_sql-595"><span class="linenos">595</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-596"><a href="#DuckDB.Generator.bracket_sql-596"><span class="linenos">596</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-597"><a href="#DuckDB.Generator.bracket_sql-597"><span class="linenos">597</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-598"><a href="#DuckDB.Generator.bracket_sql-598"><span class="linenos">598</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-599"><a href="#DuckDB.Generator.bracket_sql-599"><span class="linenos">599</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-600"><a href="#DuckDB.Generator.bracket_sql-600"><span class="linenos">600</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-601"><a href="#DuckDB.Generator.bracket_sql-601"><span class="linenos">601</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-602"><a href="#DuckDB.Generator.bracket_sql-602"><span class="linenos">602</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-603"><a href="#DuckDB.Generator.bracket_sql-603"><span class="linenos">603</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-604"><a href="#DuckDB.Generator.bracket_sql-604"><span class="linenos">604</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-605"><a href="#DuckDB.Generator.bracket_sql-605"><span class="linenos">605</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-606"><a href="#DuckDB.Generator.bracket_sql-606"><span class="linenos">606</span></a>
+</span><span id="DuckDB.Generator.bracket_sql-607"><a href="#DuckDB.Generator.bracket_sql-607"><span class="linenos">607</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-608"><a href="#DuckDB.Generator.bracket_sql-608"><span class="linenos">608</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-609"><a href="#DuckDB.Generator.bracket_sql-609"><span class="linenos">609</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-610"><a href="#DuckDB.Generator.bracket_sql-610"><span class="linenos">610</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-611"><a href="#DuckDB.Generator.bracket_sql-611"><span class="linenos">611</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-612"><a href="#DuckDB.Generator.bracket_sql-612"><span class="linenos">612</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-613"><a href="#DuckDB.Generator.bracket_sql-613"><span class="linenos">613</span></a>
-</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">annotate_types</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
-</span><span id="DuckDB.Generator.bracket_sql-615"><a href="#DuckDB.Generator.bracket_sql-615"><span class="linenos">615</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-616"><a href="#DuckDB.Generator.bracket_sql-616"><span class="linenos">616</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-617"><a href="#DuckDB.Generator.bracket_sql-617"><span class="linenos">617</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-618"><a href="#DuckDB.Generator.bracket_sql-618"><span class="linenos">618</span></a>
-</span><span id="DuckDB.Generator.bracket_sql-619"><a href="#DuckDB.Generator.bracket_sql-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span><span id="DuckDB.Generator.bracket_sql-610"><a href="#DuckDB.Generator.bracket_sql-610"><span class="linenos">610</span></a> <span class="k">return</span> <span class="n">bracket</span>
+</span></pre></div>
+
+
+
+
+ </div>
+ <div id="DuckDB.Generator.withingroup_sql" class="classattr">
+ <input id="DuckDB.Generator.withingroup_sql-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+<div class="attr function">
+
+ <span class="def">def</span>
+ <span class="name">withingroup_sql</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">expression</span><span class="p">:</span> <span class="n"><a href="../expressions.html#WithinGroup">sqlglot.expressions.WithinGroup</a></span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span>
+
+ <label class="view-source-button" for="DuckDB.Generator.withingroup_sql-view-source"><span>View Source</span></label>
+
+ </div>
+ <a class="headerlink" href="#DuckDB.Generator.withingroup_sql"></a>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="DuckDB.Generator.withingroup_sql-612"><a href="#DuckDB.Generator.withingroup_sql-612"><span class="linenos">612</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-613"><a href="#DuckDB.Generator.withingroup_sql-613"><span class="linenos">613</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-614"><a href="#DuckDB.Generator.withingroup_sql-614"><span class="linenos">614</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-615"><a href="#DuckDB.Generator.withingroup_sql-615"><span class="linenos">615</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-616"><a href="#DuckDB.Generator.withingroup_sql-616"><span class="linenos">616</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-617"><a href="#DuckDB.Generator.withingroup_sql-617"><span class="linenos">617</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-618"><a href="#DuckDB.Generator.withingroup_sql-618"><span class="linenos">618</span></a> <span class="c1"># https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions</span>
+</span><span id="DuckDB.Generator.withingroup_sql-619"><a href="#DuckDB.Generator.withingroup_sql-619"><span class="linenos">619</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-620"><a href="#DuckDB.Generator.withingroup_sql-620"><span class="linenos">620</span></a> <span class="k">if</span> <span class="n">order_col</span><span class="p">:</span>
+</span><span id="DuckDB.Generator.withingroup_sql-621"><a href="#DuckDB.Generator.withingroup_sql-621"><span class="linenos">621</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-622"><a href="#DuckDB.Generator.withingroup_sql-622"><span class="linenos">622</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-623"><a href="#DuckDB.Generator.withingroup_sql-623"><span class="linenos">623</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-624"><a href="#DuckDB.Generator.withingroup_sql-624"><span class="linenos">624</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-625"><a href="#DuckDB.Generator.withingroup_sql-625"><span class="linenos">625</span></a>
+</span><span id="DuckDB.Generator.withingroup_sql-626"><a href="#DuckDB.Generator.withingroup_sql-626"><span class="linenos">626</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>
@@ -3291,6 +3368,7 @@ Default: True</li>
<dd id="DuckDB.Generator.uncache_sql" class="function"><a href="../generator.html#Generator.uncache_sql">uncache_sql</a></dd>
<dd id="DuckDB.Generator.cache_sql" class="function"><a href="../generator.html#Generator.cache_sql">cache_sql</a></dd>
<dd id="DuckDB.Generator.characterset_sql" class="function"><a href="../generator.html#Generator.characterset_sql">characterset_sql</a></dd>
+ <dd id="DuckDB.Generator.column_parts" class="function"><a href="../generator.html#Generator.column_parts">column_parts</a></dd>
<dd id="DuckDB.Generator.column_sql" class="function"><a href="../generator.html#Generator.column_sql">column_sql</a></dd>
<dd id="DuckDB.Generator.columnposition_sql" class="function"><a href="../generator.html#Generator.columnposition_sql">columnposition_sql</a></dd>
<dd id="DuckDB.Generator.columnconstraint_sql" class="function"><a href="../generator.html#Generator.columnconstraint_sql">columnconstraint_sql</a></dd>
@@ -3427,7 +3505,6 @@ Default: True</li>
<dd id="DuckDB.Generator.window_sql" class="function"><a href="../generator.html#Generator.window_sql">window_sql</a></dd>
<dd id="DuckDB.Generator.partition_by_sql" class="function"><a href="../generator.html#Generator.partition_by_sql">partition_by_sql</a></dd>
<dd id="DuckDB.Generator.windowspec_sql" class="function"><a href="../generator.html#Generator.windowspec_sql">windowspec_sql</a></dd>
- <dd id="DuckDB.Generator.withingroup_sql" class="function"><a href="../generator.html#Generator.withingroup_sql">withingroup_sql</a></dd>
<dd id="DuckDB.Generator.between_sql" class="function"><a href="../generator.html#Generator.between_sql">between_sql</a></dd>
<dd id="DuckDB.Generator.bracket_offset_expressions" class="function"><a href="../generator.html#Generator.bracket_offset_expressions">bracket_offset_expressions</a></dd>
<dd id="DuckDB.Generator.all_sql" class="function"><a href="../generator.html#Generator.all_sql">all_sql</a></dd>
@@ -3540,7 +3617,7 @@ Default: True</li>
<dd id="DuckDB.Generator.function_fallback_sql" class="function"><a href="../generator.html#Generator.function_fallback_sql">function_fallback_sql</a></dd>
<dd id="DuckDB.Generator.func" class="function"><a href="../generator.html#Generator.func">func</a></dd>
<dd id="DuckDB.Generator.format_args" class="function"><a href="../generator.html#Generator.format_args">format_args</a></dd>
- <dd id="DuckDB.Generator.text_width" class="function"><a href="../generator.html#Generator.text_width">text_width</a></dd>
+ <dd id="DuckDB.Generator.too_wide" class="function"><a href="../generator.html#Generator.too_wide">too_wide</a></dd>
<dd id="DuckDB.Generator.format_time" class="function"><a href="../generator.html#Generator.format_time">format_time</a></dd>
<dd id="DuckDB.Generator.expressions" class="function"><a href="../generator.html#Generator.expressions">expressions</a></dd>
<dd id="DuckDB.Generator.op_expressions" class="function"><a href="../generator.html#Generator.op_expressions">op_expressions</a></dd>