summaryrefslogtreecommitdiffstats
path: root/docs/sqlglot/dialects/hive.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sqlglot/dialects/hive.html')
-rw-r--r--docs/sqlglot/dialects/hive.html1290
1 files changed, 648 insertions, 642 deletions
diff --git a/docs/sqlglot/dialects/hive.html b/docs/sqlglot/dialects/hive.html
index 3dc9138..235e093 100644
--- a/docs/sqlglot/dialects/hive.html
+++ b/docs/sqlglot/dialects/hive.html
@@ -103,7 +103,7 @@
<a class="variable" href="#Hive.Parser.FUNCTIONS">FUNCTIONS</a>
</li>
<li>
- <a class="variable" href="#Hive.Parser.FUNCTION_PARSERS">FUNCTION_PARSERS</a>
+ <a class="variable" href="#Hive.Parser.NO_PAREN_FUNCTION_PARSERS">NO_PAREN_FUNCTION_PARSERS</a>
</li>
<li>
<a class="variable" href="#Hive.Parser.PROPERTY_PARSERS">PROPERTY_PARSERS</a>
@@ -585,8 +585,8 @@
</span><span id="L-272"><a href="#L-272"><span class="linenos">272</span></a> <span class="s2">&quot;YEAR&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">Year</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)),</span>
</span><span id="L-273"><a href="#L-273"><span class="linenos">273</span></a> <span class="p">}</span>
</span><span id="L-274"><a href="#L-274"><span class="linenos">274</span></a>
-</span><span id="L-275"><a href="#L-275"><span class="linenos">275</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-276"><a href="#L-276"><span class="linenos">276</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">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="L-275"><a href="#L-275"><span class="linenos">275</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-276"><a href="#L-276"><span class="linenos">276</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-277"><a href="#L-277"><span class="linenos">277</span></a> <span class="s2">&quot;TRANSFORM&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_transform</span><span class="p">(),</span>
</span><span id="L-278"><a href="#L-278"><span class="linenos">278</span></a> <span class="p">}</span>
</span><span id="L-279"><a href="#L-279"><span class="linenos">279</span></a>
@@ -597,208 +597,210 @@
</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a> <span class="p">),</span>
</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a> <span class="p">}</span>
</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a>
-</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a> <span class="k">def</span> <span class="nf">_parse_transform</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">:</span>
-</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_lambda</span><span class="p">)</span>
-</span><span id="L-289"><a href="#L-289"><span class="linenos">289</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match_r_paren</span><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">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><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">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
-</span><span id="L-295"><a href="#L-295"><span class="linenos">295</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="L-296"><a href="#L-296"><span class="linenos">296</span></a>
-</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
-</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
-</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a>
-</span><span id="L-300"><a href="#L-300"><span class="linenos">300</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a> <span class="k">def</span> <span class="nf">_parse_transform</span><span class="p">(</span><span class="bp">self</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">]:</span>
+</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a> <span class="k">if</span> <span class="ow">not</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_PAREN</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-289"><a href="#L-289"><span class="linenos">289</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_retreat</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_index</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+</span><span id="L-290"><a href="#L-290"><span class="linenos">290</span></a> <span class="k">return</span> <span class="kc">None</span>
+</span><span id="L-291"><a href="#L-291"><span class="linenos">291</span></a>
+</span><span id="L-292"><a href="#L-292"><span class="linenos">292</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_lambda</span><span class="p">)</span>
+</span><span id="L-293"><a href="#L-293"><span class="linenos">293</span></a> <span class="n">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a>
+</span><span id="L-295"><a href="#L-295"><span class="linenos">295</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-296"><a href="#L-296"><span class="linenos">296</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
+</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a>
+</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
+</span><span id="L-300"><a href="#L-300"><span class="linenos">300</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
</span><span id="L-301"><a href="#L-301"><span class="linenos">301</span></a>
-</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a> <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">ALIAS</span><span class="p">)</span>
-</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><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="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a> <span class="n">record_reader</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="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
-</span><span id="L-308"><a href="#L-308"><span class="linenos">308</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a>
-</span><span id="L-310"><a href="#L-310"><span class="linenos">310</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><span id="L-311"><a href="#L-311"><span class="linenos">311</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
-</span><span id="L-312"><a href="#L-312"><span class="linenos">312</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
-</span><span id="L-313"><a href="#L-313"><span class="linenos">313</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
-</span><span id="L-314"><a href="#L-314"><span class="linenos">314</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
-</span><span id="L-315"><a href="#L-315"><span class="linenos">315</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
-</span><span id="L-316"><a href="#L-316"><span class="linenos">316</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
-</span><span id="L-317"><a href="#L-317"><span class="linenos">317</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
-</span><span id="L-318"><a href="#L-318"><span class="linenos">318</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
-</span><span id="L-319"><a href="#L-319"><span class="linenos">319</span></a> <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><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="w"> </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-325"><a href="#L-325"><span class="linenos">325</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
-</span><span id="L-326"><a href="#L-326"><span class="linenos">326</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</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="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
-</span><span id="L-329"><a href="#L-329"><span class="linenos">329</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
-</span><span id="L-330"><a href="#L-330"><span class="linenos">330</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
-</span><span id="L-331"><a href="#L-331"><span class="linenos">331</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
-</span><span id="L-332"><a href="#L-332"><span class="linenos">332</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
-</span><span id="L-333"><a href="#L-333"><span class="linenos">333</span></a>
-</span><span id="L-334"><a href="#L-334"><span class="linenos">334</span></a><span class="sd"> 1234</span>
-</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</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="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
-</span><span id="L-338"><a href="#L-338"><span class="linenos">338</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</span>
-</span><span id="L-339"><a href="#L-339"><span class="linenos">339</span></a>
-</span><span id="L-340"><a href="#L-340"><span class="linenos">340</span></a><span class="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
-</span><span id="L-341"><a href="#L-341"><span class="linenos">341</span></a><span class="sd"> &quot;&quot;&quot;</span>
-</span><span id="L-342"><a href="#L-342"><span class="linenos">342</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 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><span id="L-343"><a href="#L-343"><span class="linenos">343</span></a>
-</span><span id="L-344"><a href="#L-344"><span class="linenos">344</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</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">this</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span>
-</span><span id="L-346"><a href="#L-346"><span class="linenos">346</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
-</span><span id="L-347"><a href="#L-347"><span class="linenos">347</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
-</span><span id="L-348"><a href="#L-348"><span class="linenos">348</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
-</span><span id="L-349"><a href="#L-349"><span class="linenos">349</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="L-350"><a href="#L-350"><span class="linenos">350</span></a> <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">return</span> <span class="n">this</span>
+</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a>
+</span><span id="L-304"><a href="#L-304"><span class="linenos">304</span></a> <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">ALIAS</span><span class="p">)</span>
+</span><span id="L-305"><a href="#L-305"><span class="linenos">305</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><span class="p">()</span>
+</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a>
+</span><span id="L-307"><a href="#L-307"><span class="linenos">307</span></a> <span class="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="L-308"><a href="#L-308"><span class="linenos">308</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
+</span><span id="L-310"><a href="#L-310"><span class="linenos">310</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</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="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="L-313"><a href="#L-313"><span class="linenos">313</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
+</span><span id="L-314"><a href="#L-314"><span class="linenos">314</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
+</span><span id="L-315"><a href="#L-315"><span class="linenos">315</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
+</span><span id="L-316"><a href="#L-316"><span class="linenos">316</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
+</span><span id="L-317"><a href="#L-317"><span class="linenos">317</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
+</span><span id="L-318"><a href="#L-318"><span class="linenos">318</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
+</span><span id="L-319"><a href="#L-319"><span class="linenos">319</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
+</span><span id="L-320"><a href="#L-320"><span class="linenos">320</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
+</span><span id="L-321"><a href="#L-321"><span class="linenos">321</span></a> <span class="p">)</span>
+</span><span id="L-322"><a href="#L-322"><span class="linenos">322</span></a>
+</span><span id="L-323"><a href="#L-323"><span class="linenos">323</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="L-324"><a href="#L-324"><span class="linenos">324</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><span id="L-325"><a href="#L-325"><span class="linenos">325</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-326"><a href="#L-326"><span class="linenos">326</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-327"><a href="#L-327"><span class="linenos">327</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
+</span><span id="L-328"><a href="#L-328"><span class="linenos">328</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</span>
+</span><span id="L-329"><a href="#L-329"><span class="linenos">329</span></a>
+</span><span id="L-330"><a href="#L-330"><span class="linenos">330</span></a><span class="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
+</span><span id="L-331"><a href="#L-331"><span class="linenos">331</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
+</span><span id="L-332"><a href="#L-332"><span class="linenos">332</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
+</span><span id="L-333"><a href="#L-333"><span class="linenos">333</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
+</span><span id="L-334"><a href="#L-334"><span class="linenos">334</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
+</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a>
+</span><span id="L-336"><a href="#L-336"><span class="linenos">336</span></a><span class="sd"> 1234</span>
+</span><span id="L-337"><a href="#L-337"><span class="linenos">337</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</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="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
+</span><span id="L-340"><a href="#L-340"><span class="linenos">340</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</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="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
+</span><span id="L-343"><a href="#L-343"><span class="linenos">343</span></a><span class="sd"> &quot;&quot;&quot;</span>
+</span><span id="L-344"><a href="#L-344"><span class="linenos">344</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 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><span id="L-345"><a href="#L-345"><span class="linenos">345</span></a>
+</span><span id="L-346"><a href="#L-346"><span class="linenos">346</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</span><span class="p">:</span>
+</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 class="o">.</span><span class="n">transform</span><span class="p">(</span>
+</span><span id="L-348"><a href="#L-348"><span class="linenos">348</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
+</span><span id="L-349"><a href="#L-349"><span class="linenos">349</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
+</span><span id="L-350"><a href="#L-350"><span class="linenos">350</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
+</span><span id="L-351"><a href="#L-351"><span class="linenos">351</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="L-352"><a href="#L-352"><span class="linenos">352</span></a> <span class="p">)</span>
</span><span id="L-353"><a href="#L-353"><span class="linenos">353</span></a>
-</span><span id="L-354"><a href="#L-354"><span class="linenos">354</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-355"><a href="#L-355"><span class="linenos">355</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="L-356"><a href="#L-356"><span class="linenos">356</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</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">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="L-358"><a href="#L-358"><span class="linenos">358</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-359"><a href="#L-359"><span class="linenos">359</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-360"><a href="#L-360"><span class="linenos">360</span></a> <span class="n">QUERY_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">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
-</span><span id="L-362"><a href="#L-362"><span class="linenos">362</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</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><span id="L-364"><a href="#L-364"><span class="linenos">364</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-365"><a href="#L-365"><span class="linenos">365</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-366"><a href="#L-366"><span class="linenos">366</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
-</span><span id="L-367"><a href="#L-367"><span class="linenos">367</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="L-368"><a href="#L-368"><span class="linenos">368</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</span><span class="p">,</span>
-</span><span id="L-369"><a href="#L-369"><span class="linenos">369</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">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="L-370"><a href="#L-370"><span class="linenos">370</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">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</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">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;BINARY&quot;</span><span class="p">,</span>
-</span><span id="L-372"><a href="#L-372"><span class="linenos">372</span></a> <span class="p">}</span>
-</span><span id="L-373"><a href="#L-373"><span class="linenos">373</span></a>
-</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-375"><a href="#L-375"><span class="linenos">375</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-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</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">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
-</span><span id="L-378"><a href="#L-378"><span class="linenos">378</span></a> <span class="p">[</span>
-</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="n">eliminate_qualify</span><span class="p">,</span>
-</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
-</span><span id="L-381"><a href="#L-381"><span class="linenos">381</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
-</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="p">]</span>
-</span><span id="L-383"><a href="#L-383"><span class="linenos">383</span></a> <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">Property</span><span class="p">:</span> <span class="n">_property_sql</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">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</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">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&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">ArrayJoin</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;CONCAT_WS&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 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">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;SIZE&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">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_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">With</span><span class="p">:</span> <span class="n">no_recursive_cte_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">DateAdd</span><span class="p">:</span> <span class="n">_add_date_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="n">_date_diff_sql</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">DateStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&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">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</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">DateToDi</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(DATE_FORMAT(</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">Hive</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-396"><a href="#L-396"><span class="linenos">396</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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&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">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&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">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&quot;</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">If</span><span class="p">:</span> <span class="n">if_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">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</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">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-402"><a href="#L-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&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">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&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">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_sql</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">Left</span><span class="p">:</span> <span class="n">left_to_substring_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">Map</span><span class="p">:</span> <span class="n">var_map_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">Max</span><span class="p">:</span> <span class="n">max_or_greatest</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">MD5Digest</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;UNHEX&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;MD5&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><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">Min</span><span class="p">:</span> <span class="n">min_or_least</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">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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</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">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</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">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</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">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&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">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&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">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_extract_sql</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">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_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">RegexpLike</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;RLIKE&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">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;SPLIT&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">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</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">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</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">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</span><span class="p">),</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">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</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">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&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">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</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">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</span><span class="p">,</span>
-</span><span id="L-426"><a href="#L-426"><span class="linenos">426</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-427"><a href="#L-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</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">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</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">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
-</span><span id="L-430"><a href="#L-430"><span class="linenos">430</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-431"><a href="#L-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&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">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</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">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&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">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</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">TsOrDiToDi</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(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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&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">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</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">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_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">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</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">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-440"><a href="#L-440"><span class="linenos">440</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
-</span><span id="L-441"><a href="#L-441"><span class="linenos">441</span></a> <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">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&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">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&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">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</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">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&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">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&quot;</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">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</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">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
-</span><span id="L-449"><a href="#L-449"><span class="linenos">449</span></a> <span class="p">}</span>
-</span><span id="L-450"><a href="#L-450"><span class="linenos">450</span></a>
-</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-452"><a href="#L-452"><span class="linenos">452</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">PROPERTIES_LOCATION</span><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">FileFormatProperty</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">POST_SCHEMA</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">PartitionedByProperty</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">POST_SCHEMA</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">VolatileProperty</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 class="p">,</span>
-</span><span id="L-456"><a href="#L-456"><span class="linenos">456</span></a> <span class="p">}</span>
-</span><span id="L-457"><a href="#L-457"><span class="linenos">457</span></a>
-</span><span id="L-458"><a href="#L-458"><span class="linenos">458</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-459"><a href="#L-459"><span class="linenos">459</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
-</span><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-462"><a href="#L-462"><span class="linenos">462</span></a>
-</span><span id="L-463"><a href="#L-463"><span class="linenos">463</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-464"><a href="#L-464"><span class="linenos">464</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><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
-</span><span id="L-466"><a href="#L-466"><span class="linenos">466</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="p">)</span>
-</span><span id="L-468"><a href="#L-468"><span class="linenos">468</span></a>
-</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
-</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a>
-</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-473"><a href="#L-473"><span class="linenos">473</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="L-474"><a href="#L-474"><span class="linenos">474</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
-</span><span id="L-475"><a href="#L-475"><span class="linenos">475</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="L-476"><a href="#L-476"><span class="linenos">476</span></a> <span class="p">):</span>
-</span><span id="L-477"><a href="#L-477"><span class="linenos">477</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
-</span><span id="L-478"><a href="#L-478"><span class="linenos">478</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
-</span><span id="L-479"><a href="#L-479"><span class="linenos">479</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="L-480"><a href="#L-480"><span class="linenos">480</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
-</span><span id="L-481"><a href="#L-481"><span class="linenos">481</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
-</span><span id="L-482"><a href="#L-482"><span class="linenos">482</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
-</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
-</span><span id="L-484"><a href="#L-484"><span class="linenos">484</span></a> <span class="n">expression</span> <span class="o">=</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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
-</span><span id="L-486"><a href="#L-486"><span class="linenos">486</span></a> <span class="p">)</span>
-</span><span id="L-487"><a href="#L-487"><span class="linenos">487</span></a>
-</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</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="n">this</span>
+</span><span id="L-355"><a href="#L-355"><span class="linenos">355</span></a>
+</span><span id="L-356"><a href="#L-356"><span class="linenos">356</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-357"><a href="#L-357"><span class="linenos">357</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="L-358"><a href="#L-358"><span class="linenos">358</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-359"><a href="#L-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</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">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
+</span><span id="L-364"><a href="#L-364"><span class="linenos">364</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</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><span id="L-366"><a href="#L-366"><span class="linenos">366</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-367"><a href="#L-367"><span class="linenos">367</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-368"><a href="#L-368"><span class="linenos">368</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
+</span><span id="L-369"><a href="#L-369"><span class="linenos">369</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="L-370"><a href="#L-370"><span class="linenos">370</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</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">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</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">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;BINARY&quot;</span><span class="p">,</span>
+</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> <span class="p">}</span>
+</span><span id="L-375"><a href="#L-375"><span class="linenos">375</span></a>
+</span><span id="L-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-377"><a href="#L-377"><span class="linenos">377</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-378"><a href="#L-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</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">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
+</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a> <span class="p">[</span>
+</span><span id="L-381"><a href="#L-381"><span class="linenos">381</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span>
+</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
+</span><span id="L-383"><a href="#L-383"><span class="linenos">383</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
+</span><span id="L-384"><a href="#L-384"><span class="linenos">384</span></a> <span class="p">]</span>
+</span><span id="L-385"><a href="#L-385"><span class="linenos">385</span></a> <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">Property</span><span class="p">:</span> <span class="n">_property_sql</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">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_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">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&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">ArrayJoin</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;CONCAT_WS&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 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">ArraySize</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;SIZE&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">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_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">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</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">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</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">DateDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</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">DateStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&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">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</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">DateToDi</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(DATE_FORMAT(</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">Hive</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">DiToDate</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;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&quot;</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">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&quot;</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">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&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">If</span><span class="p">:</span> <span class="n">if_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">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</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">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-404"><a href="#L-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&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">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&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">JSONFormat</span><span class="p">:</span> <span class="n">_json_format_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">Left</span><span class="p">:</span> <span class="n">left_to_substring_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">Map</span><span class="p">:</span> <span class="n">var_map_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">Max</span><span class="p">:</span> <span class="n">max_or_greatest</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">MD5Digest</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;UNHEX&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;MD5&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><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">Min</span><span class="p">:</span> <span class="n">min_or_least</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">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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</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">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</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">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</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">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&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">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&quot;</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">RegexpExtract</span><span class="p">:</span> <span class="n">regexp_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">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_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">RegexpLike</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;RLIKE&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">RegexpSplit</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;SPLIT&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">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</span><span class="p">,</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">SafeDivide</span><span class="p">:</span> <span class="n">no_safe_divide_sql</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">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</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">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</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">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&quot;</span><span class="p">,</span>
+</span><span id="L-426"><a href="#L-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</span><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">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</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">StrToTime</span><span class="p">:</span> <span class="n">_str_to_time_sql</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">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</span><span class="p">,</span>
+</span><span id="L-430"><a href="#L-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</span><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">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&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">TimeStrToTime</span><span class="p">:</span> <span class="n">timestrtotime_sql</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">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&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">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</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">TimeToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&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">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</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">TsOrDiToDi</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(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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</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">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&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">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_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">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</span><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">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-442"><a href="#L-442"><span class="linenos">442</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+</span><span id="L-443"><a href="#L-443"><span class="linenos">443</span></a> <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">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</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">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&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">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</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">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&quot;</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">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&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">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</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">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
+</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="p">}</span>
+</span><span id="L-452"><a href="#L-452"><span class="linenos">452</span></a>
+</span><span id="L-453"><a href="#L-453"><span class="linenos">453</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-454"><a href="#L-454"><span class="linenos">454</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">PROPERTIES_LOCATION</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">FileFormatProperty</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">POST_SCHEMA</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">PartitionedByProperty</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">POST_SCHEMA</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">VolatileProperty</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 class="p">,</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><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
+</span><span id="L-462"><a href="#L-462"><span class="linenos">462</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="L-463"><a href="#L-463"><span class="linenos">463</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-464"><a href="#L-464"><span class="linenos">464</span></a>
+</span><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-466"><a href="#L-466"><span class="linenos">466</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><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
+</span><span id="L-468"><a href="#L-468"><span class="linenos">468</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="p">)</span>
+</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a>
+</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
+</span><span id="L-473"><a href="#L-473"><span class="linenos">473</span></a>
+</span><span id="L-474"><a href="#L-474"><span class="linenos">474</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-475"><a href="#L-475"><span class="linenos">475</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="L-476"><a href="#L-476"><span class="linenos">476</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
+</span><span id="L-477"><a href="#L-477"><span class="linenos">477</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</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">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
+</span><span id="L-480"><a href="#L-480"><span class="linenos">480</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
+</span><span id="L-481"><a href="#L-481"><span class="linenos">481</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="L-482"><a href="#L-482"><span class="linenos">482</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
+</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
+</span><span id="L-484"><a href="#L-484"><span class="linenos">484</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
+</span><span id="L-485"><a href="#L-485"><span class="linenos">485</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</span><span id="L-486"><a href="#L-486"><span class="linenos">486</span></a> <span class="n">expression</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
+</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a> <span class="p">)</span>
+</span><span id="L-489"><a href="#L-489"><span class="linenos">489</span></a>
+</span><span id="L-490"><a href="#L-490"><span class="linenos">490</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -968,8 +970,8 @@
</span><span id="Hive-273"><a href="#Hive-273"><span class="linenos">273</span></a> <span class="s2">&quot;YEAR&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">Year</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)),</span>
</span><span id="Hive-274"><a href="#Hive-274"><span class="linenos">274</span></a> <span class="p">}</span>
</span><span id="Hive-275"><a href="#Hive-275"><span class="linenos">275</span></a>
-</span><span id="Hive-276"><a href="#Hive-276"><span class="linenos">276</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive-277"><a href="#Hive-277"><span class="linenos">277</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">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="Hive-276"><a href="#Hive-276"><span class="linenos">276</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive-277"><a href="#Hive-277"><span class="linenos">277</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="Hive-278"><a href="#Hive-278"><span class="linenos">278</span></a> <span class="s2">&quot;TRANSFORM&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_transform</span><span class="p">(),</span>
</span><span id="Hive-279"><a href="#Hive-279"><span class="linenos">279</span></a> <span class="p">}</span>
</span><span id="Hive-280"><a href="#Hive-280"><span class="linenos">280</span></a>
@@ -980,208 +982,210 @@
</span><span id="Hive-285"><a href="#Hive-285"><span class="linenos">285</span></a> <span class="p">),</span>
</span><span id="Hive-286"><a href="#Hive-286"><span class="linenos">286</span></a> <span class="p">}</span>
</span><span id="Hive-287"><a href="#Hive-287"><span class="linenos">287</span></a>
-</span><span id="Hive-288"><a href="#Hive-288"><span class="linenos">288</span></a> <span class="k">def</span> <span class="nf">_parse_transform</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">:</span>
-</span><span id="Hive-289"><a href="#Hive-289"><span class="linenos">289</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_lambda</span><span class="p">)</span>
-</span><span id="Hive-290"><a href="#Hive-290"><span class="linenos">290</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match_r_paren</span><span class="p">()</span>
-</span><span id="Hive-291"><a href="#Hive-291"><span class="linenos">291</span></a>
-</span><span id="Hive-292"><a href="#Hive-292"><span class="linenos">292</span></a> <span class="n">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Hive-293"><a href="#Hive-293"><span class="linenos">293</span></a>
-</span><span id="Hive-294"><a href="#Hive-294"><span class="linenos">294</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="Hive-295"><a href="#Hive-295"><span class="linenos">295</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
-</span><span id="Hive-296"><a href="#Hive-296"><span class="linenos">296</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="Hive-297"><a href="#Hive-297"><span class="linenos">297</span></a>
-</span><span id="Hive-298"><a href="#Hive-298"><span class="linenos">298</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
-</span><span id="Hive-299"><a href="#Hive-299"><span class="linenos">299</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
-</span><span id="Hive-300"><a href="#Hive-300"><span class="linenos">300</span></a>
-</span><span id="Hive-301"><a href="#Hive-301"><span class="linenos">301</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive-288"><a href="#Hive-288"><span class="linenos">288</span></a> <span class="k">def</span> <span class="nf">_parse_transform</span><span class="p">(</span><span class="bp">self</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">]:</span>
+</span><span id="Hive-289"><a href="#Hive-289"><span class="linenos">289</span></a> <span class="k">if</span> <span class="ow">not</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_PAREN</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="Hive-290"><a href="#Hive-290"><span class="linenos">290</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_retreat</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_index</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+</span><span id="Hive-291"><a href="#Hive-291"><span class="linenos">291</span></a> <span class="k">return</span> <span class="kc">None</span>
+</span><span id="Hive-292"><a href="#Hive-292"><span class="linenos">292</span></a>
+</span><span id="Hive-293"><a href="#Hive-293"><span class="linenos">293</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_lambda</span><span class="p">)</span>
+</span><span id="Hive-294"><a href="#Hive-294"><span class="linenos">294</span></a> <span class="n">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Hive-295"><a href="#Hive-295"><span class="linenos">295</span></a>
+</span><span id="Hive-296"><a href="#Hive-296"><span class="linenos">296</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="Hive-297"><a href="#Hive-297"><span class="linenos">297</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
+</span><span id="Hive-298"><a href="#Hive-298"><span class="linenos">298</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive-299"><a href="#Hive-299"><span class="linenos">299</span></a>
+</span><span id="Hive-300"><a href="#Hive-300"><span class="linenos">300</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
+</span><span id="Hive-301"><a href="#Hive-301"><span class="linenos">301</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
</span><span id="Hive-302"><a href="#Hive-302"><span class="linenos">302</span></a>
-</span><span id="Hive-303"><a href="#Hive-303"><span class="linenos">303</span></a> <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">ALIAS</span><span class="p">)</span>
-</span><span id="Hive-304"><a href="#Hive-304"><span class="linenos">304</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><span class="p">()</span>
-</span><span id="Hive-305"><a href="#Hive-305"><span class="linenos">305</span></a>
-</span><span id="Hive-306"><a href="#Hive-306"><span class="linenos">306</span></a> <span class="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Hive-307"><a href="#Hive-307"><span class="linenos">307</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="Hive-308"><a href="#Hive-308"><span class="linenos">308</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
-</span><span id="Hive-309"><a href="#Hive-309"><span class="linenos">309</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="Hive-310"><a href="#Hive-310"><span class="linenos">310</span></a>
-</span><span id="Hive-311"><a href="#Hive-311"><span class="linenos">311</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><span id="Hive-312"><a href="#Hive-312"><span class="linenos">312</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
-</span><span id="Hive-313"><a href="#Hive-313"><span class="linenos">313</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
-</span><span id="Hive-314"><a href="#Hive-314"><span class="linenos">314</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
-</span><span id="Hive-315"><a href="#Hive-315"><span class="linenos">315</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
-</span><span id="Hive-316"><a href="#Hive-316"><span class="linenos">316</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
-</span><span id="Hive-317"><a href="#Hive-317"><span class="linenos">317</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
-</span><span id="Hive-318"><a href="#Hive-318"><span class="linenos">318</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
-</span><span id="Hive-319"><a href="#Hive-319"><span class="linenos">319</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
-</span><span id="Hive-320"><a href="#Hive-320"><span class="linenos">320</span></a> <span class="p">)</span>
-</span><span id="Hive-321"><a href="#Hive-321"><span class="linenos">321</span></a>
-</span><span id="Hive-322"><a href="#Hive-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="Hive-323"><a href="#Hive-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><span id="Hive-324"><a href="#Hive-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="Hive-325"><a href="#Hive-325"><span class="linenos">325</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="Hive-326"><a href="#Hive-326"><span class="linenos">326</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
-</span><span id="Hive-327"><a href="#Hive-327"><span class="linenos">327</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</span>
-</span><span id="Hive-328"><a href="#Hive-328"><span class="linenos">328</span></a>
-</span><span id="Hive-329"><a href="#Hive-329"><span class="linenos">329</span></a><span class="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
-</span><span id="Hive-330"><a href="#Hive-330"><span class="linenos">330</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
-</span><span id="Hive-331"><a href="#Hive-331"><span class="linenos">331</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
-</span><span id="Hive-332"><a href="#Hive-332"><span class="linenos">332</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
-</span><span id="Hive-333"><a href="#Hive-333"><span class="linenos">333</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
-</span><span id="Hive-334"><a href="#Hive-334"><span class="linenos">334</span></a>
-</span><span id="Hive-335"><a href="#Hive-335"><span class="linenos">335</span></a><span class="sd"> 1234</span>
-</span><span id="Hive-336"><a href="#Hive-336"><span class="linenos">336</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</span>
-</span><span id="Hive-337"><a href="#Hive-337"><span class="linenos">337</span></a>
-</span><span id="Hive-338"><a href="#Hive-338"><span class="linenos">338</span></a><span class="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
-</span><span id="Hive-339"><a href="#Hive-339"><span class="linenos">339</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</span>
-</span><span id="Hive-340"><a href="#Hive-340"><span class="linenos">340</span></a>
-</span><span id="Hive-341"><a href="#Hive-341"><span class="linenos">341</span></a><span class="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
-</span><span id="Hive-342"><a href="#Hive-342"><span class="linenos">342</span></a><span class="sd"> &quot;&quot;&quot;</span>
-</span><span id="Hive-343"><a href="#Hive-343"><span class="linenos">343</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 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><span id="Hive-344"><a href="#Hive-344"><span class="linenos">344</span></a>
-</span><span id="Hive-345"><a href="#Hive-345"><span class="linenos">345</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</span><span class="p">:</span>
-</span><span id="Hive-346"><a href="#Hive-346"><span class="linenos">346</span></a> <span class="k">return</span> <span class="n">this</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span>
-</span><span id="Hive-347"><a href="#Hive-347"><span class="linenos">347</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
-</span><span id="Hive-348"><a href="#Hive-348"><span class="linenos">348</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
-</span><span id="Hive-349"><a href="#Hive-349"><span class="linenos">349</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
-</span><span id="Hive-350"><a href="#Hive-350"><span class="linenos">350</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="Hive-351"><a href="#Hive-351"><span class="linenos">351</span></a> <span class="p">)</span>
-</span><span id="Hive-352"><a href="#Hive-352"><span class="linenos">352</span></a>
-</span><span id="Hive-353"><a href="#Hive-353"><span class="linenos">353</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="Hive-303"><a href="#Hive-303"><span class="linenos">303</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive-304"><a href="#Hive-304"><span class="linenos">304</span></a>
+</span><span id="Hive-305"><a href="#Hive-305"><span class="linenos">305</span></a> <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">ALIAS</span><span class="p">)</span>
+</span><span id="Hive-306"><a href="#Hive-306"><span class="linenos">306</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><span class="p">()</span>
+</span><span id="Hive-307"><a href="#Hive-307"><span class="linenos">307</span></a>
+</span><span id="Hive-308"><a href="#Hive-308"><span class="linenos">308</span></a> <span class="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Hive-309"><a href="#Hive-309"><span class="linenos">309</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="Hive-310"><a href="#Hive-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_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
+</span><span id="Hive-311"><a href="#Hive-311"><span class="linenos">311</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive-312"><a href="#Hive-312"><span class="linenos">312</span></a>
+</span><span id="Hive-313"><a href="#Hive-313"><span class="linenos">313</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><span id="Hive-314"><a href="#Hive-314"><span class="linenos">314</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
+</span><span id="Hive-315"><a href="#Hive-315"><span class="linenos">315</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
+</span><span id="Hive-316"><a href="#Hive-316"><span class="linenos">316</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
+</span><span id="Hive-317"><a href="#Hive-317"><span class="linenos">317</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
+</span><span id="Hive-318"><a href="#Hive-318"><span class="linenos">318</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
+</span><span id="Hive-319"><a href="#Hive-319"><span class="linenos">319</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
+</span><span id="Hive-320"><a href="#Hive-320"><span class="linenos">320</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
+</span><span id="Hive-321"><a href="#Hive-321"><span class="linenos">321</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
+</span><span id="Hive-322"><a href="#Hive-322"><span class="linenos">322</span></a> <span class="p">)</span>
+</span><span id="Hive-323"><a href="#Hive-323"><span class="linenos">323</span></a>
+</span><span id="Hive-324"><a href="#Hive-324"><span class="linenos">324</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="Hive-325"><a href="#Hive-325"><span class="linenos">325</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><span id="Hive-326"><a href="#Hive-326"><span class="linenos">326</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="Hive-327"><a href="#Hive-327"><span class="linenos">327</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="Hive-328"><a href="#Hive-328"><span class="linenos">328</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
+</span><span id="Hive-329"><a href="#Hive-329"><span class="linenos">329</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</span>
+</span><span id="Hive-330"><a href="#Hive-330"><span class="linenos">330</span></a>
+</span><span id="Hive-331"><a href="#Hive-331"><span class="linenos">331</span></a><span class="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
+</span><span id="Hive-332"><a href="#Hive-332"><span class="linenos">332</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
+</span><span id="Hive-333"><a href="#Hive-333"><span class="linenos">333</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
+</span><span id="Hive-334"><a href="#Hive-334"><span class="linenos">334</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
+</span><span id="Hive-335"><a href="#Hive-335"><span class="linenos">335</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
+</span><span id="Hive-336"><a href="#Hive-336"><span class="linenos">336</span></a>
+</span><span id="Hive-337"><a href="#Hive-337"><span class="linenos">337</span></a><span class="sd"> 1234</span>
+</span><span id="Hive-338"><a href="#Hive-338"><span class="linenos">338</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</span>
+</span><span id="Hive-339"><a href="#Hive-339"><span class="linenos">339</span></a>
+</span><span id="Hive-340"><a href="#Hive-340"><span class="linenos">340</span></a><span class="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
+</span><span id="Hive-341"><a href="#Hive-341"><span class="linenos">341</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</span>
+</span><span id="Hive-342"><a href="#Hive-342"><span class="linenos">342</span></a>
+</span><span id="Hive-343"><a href="#Hive-343"><span class="linenos">343</span></a><span class="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
+</span><span id="Hive-344"><a href="#Hive-344"><span class="linenos">344</span></a><span class="sd"> &quot;&quot;&quot;</span>
+</span><span id="Hive-345"><a href="#Hive-345"><span class="linenos">345</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 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><span id="Hive-346"><a href="#Hive-346"><span class="linenos">346</span></a>
+</span><span id="Hive-347"><a href="#Hive-347"><span class="linenos">347</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</span><span class="p">:</span>
+</span><span id="Hive-348"><a href="#Hive-348"><span class="linenos">348</span></a> <span class="k">return</span> <span class="n">this</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span>
+</span><span id="Hive-349"><a href="#Hive-349"><span class="linenos">349</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
+</span><span id="Hive-350"><a href="#Hive-350"><span class="linenos">350</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
+</span><span id="Hive-351"><a href="#Hive-351"><span class="linenos">351</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
+</span><span id="Hive-352"><a href="#Hive-352"><span class="linenos">352</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="Hive-353"><a href="#Hive-353"><span class="linenos">353</span></a> <span class="p">)</span>
</span><span id="Hive-354"><a href="#Hive-354"><span class="linenos">354</span></a>
-</span><span id="Hive-355"><a href="#Hive-355"><span class="linenos">355</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="Hive-356"><a href="#Hive-356"><span class="linenos">356</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="Hive-357"><a href="#Hive-357"><span class="linenos">357</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive-358"><a href="#Hive-358"><span class="linenos">358</span></a> <span class="n">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="Hive-359"><a href="#Hive-359"><span class="linenos">359</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive-360"><a href="#Hive-360"><span class="linenos">360</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive-361"><a href="#Hive-361"><span class="linenos">361</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive-362"><a href="#Hive-362"><span class="linenos">362</span></a> <span class="n">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
-</span><span id="Hive-363"><a href="#Hive-363"><span class="linenos">363</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive-364"><a href="#Hive-364"><span class="linenos">364</span></a>
-</span><span id="Hive-365"><a href="#Hive-365"><span class="linenos">365</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive-366"><a href="#Hive-366"><span class="linenos">366</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="Hive-367"><a href="#Hive-367"><span class="linenos">367</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
-</span><span id="Hive-368"><a href="#Hive-368"><span class="linenos">368</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive-369"><a href="#Hive-369"><span class="linenos">369</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</span><span class="p">,</span>
-</span><span id="Hive-370"><a href="#Hive-370"><span class="linenos">370</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">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive-371"><a href="#Hive-371"><span class="linenos">371</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">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive-372"><a href="#Hive-372"><span class="linenos">372</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;BINARY&quot;</span><span class="p">,</span>
-</span><span id="Hive-373"><a href="#Hive-373"><span class="linenos">373</span></a> <span class="p">}</span>
-</span><span id="Hive-374"><a href="#Hive-374"><span class="linenos">374</span></a>
-</span><span id="Hive-375"><a href="#Hive-375"><span class="linenos">375</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive-376"><a href="#Hive-376"><span class="linenos">376</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="Hive-377"><a href="#Hive-377"><span class="linenos">377</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</span><span class="p">]),</span>
-</span><span id="Hive-378"><a href="#Hive-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
-</span><span id="Hive-379"><a href="#Hive-379"><span class="linenos">379</span></a> <span class="p">[</span>
-</span><span id="Hive-380"><a href="#Hive-380"><span class="linenos">380</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span>
-</span><span id="Hive-381"><a href="#Hive-381"><span class="linenos">381</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
-</span><span id="Hive-382"><a href="#Hive-382"><span class="linenos">382</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
-</span><span id="Hive-383"><a href="#Hive-383"><span class="linenos">383</span></a> <span class="p">]</span>
-</span><span id="Hive-384"><a href="#Hive-384"><span class="linenos">384</span></a> <span class="p">),</span>
-</span><span id="Hive-385"><a href="#Hive-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Property</span><span class="p">:</span> <span class="n">_property_sql</span><span class="p">,</span>
-</span><span id="Hive-386"><a href="#Hive-386"><span class="linenos">386</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="Hive-387"><a href="#Hive-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&quot;</span><span class="p">),</span>
-</span><span id="Hive-388"><a href="#Hive-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayJoin</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;CONCAT_WS&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 class="p">),</span>
-</span><span id="Hive-389"><a href="#Hive-389"><span class="linenos">389</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;SIZE&quot;</span><span class="p">),</span>
-</span><span id="Hive-390"><a href="#Hive-390"><span class="linenos">390</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="Hive-391"><a href="#Hive-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span>
-</span><span id="Hive-392"><a href="#Hive-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
-</span><span id="Hive-393"><a href="#Hive-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="n">_date_diff_sql</span><span class="p">,</span>
-</span><span id="Hive-394"><a href="#Hive-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
-</span><span id="Hive-395"><a href="#Hive-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
-</span><span id="Hive-396"><a href="#Hive-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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(DATE_FORMAT(</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">Hive</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="Hive-397"><a href="#Hive-397"><span class="linenos">397</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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Hive-398"><a href="#Hive-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
-</span><span id="Hive-399"><a href="#Hive-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&quot;</span><span class="p">),</span>
-</span><span id="Hive-400"><a href="#Hive-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">,</span>
-</span><span id="Hive-401"><a href="#Hive-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span>
-</span><span id="Hive-402"><a href="#Hive-402"><span class="linenos">402</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="Hive-403"><a href="#Hive-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
-</span><span id="Hive-404"><a href="#Hive-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
-</span><span id="Hive-405"><a href="#Hive-405"><span class="linenos">405</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="Hive-406"><a href="#Hive-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Left</span><span class="p">:</span> <span class="n">left_to_substring_sql</span><span class="p">,</span>
-</span><span id="Hive-407"><a href="#Hive-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
-</span><span id="Hive-408"><a href="#Hive-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
-</span><span id="Hive-409"><a href="#Hive-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MD5Digest</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;UNHEX&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;MD5&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><span id="Hive-410"><a href="#Hive-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
-</span><span id="Hive-411"><a href="#Hive-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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">),</span>
-</span><span id="Hive-412"><a href="#Hive-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
-</span><span id="Hive-413"><a href="#Hive-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</span><span class="p">,</span>
-</span><span id="Hive-414"><a href="#Hive-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&quot;</span><span class="p">),</span>
-</span><span id="Hive-415"><a href="#Hive-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&quot;</span><span class="p">),</span>
-</span><span id="Hive-416"><a href="#Hive-416"><span class="linenos">416</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="Hive-417"><a href="#Hive-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_sql</span><span class="p">,</span>
-</span><span id="Hive-418"><a href="#Hive-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</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;RLIKE&quot;</span><span class="p">),</span>
-</span><span id="Hive-419"><a href="#Hive-419"><span class="linenos">419</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;SPLIT&quot;</span><span class="p">),</span>
-</span><span id="Hive-420"><a href="#Hive-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</span><span class="p">,</span>
-</span><span id="Hive-421"><a href="#Hive-421"><span class="linenos">421</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="Hive-422"><a href="#Hive-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Hive-423"><a href="#Hive-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</span><span class="p">),</span>
-</span><span id="Hive-424"><a href="#Hive-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&quot;</span><span class="p">,</span>
-</span><span id="Hive-425"><a href="#Hive-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</span><span class="p">,</span>
-</span><span id="Hive-426"><a href="#Hive-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</span><span class="p">,</span>
-</span><span id="Hive-427"><a href="#Hive-427"><span class="linenos">427</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="Hive-428"><a href="#Hive-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</span><span class="p">,</span>
-</span><span id="Hive-429"><a href="#Hive-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</span><span class="p">,</span>
-</span><span id="Hive-430"><a href="#Hive-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
-</span><span id="Hive-431"><a href="#Hive-431"><span class="linenos">431</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="Hive-432"><a href="#Hive-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
-</span><span id="Hive-433"><a href="#Hive-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</span><span class="p">,</span>
-</span><span id="Hive-434"><a href="#Hive-434"><span class="linenos">434</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;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
-</span><span id="Hive-435"><a href="#Hive-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</span><span class="p">),</span>
-</span><span id="Hive-436"><a href="#Hive-436"><span class="linenos">436</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 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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="Hive-437"><a href="#Hive-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Hive-438"><a href="#Hive-438"><span class="linenos">438</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_sql</span><span class="p">,</span>
-</span><span id="Hive-439"><a href="#Hive-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</span><span class="p">,</span>
-</span><span id="Hive-440"><a href="#Hive-440"><span class="linenos">440</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="Hive-441"><a href="#Hive-441"><span class="linenos">441</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
-</span><span id="Hive-442"><a href="#Hive-442"><span class="linenos">442</span></a> <span class="p">),</span>
-</span><span id="Hive-443"><a href="#Hive-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
-</span><span id="Hive-444"><a href="#Hive-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
-</span><span id="Hive-445"><a href="#Hive-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</span><span class="p">,</span>
-</span><span id="Hive-446"><a href="#Hive-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&quot;</span><span class="p">),</span>
-</span><span id="Hive-447"><a href="#Hive-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&quot;</span><span class="p">),</span>
-</span><span id="Hive-448"><a href="#Hive-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</span><span class="p">),</span>
-</span><span id="Hive-449"><a href="#Hive-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
-</span><span id="Hive-450"><a href="#Hive-450"><span class="linenos">450</span></a> <span class="p">}</span>
-</span><span id="Hive-451"><a href="#Hive-451"><span class="linenos">451</span></a>
-</span><span id="Hive-452"><a href="#Hive-452"><span class="linenos">452</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive-453"><a href="#Hive-453"><span class="linenos">453</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">PROPERTIES_LOCATION</span><span class="p">,</span>
-</span><span id="Hive-454"><a href="#Hive-454"><span class="linenos">454</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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">POST_SCHEMA</span><span class="p">,</span>
-</span><span id="Hive-455"><a href="#Hive-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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">POST_SCHEMA</span><span class="p">,</span>
-</span><span id="Hive-456"><a href="#Hive-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VolatileProperty</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 class="p">,</span>
-</span><span id="Hive-457"><a href="#Hive-457"><span class="linenos">457</span></a> <span class="p">}</span>
-</span><span id="Hive-458"><a href="#Hive-458"><span class="linenos">458</span></a>
-</span><span id="Hive-459"><a href="#Hive-459"><span class="linenos">459</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive-460"><a href="#Hive-460"><span class="linenos">460</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
-</span><span id="Hive-461"><a href="#Hive-461"><span class="linenos">461</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Hive-462"><a href="#Hive-462"><span class="linenos">462</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Hive-463"><a href="#Hive-463"><span class="linenos">463</span></a>
-</span><span id="Hive-464"><a href="#Hive-464"><span class="linenos">464</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive-465"><a href="#Hive-465"><span class="linenos">465</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><span id="Hive-466"><a href="#Hive-466"><span class="linenos">466</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
-</span><span id="Hive-467"><a href="#Hive-467"><span class="linenos">467</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="Hive-468"><a href="#Hive-468"><span class="linenos">468</span></a> <span class="p">)</span>
-</span><span id="Hive-469"><a href="#Hive-469"><span class="linenos">469</span></a>
-</span><span id="Hive-470"><a href="#Hive-470"><span class="linenos">470</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive-471"><a href="#Hive-471"><span class="linenos">471</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
-</span><span id="Hive-472"><a href="#Hive-472"><span class="linenos">472</span></a>
-</span><span id="Hive-473"><a href="#Hive-473"><span class="linenos">473</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive-474"><a href="#Hive-474"><span class="linenos">474</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="Hive-475"><a href="#Hive-475"><span class="linenos">475</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
-</span><span id="Hive-476"><a href="#Hive-476"><span class="linenos">476</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="Hive-477"><a href="#Hive-477"><span class="linenos">477</span></a> <span class="p">):</span>
-</span><span id="Hive-478"><a href="#Hive-478"><span class="linenos">478</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
-</span><span id="Hive-479"><a href="#Hive-479"><span class="linenos">479</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
-</span><span id="Hive-480"><a href="#Hive-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="Hive-481"><a href="#Hive-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
-</span><span id="Hive-482"><a href="#Hive-482"><span class="linenos">482</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
-</span><span id="Hive-483"><a href="#Hive-483"><span class="linenos">483</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
-</span><span id="Hive-484"><a href="#Hive-484"><span class="linenos">484</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
-</span><span id="Hive-485"><a href="#Hive-485"><span class="linenos">485</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
-</span><span id="Hive-486"><a href="#Hive-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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
-</span><span id="Hive-487"><a href="#Hive-487"><span class="linenos">487</span></a> <span class="p">)</span>
-</span><span id="Hive-488"><a href="#Hive-488"><span class="linenos">488</span></a>
-</span><span id="Hive-489"><a href="#Hive-489"><span class="linenos">489</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Hive-355"><a href="#Hive-355"><span class="linenos">355</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="Hive-356"><a href="#Hive-356"><span class="linenos">356</span></a>
+</span><span id="Hive-357"><a href="#Hive-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="Hive-358"><a href="#Hive-358"><span class="linenos">358</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="Hive-359"><a href="#Hive-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Hive-360"><a href="#Hive-360"><span class="linenos">360</span></a> <span class="n">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="Hive-361"><a href="#Hive-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="Hive-362"><a href="#Hive-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="Hive-363"><a href="#Hive-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="Hive-364"><a href="#Hive-364"><span class="linenos">364</span></a> <span class="n">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
+</span><span id="Hive-365"><a href="#Hive-365"><span class="linenos">365</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Hive-366"><a href="#Hive-366"><span class="linenos">366</span></a>
+</span><span id="Hive-367"><a href="#Hive-367"><span class="linenos">367</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive-368"><a href="#Hive-368"><span class="linenos">368</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="Hive-369"><a href="#Hive-369"><span class="linenos">369</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
+</span><span id="Hive-370"><a href="#Hive-370"><span class="linenos">370</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive-371"><a href="#Hive-371"><span class="linenos">371</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</span><span class="p">,</span>
+</span><span id="Hive-372"><a href="#Hive-372"><span class="linenos">372</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">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive-373"><a href="#Hive-373"><span class="linenos">373</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">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive-374"><a href="#Hive-374"><span class="linenos">374</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;BINARY&quot;</span><span class="p">,</span>
+</span><span id="Hive-375"><a href="#Hive-375"><span class="linenos">375</span></a> <span class="p">}</span>
+</span><span id="Hive-376"><a href="#Hive-376"><span class="linenos">376</span></a>
+</span><span id="Hive-377"><a href="#Hive-377"><span class="linenos">377</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive-378"><a href="#Hive-378"><span class="linenos">378</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="Hive-379"><a href="#Hive-379"><span class="linenos">379</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</span><span class="p">]),</span>
+</span><span id="Hive-380"><a href="#Hive-380"><span class="linenos">380</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
+</span><span id="Hive-381"><a href="#Hive-381"><span class="linenos">381</span></a> <span class="p">[</span>
+</span><span id="Hive-382"><a href="#Hive-382"><span class="linenos">382</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span>
+</span><span id="Hive-383"><a href="#Hive-383"><span class="linenos">383</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
+</span><span id="Hive-384"><a href="#Hive-384"><span class="linenos">384</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
+</span><span id="Hive-385"><a href="#Hive-385"><span class="linenos">385</span></a> <span class="p">]</span>
+</span><span id="Hive-386"><a href="#Hive-386"><span class="linenos">386</span></a> <span class="p">),</span>
+</span><span id="Hive-387"><a href="#Hive-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Property</span><span class="p">:</span> <span class="n">_property_sql</span><span class="p">,</span>
+</span><span id="Hive-388"><a href="#Hive-388"><span class="linenos">388</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="Hive-389"><a href="#Hive-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&quot;</span><span class="p">),</span>
+</span><span id="Hive-390"><a href="#Hive-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayJoin</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;CONCAT_WS&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 class="p">),</span>
+</span><span id="Hive-391"><a href="#Hive-391"><span class="linenos">391</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;SIZE&quot;</span><span class="p">),</span>
+</span><span id="Hive-392"><a href="#Hive-392"><span class="linenos">392</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="Hive-393"><a href="#Hive-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span>
+</span><span id="Hive-394"><a href="#Hive-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
+</span><span id="Hive-395"><a href="#Hive-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span>
+</span><span id="Hive-396"><a href="#Hive-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">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
+</span><span id="Hive-397"><a href="#Hive-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
+</span><span id="Hive-398"><a href="#Hive-398"><span class="linenos">398</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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(DATE_FORMAT(</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">Hive</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="Hive-399"><a href="#Hive-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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Hive-400"><a href="#Hive-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
+</span><span id="Hive-401"><a href="#Hive-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&quot;</span><span class="p">),</span>
+</span><span id="Hive-402"><a href="#Hive-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">,</span>
+</span><span id="Hive-403"><a href="#Hive-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span>
+</span><span id="Hive-404"><a href="#Hive-404"><span class="linenos">404</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="Hive-405"><a href="#Hive-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
+</span><span id="Hive-406"><a href="#Hive-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
+</span><span id="Hive-407"><a href="#Hive-407"><span class="linenos">407</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="Hive-408"><a href="#Hive-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Left</span><span class="p">:</span> <span class="n">left_to_substring_sql</span><span class="p">,</span>
+</span><span id="Hive-409"><a href="#Hive-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
+</span><span id="Hive-410"><a href="#Hive-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
+</span><span id="Hive-411"><a href="#Hive-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MD5Digest</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;UNHEX&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;MD5&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><span id="Hive-412"><a href="#Hive-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
+</span><span id="Hive-413"><a href="#Hive-413"><span class="linenos">413</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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">),</span>
+</span><span id="Hive-414"><a href="#Hive-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
+</span><span id="Hive-415"><a href="#Hive-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</span><span class="p">,</span>
+</span><span id="Hive-416"><a href="#Hive-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&quot;</span><span class="p">),</span>
+</span><span id="Hive-417"><a href="#Hive-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&quot;</span><span class="p">),</span>
+</span><span id="Hive-418"><a href="#Hive-418"><span class="linenos">418</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="Hive-419"><a href="#Hive-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_sql</span><span class="p">,</span>
+</span><span id="Hive-420"><a href="#Hive-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</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;RLIKE&quot;</span><span class="p">),</span>
+</span><span id="Hive-421"><a href="#Hive-421"><span class="linenos">421</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;SPLIT&quot;</span><span class="p">),</span>
+</span><span id="Hive-422"><a href="#Hive-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</span><span class="p">,</span>
+</span><span id="Hive-423"><a href="#Hive-423"><span class="linenos">423</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="Hive-424"><a href="#Hive-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Hive-425"><a href="#Hive-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</span><span class="p">),</span>
+</span><span id="Hive-426"><a href="#Hive-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&quot;</span><span class="p">,</span>
+</span><span id="Hive-427"><a href="#Hive-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</span><span class="p">,</span>
+</span><span id="Hive-428"><a href="#Hive-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</span><span class="p">,</span>
+</span><span id="Hive-429"><a href="#Hive-429"><span class="linenos">429</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="Hive-430"><a href="#Hive-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</span><span class="p">,</span>
+</span><span id="Hive-431"><a href="#Hive-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</span><span class="p">,</span>
+</span><span id="Hive-432"><a href="#Hive-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
+</span><span id="Hive-433"><a href="#Hive-433"><span class="linenos">433</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="Hive-434"><a href="#Hive-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
+</span><span id="Hive-435"><a href="#Hive-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</span><span class="p">,</span>
+</span><span id="Hive-436"><a href="#Hive-436"><span class="linenos">436</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;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
+</span><span id="Hive-437"><a href="#Hive-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</span><span class="p">),</span>
+</span><span id="Hive-438"><a href="#Hive-438"><span class="linenos">438</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 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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="Hive-439"><a href="#Hive-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Hive-440"><a href="#Hive-440"><span class="linenos">440</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_sql</span><span class="p">,</span>
+</span><span id="Hive-441"><a href="#Hive-441"><span class="linenos">441</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</span><span class="p">,</span>
+</span><span id="Hive-442"><a href="#Hive-442"><span class="linenos">442</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="Hive-443"><a href="#Hive-443"><span class="linenos">443</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+</span><span id="Hive-444"><a href="#Hive-444"><span class="linenos">444</span></a> <span class="p">),</span>
+</span><span id="Hive-445"><a href="#Hive-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
+</span><span id="Hive-446"><a href="#Hive-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
+</span><span id="Hive-447"><a href="#Hive-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</span><span class="p">,</span>
+</span><span id="Hive-448"><a href="#Hive-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&quot;</span><span class="p">),</span>
+</span><span id="Hive-449"><a href="#Hive-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&quot;</span><span class="p">),</span>
+</span><span id="Hive-450"><a href="#Hive-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</span><span class="p">),</span>
+</span><span id="Hive-451"><a href="#Hive-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
+</span><span id="Hive-452"><a href="#Hive-452"><span class="linenos">452</span></a> <span class="p">}</span>
+</span><span id="Hive-453"><a href="#Hive-453"><span class="linenos">453</span></a>
+</span><span id="Hive-454"><a href="#Hive-454"><span class="linenos">454</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive-455"><a href="#Hive-455"><span class="linenos">455</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">PROPERTIES_LOCATION</span><span class="p">,</span>
+</span><span id="Hive-456"><a href="#Hive-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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">POST_SCHEMA</span><span class="p">,</span>
+</span><span id="Hive-457"><a href="#Hive-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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">POST_SCHEMA</span><span class="p">,</span>
+</span><span id="Hive-458"><a href="#Hive-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VolatileProperty</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 class="p">,</span>
+</span><span id="Hive-459"><a href="#Hive-459"><span class="linenos">459</span></a> <span class="p">}</span>
+</span><span id="Hive-460"><a href="#Hive-460"><span class="linenos">460</span></a>
+</span><span id="Hive-461"><a href="#Hive-461"><span class="linenos">461</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive-462"><a href="#Hive-462"><span class="linenos">462</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
+</span><span id="Hive-463"><a href="#Hive-463"><span class="linenos">463</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Hive-464"><a href="#Hive-464"><span class="linenos">464</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Hive-465"><a href="#Hive-465"><span class="linenos">465</span></a>
+</span><span id="Hive-466"><a href="#Hive-466"><span class="linenos">466</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive-467"><a href="#Hive-467"><span class="linenos">467</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><span id="Hive-468"><a href="#Hive-468"><span class="linenos">468</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
+</span><span id="Hive-469"><a href="#Hive-469"><span class="linenos">469</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="Hive-470"><a href="#Hive-470"><span class="linenos">470</span></a> <span class="p">)</span>
+</span><span id="Hive-471"><a href="#Hive-471"><span class="linenos">471</span></a>
+</span><span id="Hive-472"><a href="#Hive-472"><span class="linenos">472</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive-473"><a href="#Hive-473"><span class="linenos">473</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
+</span><span id="Hive-474"><a href="#Hive-474"><span class="linenos">474</span></a>
+</span><span id="Hive-475"><a href="#Hive-475"><span class="linenos">475</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive-476"><a href="#Hive-476"><span class="linenos">476</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="Hive-477"><a href="#Hive-477"><span class="linenos">477</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
+</span><span id="Hive-478"><a href="#Hive-478"><span class="linenos">478</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="Hive-479"><a href="#Hive-479"><span class="linenos">479</span></a> <span class="p">):</span>
+</span><span id="Hive-480"><a href="#Hive-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
+</span><span id="Hive-481"><a href="#Hive-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
+</span><span id="Hive-482"><a href="#Hive-482"><span class="linenos">482</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="Hive-483"><a href="#Hive-483"><span class="linenos">483</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
+</span><span id="Hive-484"><a href="#Hive-484"><span class="linenos">484</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
+</span><span id="Hive-485"><a href="#Hive-485"><span class="linenos">485</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
+</span><span id="Hive-486"><a href="#Hive-486"><span class="linenos">486</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</span><span id="Hive-487"><a href="#Hive-487"><span class="linenos">487</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Hive-488"><a href="#Hive-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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
+</span><span id="Hive-489"><a href="#Hive-489"><span class="linenos">489</span></a> <span class="p">)</span>
+</span><span id="Hive-490"><a href="#Hive-490"><span class="linenos">490</span></a>
+</span><span id="Hive-491"><a href="#Hive-491"><span class="linenos">491</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -1605,7 +1609,7 @@
<div class="attr variable">
<span class="name">KEYWORDS</span> =
<input id="Hive.Tokenizer.KEYWORDS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Hive.Tokenizer.KEYWORDS-view-value"></label><span class="default_value">{&#39;{%&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{%+&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{%-&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;+%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;-%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;{{+&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{{-&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;+}}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;-}}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;/*+&#39;: &lt;TokenType.HINT: &#39;HINT&#39;&gt;, &#39;==&#39;: &lt;TokenType.EQ: &#39;EQ&#39;&gt;, &#39;::&#39;: &lt;TokenType.DCOLON: &#39;DCOLON&#39;&gt;, &#39;||&#39;: &lt;TokenType.DPIPE: &#39;DPIPE&#39;&gt;, &#39;&gt;=&#39;: &lt;TokenType.GTE: &#39;GTE&#39;&gt;, &#39;&lt;=&#39;: &lt;TokenType.LTE: &#39;LTE&#39;&gt;, &#39;&lt;&gt;&#39;: &lt;TokenType.NEQ: &#39;NEQ&#39;&gt;, &#39;!=&#39;: &lt;TokenType.NEQ: &#39;NEQ&#39;&gt;, &#39;&lt;=&gt;&#39;: &lt;TokenType.NULLSAFE_EQ: &#39;NULLSAFE_EQ&#39;&gt;, &#39;-&gt;&#39;: &lt;TokenType.ARROW: &#39;ARROW&#39;&gt;, &#39;-&gt;&gt;&#39;: &lt;TokenType.DARROW: &#39;DARROW&#39;&gt;, &#39;=&gt;&#39;: &lt;TokenType.FARROW: &#39;FARROW&#39;&gt;, &#39;#&gt;&#39;: &lt;TokenType.HASH_ARROW: &#39;HASH_ARROW&#39;&gt;, &#39;#&gt;&gt;&#39;: &lt;TokenType.DHASH_ARROW: &#39;DHASH_ARROW&#39;&gt;, &#39;&lt;-&gt;&#39;: &lt;TokenType.LR_ARROW: &#39;LR_ARROW&#39;&gt;, &#39;&amp;&amp;&#39;: &lt;TokenType.DAMP: &#39;DAMP&#39;&gt;, &#39;??&#39;: &lt;TokenType.DQMARK: &#39;DQMARK&#39;&gt;, &#39;ALL&#39;: &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &#39;ALWAYS&#39;: &lt;TokenType.ALWAYS: &#39;ALWAYS&#39;&gt;, &#39;AND&#39;: &lt;TokenType.AND: &#39;AND&#39;&gt;, &#39;ANTI&#39;: &lt;TokenType.ANTI: &#39;ANTI&#39;&gt;, &#39;ANY&#39;: &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &#39;ASC&#39;: &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &#39;AS&#39;: &lt;TokenType.ALIAS: &#39;ALIAS&#39;&gt;, &#39;ASOF&#39;: &lt;TokenType.ASOF: &#39;ASOF&#39;&gt;, &#39;AUTOINCREMENT&#39;: &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &#39;AUTO_INCREMENT&#39;: &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &#39;BEGIN&#39;: &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &#39;BETWEEN&#39;: &lt;TokenType.BETWEEN: &#39;BETWEEN&#39;&gt;, &#39;CACHE&#39;: &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &#39;UNCACHE&#39;: &lt;TokenType.UNCACHE: &#39;UNCACHE&#39;&gt;, &#39;CASE&#39;: &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &#39;CHARACTER SET&#39;: &lt;TokenType.CHARACTER_SET: &#39;CHARACTER_SET&#39;&gt;, &#39;CLUSTER BY&#39;: &lt;TokenType.CLUSTER_BY: &#39;CLUSTER_BY&#39;&gt;, &#39;COLLATE&#39;: &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &#39;COLUMN&#39;: &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &#39;COMMIT&#39;: &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &#39;CONSTRAINT&#39;: &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &#39;CREATE&#39;: &lt;TokenType.CREATE: &#39;CREATE&#39;&gt;, &#39;CROSS&#39;: &lt;TokenType.CROSS: &#39;CROSS&#39;&gt;, &#39;CUBE&#39;: &lt;TokenType.CUBE: &#39;CUBE&#39;&gt;, &#39;CURRENT_DATE&#39;: &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &#39;CURRENT_TIME&#39;: &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &#39;CURRENT_TIMESTAMP&#39;: &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &#39;CURRENT_USER&#39;: &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &#39;DATABASE&#39;: &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &#39;DEFAULT&#39;: &lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &#39;DELETE&#39;: &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &#39;DESC&#39;: &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &#39;DESCRIBE&#39;: &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &#39;DISTINCT&#39;: &lt;TokenType.DISTINCT: &#39;DISTINCT&#39;&gt;, &#39;DISTRIBUTE BY&#39;: &lt;TokenType.DISTRIBUTE_BY: &#39;DISTRIBUTE_BY&#39;&gt;, &#39;DIV&#39;: &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &#39;DROP&#39;: &lt;TokenType.DROP: &#39;DROP&#39;&gt;, &#39;ELSE&#39;: &lt;TokenType.ELSE: &#39;ELSE&#39;&gt;, &#39;END&#39;: &lt;TokenType.END: &#39;END&#39;&gt;, &#39;ESCAPE&#39;: &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &#39;EXCEPT&#39;: &lt;TokenType.EXCEPT: &#39;EXCEPT&#39;&gt;, &#39;EXECUTE&#39;: &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &#39;EXISTS&#39;: &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &#39;FALSE&#39;: &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &#39;FETCH&#39;: &lt;TokenType.FETCH: &#39;FETCH&#39;&gt;, &#39;FILTER&#39;: &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &#39;FIRST&#39;: &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &#39;FULL&#39;: &lt;TokenType.FULL: &#39;FULL&#39;&gt;, &#39;FUNCTION&#39;: &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &#39;FOR&#39;: &lt;TokenType.FOR: &#39;FOR&#39;&gt;, &#39;FOREIGN KEY&#39;: &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &#39;FORMAT&#39;: &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &#39;FROM&#39;: &lt;TokenType.FROM: &#39;FROM&#39;&gt;, &#39;GEOGRAPHY&#39;: &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &#39;GEOMETRY&#39;: &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &#39;GLOB&#39;: &lt;TokenType.GLOB: &#39;GLOB&#39;&gt;, &#39;GROUP BY&#39;: &lt;TokenType.GROUP_BY: &#39;GROUP_BY&#39;&gt;, &#39;GROUPING SETS&#39;: &lt;TokenType.GROUPING_SETS: &#39;GROUPING_SETS&#39;&gt;, &#39;HAVING&#39;: &lt;TokenType.HAVING: &#39;HAVING&#39;&gt;, &#39;IF&#39;: &lt;TokenType.IF: &#39;IF&#39;&gt;, &#39;ILIKE&#39;: &lt;TokenType.ILIKE: &#39;ILIKE&#39;&gt;, &#39;IN&#39;: &lt;TokenType.IN: &#39;IN&#39;&gt;, &#39;INDEX&#39;: &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &#39;INET&#39;: &lt;TokenType.INET: &#39;INET&#39;&gt;, &#39;INNER&#39;: &lt;TokenType.INNER: &#39;INNER&#39;&gt;, &#39;INSERT&#39;: &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;, &#39;INTERVAL&#39;: &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &#39;INTERSECT&#39;: &lt;TokenType.INTERSECT: &#39;INTERSECT&#39;&gt;, &#39;INTO&#39;: &lt;TokenType.INTO: &#39;INTO&#39;&gt;, &#39;IS&#39;: &lt;TokenType.IS: &#39;IS&#39;&gt;, &#39;ISNULL&#39;: &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &#39;JOIN&#39;: &lt;TokenType.JOIN: &#39;JOIN&#39;&gt;, &#39;KEEP&#39;: &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &#39;LATERAL&#39;: &lt;TokenType.LATERAL: &#39;LATERAL&#39;&gt;, &#39;LEFT&#39;: &lt;TokenType.LEFT: &#39;LEFT&#39;&gt;, &#39;LIKE&#39;: &lt;TokenType.LIKE: &#39;LIKE&#39;&gt;, &#39;LIMIT&#39;: &lt;TokenType.LIMIT: &#39;LIMIT&#39;&gt;, &#39;LOAD&#39;: &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &#39;LOCK&#39;: &lt;TokenType.LOCK: &#39;LOCK&#39;&gt;, &#39;MERGE&#39;: &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &#39;NATURAL&#39;: &lt;TokenType.NATURAL: &#39;NATURAL&#39;&gt;, &#39;NEXT&#39;: &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &#39;NEXT VALUE FOR&#39;: &lt;TokenType.NEXT_VALUE_FOR: &#39;NEXT_VALUE_FOR&#39;&gt;, &#39;NOT&#39;: &lt;TokenType.NOT: &#39;NOT&#39;&gt;, &#39;NOTNULL&#39;: &lt;TokenType.NOTNULL: &#39;NOTNULL&#39;&gt;, &#39;NULL&#39;: &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &#39;OBJECT&#39;: &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &#39;OFFSET&#39;: &lt;TokenType.OFFSET: &#39;OFFSET&#39;&gt;, &#39;ON&#39;: &lt;TokenType.ON: &#39;ON&#39;&gt;, &#39;OR&#39;: &lt;TokenType.OR: &#39;OR&#39;&gt;, &#39;XOR&#39;: &lt;TokenType.XOR: &#39;XOR&#39;&gt;, &#39;ORDER BY&#39;: &lt;TokenType.ORDER_BY: &#39;ORDER_BY&#39;&gt;, &#39;ORDINALITY&#39;: &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &#39;OUTER&#39;: &lt;TokenType.OUTER: &#39;OUTER&#39;&gt;, &#39;OVER&#39;: &lt;TokenType.OVER: &#39;OVER&#39;&gt;, &#39;OVERLAPS&#39;: &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &#39;OVERWRITE&#39;: &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &#39;PARTITION&#39;: &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &#39;PARTITION BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PARTITIONED BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PARTITIONED_BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PERCENT&#39;: &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &#39;PIVOT&#39;: &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &#39;PRAGMA&#39;: &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &#39;PRIMARY KEY&#39;: &lt;TokenType.PRIMARY_KEY: &#39;PRIMARY_KEY&#39;&gt;, &#39;PROCEDURE&#39;: &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &#39;QUALIFY&#39;: &lt;TokenType.QUALIFY: &#39;QUALIFY&#39;&gt;, &#39;RANGE&#39;: &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &#39;RECURSIVE&#39;: &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &#39;REGEXP&#39;: &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &#39;REPLACE&#39;: &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &#39;RETURNING&#39;: &lt;TokenType.RETURNING: &#39;RETURNING&#39;&gt;, &#39;REFERENCES&#39;: &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &#39;RIGHT&#39;: &lt;TokenType.RIGHT: &#39;RIGHT&#39;&gt;, &#39;RLIKE&#39;: &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &#39;ROLLBACK&#39;: &lt;TokenType.ROLLBACK: &#39;ROLLBACK&#39;&gt;, &#39;ROLLUP&#39;: &lt;TokenType.ROLLUP: &#39;ROLLUP&#39;&gt;, &#39;ROW&#39;: &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &#39;ROWS&#39;: &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &#39;SCHEMA&#39;: &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &#39;SELECT&#39;: &lt;TokenType.SELECT: &#39;SELECT&#39;&gt;, &#39;SEMI&#39;: &lt;TokenType.SEMI: &#39;SEMI&#39;&gt;, &#39;SET&#39;: &lt;TokenType.SET: &#39;SET&#39;&gt;, &#39;SETTINGS&#39;: &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &#39;SHOW&#39;: &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;, &#39;SIMILAR TO&#39;: &lt;TokenType.SIMILAR_TO: &#39;SIMILAR_TO&#39;&gt;, &#39;SOME&#39;: &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &#39;SORT BY&#39;: &lt;TokenType.SORT_BY: &#39;SORT_BY&#39;&gt;, &#39;TABLE&#39;: &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &#39;TABLESAMPLE&#39;: &lt;TokenType.TABLE_SAMPLE: &#39;TABLE_SAMPLE&#39;&gt;, &#39;TEMP&#39;: &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &#39;TEMPORARY&#39;: &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &#39;THEN&#39;: &lt;TokenType.THEN: &#39;THEN&#39;&gt;, &#39;TRUE&#39;: &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &#39;UNION&#39;: &lt;TokenType.UNION: &#39;UNION&#39;&gt;, &#39;UNNEST&#39;: &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &#39;UNPIVOT&#39;: &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &#39;UPDATE&#39;: &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &#39;USE&#39;: &lt;TokenType.USE: &#39;USE&#39;&gt;, &#39;USING&#39;: &lt;TokenType.USING: &#39;USING&#39;&gt;, &#39;UUID&#39;: &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &#39;VALUES&#39;: &lt;TokenType.VALUES: &#39;VALUES&#39;&gt;, &#39;VIEW&#39;: &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &#39;VOLATILE&#39;: &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &#39;WHEN&#39;: &lt;TokenType.WHEN: &#39;WHEN&#39;&gt;, &#39;WHERE&#39;: &lt;TokenType.WHERE: &#39;WHERE&#39;&gt;, &#39;WINDOW&#39;: &lt;TokenType.WINDOW: &#39;WINDOW&#39;&gt;, &#39;WITH&#39;: &lt;TokenType.WITH: &#39;WITH&#39;&gt;, &#39;APPLY&#39;: &lt;TokenType.APPLY: &#39;APPLY&#39;&gt;, &#39;ARRAY&#39;: &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &#39;BIT&#39;: &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &#39;BOOL&#39;: &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &#39;BOOLEAN&#39;: &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &#39;BYTE&#39;: &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &#39;TINYINT&#39;: &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &#39;SHORT&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;SMALLINT&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;INT2&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;INTEGER&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;INT&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;INT4&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;LONG&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;BIGINT&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;INT8&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;DEC&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;DECIMAL&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;BIGDECIMAL&#39;: &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &#39;BIGNUMERIC&#39;: &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &#39;MAP&#39;: &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &#39;NULLABLE&#39;: &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &#39;NUMBER&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;NUMERIC&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;FIXED&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;REAL&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT4&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT8&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;DOUBLE&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;DOUBLE PRECISION&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;JSON&#39;: &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &#39;CHAR&#39;: &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &#39;CHARACTER&#39;: &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &#39;NCHAR&#39;: &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &#39;VARCHAR&#39;: &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &#39;VARCHAR2&#39;: &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &#39;NVARCHAR&#39;: &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &#39;NVARCHAR2&#39;: &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &#39;STR&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;STRING&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;TEXT&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;CLOB&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;LONGVARCHAR&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;BINARY&#39;: &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &#39;BLOB&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;BYTEA&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;VARBINARY&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;TIME&#39;: &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &#39;TIMESTAMP&#39;: &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &#39;TIMESTAMPTZ&#39;: &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &#39;TIMESTAMPLTZ&#39;: &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &#39;DATE&#39;: &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &#39;DATETIME&#39;: &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &#39;INT4RANGE&#39;: &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &#39;INT4MULTIRANGE&#39;: &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &#39;INT8RANGE&#39;: &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &#39;INT8MULTIRANGE&#39;: &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &#39;NUMRANGE&#39;: &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &#39;NUMMULTIRANGE&#39;: &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &#39;TSRANGE&#39;: &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &#39;TSMULTIRANGE&#39;: &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &#39;TSTZRANGE&#39;: &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &#39;TSTZMULTIRANGE&#39;: &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &#39;DATERANGE&#39;: &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &#39;DATEMULTIRANGE&#39;: &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &#39;UNIQUE&#39;: &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &#39;STRUCT&#39;: &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &#39;VARIANT&#39;: &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &#39;ALTER&#39;: &lt;TokenType.ALTER: &#39;ALTER&#39;&gt;, &#39;ANALYZE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;CALL&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;COMMENT&#39;: &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &#39;COPY&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;EXPLAIN&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;GRANT&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;OPTIMIZE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;PREPARE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;TRUNCATE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;VACUUM&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;USER-DEFINED&#39;: &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &#39;ADD ARCHIVE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD ARCHIVES&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD FILE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD FILES&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD JAR&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD JARS&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;MSCK REPAIR&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;REFRESH&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;WITH SERDEPROPERTIES&#39;: &lt;TokenType.SERDE_PROPERTIES: &#39;SERDE_PROPERTIES&#39;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="Hive.Tokenizer.KEYWORDS-view-value"></label><span class="default_value">{&#39;{%&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{%+&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{%-&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;+%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;-%}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;{{+&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;{{-&#39;: &lt;TokenType.BLOCK_START: &#39;BLOCK_START&#39;&gt;, &#39;+}}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;-}}&#39;: &lt;TokenType.BLOCK_END: &#39;BLOCK_END&#39;&gt;, &#39;/*+&#39;: &lt;TokenType.HINT: &#39;HINT&#39;&gt;, &#39;==&#39;: &lt;TokenType.EQ: &#39;EQ&#39;&gt;, &#39;::&#39;: &lt;TokenType.DCOLON: &#39;DCOLON&#39;&gt;, &#39;||&#39;: &lt;TokenType.DPIPE: &#39;DPIPE&#39;&gt;, &#39;&gt;=&#39;: &lt;TokenType.GTE: &#39;GTE&#39;&gt;, &#39;&lt;=&#39;: &lt;TokenType.LTE: &#39;LTE&#39;&gt;, &#39;&lt;&gt;&#39;: &lt;TokenType.NEQ: &#39;NEQ&#39;&gt;, &#39;!=&#39;: &lt;TokenType.NEQ: &#39;NEQ&#39;&gt;, &#39;&lt;=&gt;&#39;: &lt;TokenType.NULLSAFE_EQ: &#39;NULLSAFE_EQ&#39;&gt;, &#39;-&gt;&#39;: &lt;TokenType.ARROW: &#39;ARROW&#39;&gt;, &#39;-&gt;&gt;&#39;: &lt;TokenType.DARROW: &#39;DARROW&#39;&gt;, &#39;=&gt;&#39;: &lt;TokenType.FARROW: &#39;FARROW&#39;&gt;, &#39;#&gt;&#39;: &lt;TokenType.HASH_ARROW: &#39;HASH_ARROW&#39;&gt;, &#39;#&gt;&gt;&#39;: &lt;TokenType.DHASH_ARROW: &#39;DHASH_ARROW&#39;&gt;, &#39;&lt;-&gt;&#39;: &lt;TokenType.LR_ARROW: &#39;LR_ARROW&#39;&gt;, &#39;&amp;&amp;&#39;: &lt;TokenType.DAMP: &#39;DAMP&#39;&gt;, &#39;??&#39;: &lt;TokenType.DQMARK: &#39;DQMARK&#39;&gt;, &#39;ALL&#39;: &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &#39;ALWAYS&#39;: &lt;TokenType.ALWAYS: &#39;ALWAYS&#39;&gt;, &#39;AND&#39;: &lt;TokenType.AND: &#39;AND&#39;&gt;, &#39;ANTI&#39;: &lt;TokenType.ANTI: &#39;ANTI&#39;&gt;, &#39;ANY&#39;: &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &#39;ASC&#39;: &lt;TokenType.ASC: &#39;ASC&#39;&gt;, &#39;AS&#39;: &lt;TokenType.ALIAS: &#39;ALIAS&#39;&gt;, &#39;ASOF&#39;: &lt;TokenType.ASOF: &#39;ASOF&#39;&gt;, &#39;AUTOINCREMENT&#39;: &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &#39;AUTO_INCREMENT&#39;: &lt;TokenType.AUTO_INCREMENT: &#39;AUTO_INCREMENT&#39;&gt;, &#39;BEGIN&#39;: &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;, &#39;BETWEEN&#39;: &lt;TokenType.BETWEEN: &#39;BETWEEN&#39;&gt;, &#39;CACHE&#39;: &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;, &#39;UNCACHE&#39;: &lt;TokenType.UNCACHE: &#39;UNCACHE&#39;&gt;, &#39;CASE&#39;: &lt;TokenType.CASE: &#39;CASE&#39;&gt;, &#39;CHARACTER SET&#39;: &lt;TokenType.CHARACTER_SET: &#39;CHARACTER_SET&#39;&gt;, &#39;CLUSTER BY&#39;: &lt;TokenType.CLUSTER_BY: &#39;CLUSTER_BY&#39;&gt;, &#39;COLLATE&#39;: &lt;TokenType.COLLATE: &#39;COLLATE&#39;&gt;, &#39;COLUMN&#39;: &lt;TokenType.COLUMN: &#39;COLUMN&#39;&gt;, &#39;COMMIT&#39;: &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;, &#39;CONSTRAINT&#39;: &lt;TokenType.CONSTRAINT: &#39;CONSTRAINT&#39;&gt;, &#39;CREATE&#39;: &lt;TokenType.CREATE: &#39;CREATE&#39;&gt;, &#39;CROSS&#39;: &lt;TokenType.CROSS: &#39;CROSS&#39;&gt;, &#39;CUBE&#39;: &lt;TokenType.CUBE: &#39;CUBE&#39;&gt;, &#39;CURRENT_DATE&#39;: &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &#39;CURRENT_TIME&#39;: &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &#39;CURRENT_TIMESTAMP&#39;: &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &#39;CURRENT_USER&#39;: &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &#39;DATABASE&#39;: &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;, &#39;DEFAULT&#39;: &lt;TokenType.DEFAULT: &#39;DEFAULT&#39;&gt;, &#39;DELETE&#39;: &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;, &#39;DESC&#39;: &lt;TokenType.DESC: &#39;DESC&#39;&gt;, &#39;DESCRIBE&#39;: &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;, &#39;DISTINCT&#39;: &lt;TokenType.DISTINCT: &#39;DISTINCT&#39;&gt;, &#39;DISTRIBUTE BY&#39;: &lt;TokenType.DISTRIBUTE_BY: &#39;DISTRIBUTE_BY&#39;&gt;, &#39;DIV&#39;: &lt;TokenType.DIV: &#39;DIV&#39;&gt;, &#39;DROP&#39;: &lt;TokenType.DROP: &#39;DROP&#39;&gt;, &#39;ELSE&#39;: &lt;TokenType.ELSE: &#39;ELSE&#39;&gt;, &#39;END&#39;: &lt;TokenType.END: &#39;END&#39;&gt;, &#39;ESCAPE&#39;: &lt;TokenType.ESCAPE: &#39;ESCAPE&#39;&gt;, &#39;EXCEPT&#39;: &lt;TokenType.EXCEPT: &#39;EXCEPT&#39;&gt;, &#39;EXECUTE&#39;: &lt;TokenType.EXECUTE: &#39;EXECUTE&#39;&gt;, &#39;EXISTS&#39;: &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &#39;FALSE&#39;: &lt;TokenType.FALSE: &#39;FALSE&#39;&gt;, &#39;FETCH&#39;: &lt;TokenType.FETCH: &#39;FETCH&#39;&gt;, &#39;FILTER&#39;: &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &#39;FIRST&#39;: &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &#39;FULL&#39;: &lt;TokenType.FULL: &#39;FULL&#39;&gt;, &#39;FUNCTION&#39;: &lt;TokenType.FUNCTION: &#39;FUNCTION&#39;&gt;, &#39;FOR&#39;: &lt;TokenType.FOR: &#39;FOR&#39;&gt;, &#39;FOREIGN KEY&#39;: &lt;TokenType.FOREIGN_KEY: &#39;FOREIGN_KEY&#39;&gt;, &#39;FORMAT&#39;: &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &#39;FROM&#39;: &lt;TokenType.FROM: &#39;FROM&#39;&gt;, &#39;GEOGRAPHY&#39;: &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &#39;GEOMETRY&#39;: &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &#39;GLOB&#39;: &lt;TokenType.GLOB: &#39;GLOB&#39;&gt;, &#39;GROUP BY&#39;: &lt;TokenType.GROUP_BY: &#39;GROUP_BY&#39;&gt;, &#39;GROUPING SETS&#39;: &lt;TokenType.GROUPING_SETS: &#39;GROUPING_SETS&#39;&gt;, &#39;HAVING&#39;: &lt;TokenType.HAVING: &#39;HAVING&#39;&gt;, &#39;ILIKE&#39;: &lt;TokenType.ILIKE: &#39;ILIKE&#39;&gt;, &#39;IN&#39;: &lt;TokenType.IN: &#39;IN&#39;&gt;, &#39;INDEX&#39;: &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &#39;INET&#39;: &lt;TokenType.INET: &#39;INET&#39;&gt;, &#39;INNER&#39;: &lt;TokenType.INNER: &#39;INNER&#39;&gt;, &#39;INSERT&#39;: &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;, &#39;INTERVAL&#39;: &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &#39;INTERSECT&#39;: &lt;TokenType.INTERSECT: &#39;INTERSECT&#39;&gt;, &#39;INTO&#39;: &lt;TokenType.INTO: &#39;INTO&#39;&gt;, &#39;IS&#39;: &lt;TokenType.IS: &#39;IS&#39;&gt;, &#39;ISNULL&#39;: &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &#39;JOIN&#39;: &lt;TokenType.JOIN: &#39;JOIN&#39;&gt;, &#39;KEEP&#39;: &lt;TokenType.KEEP: &#39;KEEP&#39;&gt;, &#39;LATERAL&#39;: &lt;TokenType.LATERAL: &#39;LATERAL&#39;&gt;, &#39;LEFT&#39;: &lt;TokenType.LEFT: &#39;LEFT&#39;&gt;, &#39;LIKE&#39;: &lt;TokenType.LIKE: &#39;LIKE&#39;&gt;, &#39;LIMIT&#39;: &lt;TokenType.LIMIT: &#39;LIMIT&#39;&gt;, &#39;LOAD&#39;: &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;, &#39;LOCK&#39;: &lt;TokenType.LOCK: &#39;LOCK&#39;&gt;, &#39;MERGE&#39;: &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &#39;NATURAL&#39;: &lt;TokenType.NATURAL: &#39;NATURAL&#39;&gt;, &#39;NEXT&#39;: &lt;TokenType.NEXT: &#39;NEXT&#39;&gt;, &#39;NOT&#39;: &lt;TokenType.NOT: &#39;NOT&#39;&gt;, &#39;NOTNULL&#39;: &lt;TokenType.NOTNULL: &#39;NOTNULL&#39;&gt;, &#39;NULL&#39;: &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &#39;OBJECT&#39;: &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &#39;OFFSET&#39;: &lt;TokenType.OFFSET: &#39;OFFSET&#39;&gt;, &#39;ON&#39;: &lt;TokenType.ON: &#39;ON&#39;&gt;, &#39;OR&#39;: &lt;TokenType.OR: &#39;OR&#39;&gt;, &#39;XOR&#39;: &lt;TokenType.XOR: &#39;XOR&#39;&gt;, &#39;ORDER BY&#39;: &lt;TokenType.ORDER_BY: &#39;ORDER_BY&#39;&gt;, &#39;ORDINALITY&#39;: &lt;TokenType.ORDINALITY: &#39;ORDINALITY&#39;&gt;, &#39;OUTER&#39;: &lt;TokenType.OUTER: &#39;OUTER&#39;&gt;, &#39;OVER&#39;: &lt;TokenType.OVER: &#39;OVER&#39;&gt;, &#39;OVERLAPS&#39;: &lt;TokenType.OVERLAPS: &#39;OVERLAPS&#39;&gt;, &#39;OVERWRITE&#39;: &lt;TokenType.OVERWRITE: &#39;OVERWRITE&#39;&gt;, &#39;PARTITION&#39;: &lt;TokenType.PARTITION: &#39;PARTITION&#39;&gt;, &#39;PARTITION BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PARTITIONED BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PARTITIONED_BY&#39;: &lt;TokenType.PARTITION_BY: &#39;PARTITION_BY&#39;&gt;, &#39;PERCENT&#39;: &lt;TokenType.PERCENT: &#39;PERCENT&#39;&gt;, &#39;PIVOT&#39;: &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;, &#39;PRAGMA&#39;: &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;, &#39;PRIMARY KEY&#39;: &lt;TokenType.PRIMARY_KEY: &#39;PRIMARY_KEY&#39;&gt;, &#39;PROCEDURE&#39;: &lt;TokenType.PROCEDURE: &#39;PROCEDURE&#39;&gt;, &#39;QUALIFY&#39;: &lt;TokenType.QUALIFY: &#39;QUALIFY&#39;&gt;, &#39;RANGE&#39;: &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &#39;RECURSIVE&#39;: &lt;TokenType.RECURSIVE: &#39;RECURSIVE&#39;&gt;, &#39;REGEXP&#39;: &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &#39;REPLACE&#39;: &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;, &#39;RETURNING&#39;: &lt;TokenType.RETURNING: &#39;RETURNING&#39;&gt;, &#39;REFERENCES&#39;: &lt;TokenType.REFERENCES: &#39;REFERENCES&#39;&gt;, &#39;RIGHT&#39;: &lt;TokenType.RIGHT: &#39;RIGHT&#39;&gt;, &#39;RLIKE&#39;: &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &#39;ROLLBACK&#39;: &lt;TokenType.ROLLBACK: &#39;ROLLBACK&#39;&gt;, &#39;ROLLUP&#39;: &lt;TokenType.ROLLUP: &#39;ROLLUP&#39;&gt;, &#39;ROW&#39;: &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &#39;ROWS&#39;: &lt;TokenType.ROWS: &#39;ROWS&#39;&gt;, &#39;SCHEMA&#39;: &lt;TokenType.SCHEMA: &#39;SCHEMA&#39;&gt;, &#39;SELECT&#39;: &lt;TokenType.SELECT: &#39;SELECT&#39;&gt;, &#39;SEMI&#39;: &lt;TokenType.SEMI: &#39;SEMI&#39;&gt;, &#39;SET&#39;: &lt;TokenType.SET: &#39;SET&#39;&gt;, &#39;SETTINGS&#39;: &lt;TokenType.SETTINGS: &#39;SETTINGS&#39;&gt;, &#39;SHOW&#39;: &lt;TokenType.SHOW: &#39;SHOW&#39;&gt;, &#39;SIMILAR TO&#39;: &lt;TokenType.SIMILAR_TO: &#39;SIMILAR_TO&#39;&gt;, &#39;SOME&#39;: &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &#39;SORT BY&#39;: &lt;TokenType.SORT_BY: &#39;SORT_BY&#39;&gt;, &#39;TABLE&#39;: &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &#39;TABLESAMPLE&#39;: &lt;TokenType.TABLE_SAMPLE: &#39;TABLE_SAMPLE&#39;&gt;, &#39;TEMP&#39;: &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &#39;TEMPORARY&#39;: &lt;TokenType.TEMPORARY: &#39;TEMPORARY&#39;&gt;, &#39;THEN&#39;: &lt;TokenType.THEN: &#39;THEN&#39;&gt;, &#39;TRUE&#39;: &lt;TokenType.TRUE: &#39;TRUE&#39;&gt;, &#39;UNION&#39;: &lt;TokenType.UNION: &#39;UNION&#39;&gt;, &#39;UNNEST&#39;: &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &#39;UNPIVOT&#39;: &lt;TokenType.UNPIVOT: &#39;UNPIVOT&#39;&gt;, &#39;UPDATE&#39;: &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;, &#39;USE&#39;: &lt;TokenType.USE: &#39;USE&#39;&gt;, &#39;USING&#39;: &lt;TokenType.USING: &#39;USING&#39;&gt;, &#39;UUID&#39;: &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &#39;VALUES&#39;: &lt;TokenType.VALUES: &#39;VALUES&#39;&gt;, &#39;VIEW&#39;: &lt;TokenType.VIEW: &#39;VIEW&#39;&gt;, &#39;VOLATILE&#39;: &lt;TokenType.VOLATILE: &#39;VOLATILE&#39;&gt;, &#39;WHEN&#39;: &lt;TokenType.WHEN: &#39;WHEN&#39;&gt;, &#39;WHERE&#39;: &lt;TokenType.WHERE: &#39;WHERE&#39;&gt;, &#39;WINDOW&#39;: &lt;TokenType.WINDOW: &#39;WINDOW&#39;&gt;, &#39;WITH&#39;: &lt;TokenType.WITH: &#39;WITH&#39;&gt;, &#39;APPLY&#39;: &lt;TokenType.APPLY: &#39;APPLY&#39;&gt;, &#39;ARRAY&#39;: &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &#39;BIT&#39;: &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &#39;BOOL&#39;: &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &#39;BOOLEAN&#39;: &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &#39;BYTE&#39;: &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &#39;TINYINT&#39;: &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &#39;SHORT&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;SMALLINT&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;INT2&#39;: &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &#39;INTEGER&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;INT&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;INT4&#39;: &lt;TokenType.INT: &#39;INT&#39;&gt;, &#39;LONG&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;BIGINT&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;INT8&#39;: &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &#39;DEC&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;DECIMAL&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;BIGDECIMAL&#39;: &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &#39;BIGNUMERIC&#39;: &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &#39;MAP&#39;: &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &#39;NULLABLE&#39;: &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &#39;NUMBER&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;NUMERIC&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;FIXED&#39;: &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &#39;REAL&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT4&#39;: &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &#39;FLOAT8&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;DOUBLE&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;DOUBLE PRECISION&#39;: &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &#39;JSON&#39;: &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &#39;CHAR&#39;: &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &#39;CHARACTER&#39;: &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &#39;NCHAR&#39;: &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &#39;VARCHAR&#39;: &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &#39;VARCHAR2&#39;: &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &#39;NVARCHAR&#39;: &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &#39;NVARCHAR2&#39;: &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &#39;STR&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;STRING&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;TEXT&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;CLOB&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;LONGVARCHAR&#39;: &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &#39;BINARY&#39;: &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &#39;BLOB&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;BYTEA&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;VARBINARY&#39;: &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &#39;TIME&#39;: &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &#39;TIMESTAMP&#39;: &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &#39;TIMESTAMPTZ&#39;: &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &#39;TIMESTAMPLTZ&#39;: &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &#39;DATE&#39;: &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &#39;DATETIME&#39;: &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &#39;INT4RANGE&#39;: &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &#39;INT4MULTIRANGE&#39;: &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &#39;INT8RANGE&#39;: &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &#39;INT8MULTIRANGE&#39;: &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &#39;NUMRANGE&#39;: &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &#39;NUMMULTIRANGE&#39;: &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &#39;TSRANGE&#39;: &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &#39;TSMULTIRANGE&#39;: &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &#39;TSTZRANGE&#39;: &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &#39;TSTZMULTIRANGE&#39;: &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &#39;DATERANGE&#39;: &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &#39;DATEMULTIRANGE&#39;: &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &#39;UNIQUE&#39;: &lt;TokenType.UNIQUE: &#39;UNIQUE&#39;&gt;, &#39;STRUCT&#39;: &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &#39;VARIANT&#39;: &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &#39;ALTER&#39;: &lt;TokenType.ALTER: &#39;ALTER&#39;&gt;, &#39;ANALYZE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;CALL&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;COMMENT&#39;: &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;, &#39;COPY&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;EXPLAIN&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;GRANT&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;OPTIMIZE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;PREPARE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;TRUNCATE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;VACUUM&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;USER-DEFINED&#39;: &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &#39;ADD ARCHIVE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD ARCHIVES&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD FILE&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD FILES&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD JAR&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;ADD JARS&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;MSCK REPAIR&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;REFRESH&#39;: &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &#39;WITH SERDEPROPERTIES&#39;: &lt;TokenType.SERDE_PROPERTIES: &#39;SERDE_PROPERTIES&#39;&gt;}</span>
</div>
@@ -1722,8 +1726,8 @@
</span><span id="Hive.Parser-273"><a href="#Hive.Parser-273"><span class="linenos">273</span></a> <span class="s2">&quot;YEAR&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">Year</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)),</span>
</span><span id="Hive.Parser-274"><a href="#Hive.Parser-274"><span class="linenos">274</span></a> <span class="p">}</span>
</span><span id="Hive.Parser-275"><a href="#Hive.Parser-275"><span class="linenos">275</span></a>
-</span><span id="Hive.Parser-276"><a href="#Hive.Parser-276"><span class="linenos">276</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive.Parser-277"><a href="#Hive.Parser-277"><span class="linenos">277</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">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="Hive.Parser-276"><a href="#Hive.Parser-276"><span class="linenos">276</span></a> <span class="n">NO_PAREN_FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive.Parser-277"><a href="#Hive.Parser-277"><span class="linenos">277</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="Hive.Parser-278"><a href="#Hive.Parser-278"><span class="linenos">278</span></a> <span class="s2">&quot;TRANSFORM&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_transform</span><span class="p">(),</span>
</span><span id="Hive.Parser-279"><a href="#Hive.Parser-279"><span class="linenos">279</span></a> <span class="p">}</span>
</span><span id="Hive.Parser-280"><a href="#Hive.Parser-280"><span class="linenos">280</span></a>
@@ -1734,72 +1738,74 @@
</span><span id="Hive.Parser-285"><a href="#Hive.Parser-285"><span class="linenos">285</span></a> <span class="p">),</span>
</span><span id="Hive.Parser-286"><a href="#Hive.Parser-286"><span class="linenos">286</span></a> <span class="p">}</span>
</span><span id="Hive.Parser-287"><a href="#Hive.Parser-287"><span class="linenos">287</span></a>
-</span><span id="Hive.Parser-288"><a href="#Hive.Parser-288"><span class="linenos">288</span></a> <span class="k">def</span> <span class="nf">_parse_transform</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">:</span>
-</span><span id="Hive.Parser-289"><a href="#Hive.Parser-289"><span class="linenos">289</span></a> <span class="n">args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_lambda</span><span class="p">)</span>
-</span><span id="Hive.Parser-290"><a href="#Hive.Parser-290"><span class="linenos">290</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match_r_paren</span><span class="p">()</span>
-</span><span id="Hive.Parser-291"><a href="#Hive.Parser-291"><span class="linenos">291</span></a>
-</span><span id="Hive.Parser-292"><a href="#Hive.Parser-292"><span class="linenos">292</span></a> <span class="n">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Hive.Parser-293"><a href="#Hive.Parser-293"><span class="linenos">293</span></a>
-</span><span id="Hive.Parser-294"><a href="#Hive.Parser-294"><span class="linenos">294</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="Hive.Parser-295"><a href="#Hive.Parser-295"><span class="linenos">295</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
-</span><span id="Hive.Parser-296"><a href="#Hive.Parser-296"><span class="linenos">296</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="Hive.Parser-297"><a href="#Hive.Parser-297"><span class="linenos">297</span></a>
-</span><span id="Hive.Parser-298"><a href="#Hive.Parser-298"><span class="linenos">298</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
-</span><span id="Hive.Parser-299"><a href="#Hive.Parser-299"><span class="linenos">299</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
-</span><span id="Hive.Parser-300"><a href="#Hive.Parser-300"><span class="linenos">300</span></a>
-</span><span id="Hive.Parser-301"><a href="#Hive.Parser-301"><span class="linenos">301</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive.Parser-288"><a href="#Hive.Parser-288"><span class="linenos">288</span></a> <span class="k">def</span> <span class="nf">_parse_transform</span><span class="p">(</span><span class="bp">self</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">Transform</span> <span class="o">|</span> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">]:</span>
+</span><span id="Hive.Parser-289"><a href="#Hive.Parser-289"><span class="linenos">289</span></a> <span class="k">if</span> <span class="ow">not</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_PAREN</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="Hive.Parser-290"><a href="#Hive.Parser-290"><span class="linenos">290</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_retreat</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_index</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+</span><span id="Hive.Parser-291"><a href="#Hive.Parser-291"><span class="linenos">291</span></a> <span class="k">return</span> <span class="kc">None</span>
+</span><span id="Hive.Parser-292"><a href="#Hive.Parser-292"><span class="linenos">292</span></a>
+</span><span id="Hive.Parser-293"><a href="#Hive.Parser-293"><span class="linenos">293</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_lambda</span><span class="p">)</span>
+</span><span id="Hive.Parser-294"><a href="#Hive.Parser-294"><span class="linenos">294</span></a> <span class="n">row_format_before</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Hive.Parser-295"><a href="#Hive.Parser-295"><span class="linenos">295</span></a>
+</span><span id="Hive.Parser-296"><a href="#Hive.Parser-296"><span class="linenos">296</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="Hive.Parser-297"><a href="#Hive.Parser-297"><span class="linenos">297</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDWRITER&quot;</span><span class="p">):</span>
+</span><span id="Hive.Parser-298"><a href="#Hive.Parser-298"><span class="linenos">298</span></a> <span class="n">record_writer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive.Parser-299"><a href="#Hive.Parser-299"><span class="linenos">299</span></a>
+</span><span id="Hive.Parser-300"><a href="#Hive.Parser-300"><span class="linenos">300</span></a> <span class="k">if</span> <span class="ow">not</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">USING</span><span class="p">):</span>
+</span><span id="Hive.Parser-301"><a href="#Hive.Parser-301"><span class="linenos">301</span></a> <span class="k">return</span> <span class="n">exp</span><span class="o">.</span><span class="n">Transform</span><span class="o">.</span><span class="n">from_arg_list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
</span><span id="Hive.Parser-302"><a href="#Hive.Parser-302"><span class="linenos">302</span></a>
-</span><span id="Hive.Parser-303"><a href="#Hive.Parser-303"><span class="linenos">303</span></a> <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">ALIAS</span><span class="p">)</span>
-</span><span id="Hive.Parser-304"><a href="#Hive.Parser-304"><span class="linenos">304</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><span class="p">()</span>
-</span><span id="Hive.Parser-305"><a href="#Hive.Parser-305"><span class="linenos">305</span></a>
-</span><span id="Hive.Parser-306"><a href="#Hive.Parser-306"><span class="linenos">306</span></a> <span class="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Hive.Parser-307"><a href="#Hive.Parser-307"><span class="linenos">307</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="Hive.Parser-308"><a href="#Hive.Parser-308"><span class="linenos">308</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
-</span><span id="Hive.Parser-309"><a href="#Hive.Parser-309"><span class="linenos">309</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
-</span><span id="Hive.Parser-310"><a href="#Hive.Parser-310"><span class="linenos">310</span></a>
-</span><span id="Hive.Parser-311"><a href="#Hive.Parser-311"><span class="linenos">311</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><span id="Hive.Parser-312"><a href="#Hive.Parser-312"><span class="linenos">312</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
-</span><span id="Hive.Parser-313"><a href="#Hive.Parser-313"><span class="linenos">313</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
-</span><span id="Hive.Parser-314"><a href="#Hive.Parser-314"><span class="linenos">314</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
-</span><span id="Hive.Parser-315"><a href="#Hive.Parser-315"><span class="linenos">315</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
-</span><span id="Hive.Parser-316"><a href="#Hive.Parser-316"><span class="linenos">316</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
-</span><span id="Hive.Parser-317"><a href="#Hive.Parser-317"><span class="linenos">317</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
-</span><span id="Hive.Parser-318"><a href="#Hive.Parser-318"><span class="linenos">318</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
-</span><span id="Hive.Parser-319"><a href="#Hive.Parser-319"><span class="linenos">319</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
-</span><span id="Hive.Parser-320"><a href="#Hive.Parser-320"><span class="linenos">320</span></a> <span class="p">)</span>
-</span><span id="Hive.Parser-321"><a href="#Hive.Parser-321"><span class="linenos">321</span></a>
-</span><span id="Hive.Parser-322"><a href="#Hive.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="Hive.Parser-323"><a href="#Hive.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><span id="Hive.Parser-324"><a href="#Hive.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="Hive.Parser-325"><a href="#Hive.Parser-325"><span class="linenos">325</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="Hive.Parser-326"><a href="#Hive.Parser-326"><span class="linenos">326</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
-</span><span id="Hive.Parser-327"><a href="#Hive.Parser-327"><span class="linenos">327</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</span>
-</span><span id="Hive.Parser-328"><a href="#Hive.Parser-328"><span class="linenos">328</span></a>
-</span><span id="Hive.Parser-329"><a href="#Hive.Parser-329"><span class="linenos">329</span></a><span class="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
-</span><span id="Hive.Parser-330"><a href="#Hive.Parser-330"><span class="linenos">330</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
-</span><span id="Hive.Parser-331"><a href="#Hive.Parser-331"><span class="linenos">331</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
-</span><span id="Hive.Parser-332"><a href="#Hive.Parser-332"><span class="linenos">332</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
-</span><span id="Hive.Parser-333"><a href="#Hive.Parser-333"><span class="linenos">333</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
-</span><span id="Hive.Parser-334"><a href="#Hive.Parser-334"><span class="linenos">334</span></a>
-</span><span id="Hive.Parser-335"><a href="#Hive.Parser-335"><span class="linenos">335</span></a><span class="sd"> 1234</span>
-</span><span id="Hive.Parser-336"><a href="#Hive.Parser-336"><span class="linenos">336</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</span>
-</span><span id="Hive.Parser-337"><a href="#Hive.Parser-337"><span class="linenos">337</span></a>
-</span><span id="Hive.Parser-338"><a href="#Hive.Parser-338"><span class="linenos">338</span></a><span class="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
-</span><span id="Hive.Parser-339"><a href="#Hive.Parser-339"><span class="linenos">339</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</span>
-</span><span id="Hive.Parser-340"><a href="#Hive.Parser-340"><span class="linenos">340</span></a>
-</span><span id="Hive.Parser-341"><a href="#Hive.Parser-341"><span class="linenos">341</span></a><span class="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
-</span><span id="Hive.Parser-342"><a href="#Hive.Parser-342"><span class="linenos">342</span></a><span class="sd"> &quot;&quot;&quot;</span>
-</span><span id="Hive.Parser-343"><a href="#Hive.Parser-343"><span class="linenos">343</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 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><span id="Hive.Parser-344"><a href="#Hive.Parser-344"><span class="linenos">344</span></a>
-</span><span id="Hive.Parser-345"><a href="#Hive.Parser-345"><span class="linenos">345</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</span><span class="p">:</span>
-</span><span id="Hive.Parser-346"><a href="#Hive.Parser-346"><span class="linenos">346</span></a> <span class="k">return</span> <span class="n">this</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span>
-</span><span id="Hive.Parser-347"><a href="#Hive.Parser-347"><span class="linenos">347</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
-</span><span id="Hive.Parser-348"><a href="#Hive.Parser-348"><span class="linenos">348</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
-</span><span id="Hive.Parser-349"><a href="#Hive.Parser-349"><span class="linenos">349</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
-</span><span id="Hive.Parser-350"><a href="#Hive.Parser-350"><span class="linenos">350</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="Hive.Parser-351"><a href="#Hive.Parser-351"><span class="linenos">351</span></a> <span class="p">)</span>
-</span><span id="Hive.Parser-352"><a href="#Hive.Parser-352"><span class="linenos">352</span></a>
-</span><span id="Hive.Parser-353"><a href="#Hive.Parser-353"><span class="linenos">353</span></a> <span class="k">return</span> <span class="n">this</span>
+</span><span id="Hive.Parser-303"><a href="#Hive.Parser-303"><span class="linenos">303</span></a> <span class="n">command_script</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive.Parser-304"><a href="#Hive.Parser-304"><span class="linenos">304</span></a>
+</span><span id="Hive.Parser-305"><a href="#Hive.Parser-305"><span class="linenos">305</span></a> <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">ALIAS</span><span class="p">)</span>
+</span><span id="Hive.Parser-306"><a href="#Hive.Parser-306"><span class="linenos">306</span></a> <span class="n">schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_schema</span><span class="p">()</span>
+</span><span id="Hive.Parser-307"><a href="#Hive.Parser-307"><span class="linenos">307</span></a>
+</span><span id="Hive.Parser-308"><a href="#Hive.Parser-308"><span class="linenos">308</span></a> <span class="n">row_format_after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_row_format</span><span class="p">(</span><span class="n">match_row</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Hive.Parser-309"><a href="#Hive.Parser-309"><span class="linenos">309</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="Hive.Parser-310"><a href="#Hive.Parser-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_text_seq</span><span class="p">(</span><span class="s2">&quot;RECORDREADER&quot;</span><span class="p">):</span>
+</span><span id="Hive.Parser-311"><a href="#Hive.Parser-311"><span class="linenos">311</span></a> <span class="n">record_reader</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_string</span><span class="p">()</span>
+</span><span id="Hive.Parser-312"><a href="#Hive.Parser-312"><span class="linenos">312</span></a>
+</span><span id="Hive.Parser-313"><a href="#Hive.Parser-313"><span class="linenos">313</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><span id="Hive.Parser-314"><a href="#Hive.Parser-314"><span class="linenos">314</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">QueryTransform</span><span class="p">,</span>
+</span><span id="Hive.Parser-315"><a href="#Hive.Parser-315"><span class="linenos">315</span></a> <span class="n">expressions</span><span class="o">=</span><span class="n">args</span><span class="p">,</span>
+</span><span id="Hive.Parser-316"><a href="#Hive.Parser-316"><span class="linenos">316</span></a> <span class="n">command_script</span><span class="o">=</span><span class="n">command_script</span><span class="p">,</span>
+</span><span id="Hive.Parser-317"><a href="#Hive.Parser-317"><span class="linenos">317</span></a> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">,</span>
+</span><span id="Hive.Parser-318"><a href="#Hive.Parser-318"><span class="linenos">318</span></a> <span class="n">row_format_before</span><span class="o">=</span><span class="n">row_format_before</span><span class="p">,</span>
+</span><span id="Hive.Parser-319"><a href="#Hive.Parser-319"><span class="linenos">319</span></a> <span class="n">record_writer</span><span class="o">=</span><span class="n">record_writer</span><span class="p">,</span>
+</span><span id="Hive.Parser-320"><a href="#Hive.Parser-320"><span class="linenos">320</span></a> <span class="n">row_format_after</span><span class="o">=</span><span class="n">row_format_after</span><span class="p">,</span>
+</span><span id="Hive.Parser-321"><a href="#Hive.Parser-321"><span class="linenos">321</span></a> <span class="n">record_reader</span><span class="o">=</span><span class="n">record_reader</span><span class="p">,</span>
+</span><span id="Hive.Parser-322"><a href="#Hive.Parser-322"><span class="linenos">322</span></a> <span class="p">)</span>
+</span><span id="Hive.Parser-323"><a href="#Hive.Parser-323"><span class="linenos">323</span></a>
+</span><span id="Hive.Parser-324"><a href="#Hive.Parser-324"><span class="linenos">324</span></a> <span class="k">def</span> <span class="nf">_parse_types</span><span class="p">(</span>
+</span><span id="Hive.Parser-325"><a href="#Hive.Parser-325"><span class="linenos">325</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><span id="Hive.Parser-326"><a href="#Hive.Parser-326"><span class="linenos">326</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="Hive.Parser-327"><a href="#Hive.Parser-327"><span class="linenos">327</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="Hive.Parser-328"><a href="#Hive.Parser-328"><span class="linenos">328</span></a><span class="sd"> Spark (and most likely Hive) treats casts to CHAR(length) and VARCHAR(length) as casts to</span>
+</span><span id="Hive.Parser-329"><a href="#Hive.Parser-329"><span class="linenos">329</span></a><span class="sd"> STRING in all contexts except for schema definitions. For example, this is in Spark v3.4.0:</span>
+</span><span id="Hive.Parser-330"><a href="#Hive.Parser-330"><span class="linenos">330</span></a>
+</span><span id="Hive.Parser-331"><a href="#Hive.Parser-331"><span class="linenos">331</span></a><span class="sd"> spark-sql (default)&gt; select cast(1234 as varchar(2));</span>
+</span><span id="Hive.Parser-332"><a href="#Hive.Parser-332"><span class="linenos">332</span></a><span class="sd"> 23/06/06 15:51:18 WARN CharVarcharUtils: The Spark cast operator does not support</span>
+</span><span id="Hive.Parser-333"><a href="#Hive.Parser-333"><span class="linenos">333</span></a><span class="sd"> char/varchar type and simply treats them as string type. Please use string type</span>
+</span><span id="Hive.Parser-334"><a href="#Hive.Parser-334"><span class="linenos">334</span></a><span class="sd"> directly to avoid confusion. Otherwise, you can set spark.sql.legacy.charVarcharAsString</span>
+</span><span id="Hive.Parser-335"><a href="#Hive.Parser-335"><span class="linenos">335</span></a><span class="sd"> to true, so that Spark treat them as string type as same as Spark 3.0 and earlier</span>
+</span><span id="Hive.Parser-336"><a href="#Hive.Parser-336"><span class="linenos">336</span></a>
+</span><span id="Hive.Parser-337"><a href="#Hive.Parser-337"><span class="linenos">337</span></a><span class="sd"> 1234</span>
+</span><span id="Hive.Parser-338"><a href="#Hive.Parser-338"><span class="linenos">338</span></a><span class="sd"> Time taken: 4.265 seconds, Fetched 1 row(s)</span>
+</span><span id="Hive.Parser-339"><a href="#Hive.Parser-339"><span class="linenos">339</span></a>
+</span><span id="Hive.Parser-340"><a href="#Hive.Parser-340"><span class="linenos">340</span></a><span class="sd"> This shows that Spark doesn&#39;t truncate the value into &#39;12&#39;, which is inconsistent with</span>
+</span><span id="Hive.Parser-341"><a href="#Hive.Parser-341"><span class="linenos">341</span></a><span class="sd"> what other dialects (e.g. postgres) do, so we need to drop the length to transpile correctly.</span>
+</span><span id="Hive.Parser-342"><a href="#Hive.Parser-342"><span class="linenos">342</span></a>
+</span><span id="Hive.Parser-343"><a href="#Hive.Parser-343"><span class="linenos">343</span></a><span class="sd"> Reference: https://spark.apache.org/docs/latest/sql-ref-datatypes.html</span>
+</span><span id="Hive.Parser-344"><a href="#Hive.Parser-344"><span class="linenos">344</span></a><span class="sd"> &quot;&quot;&quot;</span>
+</span><span id="Hive.Parser-345"><a href="#Hive.Parser-345"><span class="linenos">345</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 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><span id="Hive.Parser-346"><a href="#Hive.Parser-346"><span class="linenos">346</span></a>
+</span><span id="Hive.Parser-347"><a href="#Hive.Parser-347"><span class="linenos">347</span></a> <span class="k">if</span> <span class="n">this</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">schema</span><span class="p">:</span>
+</span><span id="Hive.Parser-348"><a href="#Hive.Parser-348"><span class="linenos">348</span></a> <span class="k">return</span> <span class="n">this</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span>
+</span><span id="Hive.Parser-349"><a href="#Hive.Parser-349"><span class="linenos">349</span></a> <span class="k">lambda</span> <span class="n">node</span><span class="p">:</span> <span class="n">node</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">DataType</span><span class="o">.</span><span class="n">build</span><span class="p">(</span><span class="s2">&quot;text&quot;</span><span class="p">))</span>
+</span><span id="Hive.Parser-350"><a href="#Hive.Parser-350"><span class="linenos">350</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="ow">and</span> <span class="n">node</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;char&quot;</span><span class="p">,</span> <span class="s2">&quot;varchar&quot;</span><span class="p">)</span>
+</span><span id="Hive.Parser-351"><a href="#Hive.Parser-351"><span class="linenos">351</span></a> <span class="k">else</span> <span class="n">node</span><span class="p">,</span>
+</span><span id="Hive.Parser-352"><a href="#Hive.Parser-352"><span class="linenos">352</span></a> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="Hive.Parser-353"><a href="#Hive.Parser-353"><span class="linenos">353</span></a> <span class="p">)</span>
+</span><span id="Hive.Parser-354"><a href="#Hive.Parser-354"><span class="linenos">354</span></a>
+</span><span id="Hive.Parser-355"><a href="#Hive.Parser-355"><span class="linenos">355</span></a> <span class="k">return</span> <span class="n">this</span>
</span></pre></div>
@@ -1857,15 +1863,15 @@ Default: 3</li>
</div>
- <div id="Hive.Parser.FUNCTION_PARSERS" class="classattr">
+ <div id="Hive.Parser.NO_PAREN_FUNCTION_PARSERS" class="classattr">
<div class="attr variable">
- <span class="name">FUNCTION_PARSERS</span> =
-<input id="Hive.Parser.FUNCTION_PARSERS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Hive.Parser.FUNCTION_PARSERS-view-value"></label><span class="default_value">{&#39;ANY_VALUE&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONCAT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;DECODE&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;EXTRACT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;JSON_OBJECT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;LOG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;MATCH&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;OPENJSON&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;POSITION&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SAFE_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;STRING_AGG&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;SUBSTRING&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRIM&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CAST&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRY_CONVERT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRANSFORM&#39;: &lt;function <a href="#Hive.Parser">Hive.Parser</a>.&lt;lambda&gt;&gt;}</span>
+ <span class="name">NO_PAREN_FUNCTION_PARSERS</span> =
+<input id="Hive.Parser.NO_PAREN_FUNCTION_PARSERS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+ <label class="view-value-button pdoc-button" for="Hive.Parser.NO_PAREN_FUNCTION_PARSERS-view-value"></label><span class="default_value">{&#39;ANY&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;CASE&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;IF&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;NEXT&#39;: &lt;function Parser.&lt;lambda&gt;&gt;, &#39;TRANSFORM&#39;: &lt;function <a href="#Hive.Parser">Hive.Parser</a>.&lt;lambda&gt;&gt;}</span>
</div>
- <a class="headerlink" href="#Hive.Parser.FUNCTION_PARSERS"></a>
+ <a class="headerlink" href="#Hive.Parser.NO_PAREN_FUNCTION_PARSERS"></a>
@@ -2001,8 +2007,8 @@ Default: 3</li>
<dd id="Hive.Parser.CONSTRAINT_PARSERS" class="variable"><a href="../parser.html#Parser.CONSTRAINT_PARSERS">CONSTRAINT_PARSERS</a></dd>
<dd id="Hive.Parser.ALTER_PARSERS" class="variable"><a href="../parser.html#Parser.ALTER_PARSERS">ALTER_PARSERS</a></dd>
<dd id="Hive.Parser.SCHEMA_UNNAMED_CONSTRAINTS" class="variable"><a href="../parser.html#Parser.SCHEMA_UNNAMED_CONSTRAINTS">SCHEMA_UNNAMED_CONSTRAINTS</a></dd>
- <dd id="Hive.Parser.NO_PAREN_FUNCTION_PARSERS" class="variable"><a href="../parser.html#Parser.NO_PAREN_FUNCTION_PARSERS">NO_PAREN_FUNCTION_PARSERS</a></dd>
<dd id="Hive.Parser.FUNCTIONS_WITH_ALIASED_ARGS" class="variable"><a href="../parser.html#Parser.FUNCTIONS_WITH_ALIASED_ARGS">FUNCTIONS_WITH_ALIASED_ARGS</a></dd>
+ <dd id="Hive.Parser.FUNCTION_PARSERS" class="variable"><a href="../parser.html#Parser.FUNCTION_PARSERS">FUNCTION_PARSERS</a></dd>
<dd id="Hive.Parser.QUERY_MODIFIER_PARSERS" class="variable"><a href="../parser.html#Parser.QUERY_MODIFIER_PARSERS">QUERY_MODIFIER_PARSERS</a></dd>
<dd id="Hive.Parser.SET_PARSERS" class="variable"><a href="../parser.html#Parser.SET_PARSERS">SET_PARSERS</a></dd>
<dd id="Hive.Parser.SHOW_PARSERS" class="variable"><a href="../parser.html#Parser.SHOW_PARSERS">SHOW_PARSERS</a></dd>
@@ -2057,141 +2063,141 @@ Default: 3</li>
</div>
<a class="headerlink" href="#Hive.Generator"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator-355"><a href="#Hive.Generator-355"><span class="linenos">355</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="Hive.Generator-356"><a href="#Hive.Generator-356"><span class="linenos">356</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
-</span><span id="Hive.Generator-357"><a href="#Hive.Generator-357"><span class="linenos">357</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive.Generator-358"><a href="#Hive.Generator-358"><span class="linenos">358</span></a> <span class="n">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</span>
-</span><span id="Hive.Generator-359"><a href="#Hive.Generator-359"><span class="linenos">359</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive.Generator-360"><a href="#Hive.Generator-360"><span class="linenos">360</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive.Generator-361"><a href="#Hive.Generator-361"><span class="linenos">361</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive.Generator-362"><a href="#Hive.Generator-362"><span class="linenos">362</span></a> <span class="n">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
-</span><span id="Hive.Generator-363"><a href="#Hive.Generator-363"><span class="linenos">363</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Hive.Generator-364"><a href="#Hive.Generator-364"><span class="linenos">364</span></a>
-</span><span id="Hive.Generator-365"><a href="#Hive.Generator-365"><span class="linenos">365</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive.Generator-366"><a href="#Hive.Generator-366"><span class="linenos">366</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="Hive.Generator-367"><a href="#Hive.Generator-367"><span class="linenos">367</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-368"><a href="#Hive.Generator-368"><span class="linenos">368</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-369"><a href="#Hive.Generator-369"><span class="linenos">369</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-370"><a href="#Hive.Generator-370"><span class="linenos">370</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">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-371"><a href="#Hive.Generator-371"><span class="linenos">371</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">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-372"><a href="#Hive.Generator-372"><span class="linenos">372</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;BINARY&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-373"><a href="#Hive.Generator-373"><span class="linenos">373</span></a> <span class="p">}</span>
-</span><span id="Hive.Generator-374"><a href="#Hive.Generator-374"><span class="linenos">374</span></a>
-</span><span id="Hive.Generator-375"><a href="#Hive.Generator-375"><span class="linenos">375</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive.Generator-376"><a href="#Hive.Generator-376"><span class="linenos">376</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="Hive.Generator-377"><a href="#Hive.Generator-377"><span class="linenos">377</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</span><span class="p">]),</span>
-</span><span id="Hive.Generator-378"><a href="#Hive.Generator-378"><span class="linenos">378</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
-</span><span id="Hive.Generator-379"><a href="#Hive.Generator-379"><span class="linenos">379</span></a> <span class="p">[</span>
-</span><span id="Hive.Generator-380"><a href="#Hive.Generator-380"><span class="linenos">380</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span>
-</span><span id="Hive.Generator-381"><a href="#Hive.Generator-381"><span class="linenos">381</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
-</span><span id="Hive.Generator-382"><a href="#Hive.Generator-382"><span class="linenos">382</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
-</span><span id="Hive.Generator-383"><a href="#Hive.Generator-383"><span class="linenos">383</span></a> <span class="p">]</span>
-</span><span id="Hive.Generator-384"><a href="#Hive.Generator-384"><span class="linenos">384</span></a> <span class="p">),</span>
-</span><span id="Hive.Generator-385"><a href="#Hive.Generator-385"><span class="linenos">385</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Property</span><span class="p">:</span> <span class="n">_property_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-386"><a href="#Hive.Generator-386"><span class="linenos">386</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="Hive.Generator-387"><a href="#Hive.Generator-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-388"><a href="#Hive.Generator-388"><span class="linenos">388</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayJoin</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;CONCAT_WS&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 class="p">),</span>
-</span><span id="Hive.Generator-389"><a href="#Hive.Generator-389"><span class="linenos">389</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;SIZE&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-390"><a href="#Hive.Generator-390"><span class="linenos">390</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="Hive.Generator-391"><a href="#Hive.Generator-391"><span class="linenos">391</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-392"><a href="#Hive.Generator-392"><span class="linenos">392</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-393"><a href="#Hive.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="n">_date_diff_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-394"><a href="#Hive.Generator-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-395"><a href="#Hive.Generator-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-396"><a href="#Hive.Generator-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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(DATE_FORMAT(</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">Hive</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="Hive.Generator-397"><a href="#Hive.Generator-397"><span class="linenos">397</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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-398"><a href="#Hive.Generator-398"><span class="linenos">398</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-399"><a href="#Hive.Generator-399"><span class="linenos">399</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-400"><a href="#Hive.Generator-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-401"><a href="#Hive.Generator-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-402"><a href="#Hive.Generator-402"><span class="linenos">402</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="Hive.Generator-403"><a href="#Hive.Generator-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-404"><a href="#Hive.Generator-404"><span class="linenos">404</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-405"><a href="#Hive.Generator-405"><span class="linenos">405</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="Hive.Generator-406"><a href="#Hive.Generator-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Left</span><span class="p">:</span> <span class="n">left_to_substring_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-407"><a href="#Hive.Generator-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-408"><a href="#Hive.Generator-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
-</span><span id="Hive.Generator-409"><a href="#Hive.Generator-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MD5Digest</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;UNHEX&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;MD5&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><span id="Hive.Generator-410"><a href="#Hive.Generator-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
-</span><span id="Hive.Generator-411"><a href="#Hive.Generator-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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">),</span>
-</span><span id="Hive.Generator-412"><a href="#Hive.Generator-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-413"><a href="#Hive.Generator-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-414"><a href="#Hive.Generator-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-415"><a href="#Hive.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-416"><a href="#Hive.Generator-416"><span class="linenos">416</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="Hive.Generator-417"><a href="#Hive.Generator-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-418"><a href="#Hive.Generator-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</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;RLIKE&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-419"><a href="#Hive.Generator-419"><span class="linenos">419</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;SPLIT&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-420"><a href="#Hive.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-421"><a href="#Hive.Generator-421"><span class="linenos">421</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="Hive.Generator-422"><a href="#Hive.Generator-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Hive.Generator-423"><a href="#Hive.Generator-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-424"><a href="#Hive.Generator-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-425"><a href="#Hive.Generator-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-426"><a href="#Hive.Generator-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-427"><a href="#Hive.Generator-427"><span class="linenos">427</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="Hive.Generator-428"><a href="#Hive.Generator-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-429"><a href="#Hive.Generator-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-430"><a href="#Hive.Generator-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-431"><a href="#Hive.Generator-431"><span class="linenos">431</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="Hive.Generator-432"><a href="#Hive.Generator-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-433"><a href="#Hive.Generator-433"><span class="linenos">433</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</span><span class="p">,</span>
-</span><span id="Hive.Generator-434"><a href="#Hive.Generator-434"><span class="linenos">434</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;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-435"><a href="#Hive.Generator-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-436"><a href="#Hive.Generator-436"><span class="linenos">436</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 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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-437"><a href="#Hive.Generator-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-438"><a href="#Hive.Generator-438"><span class="linenos">438</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-439"><a href="#Hive.Generator-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</span><span class="p">,</span>
-</span><span id="Hive.Generator-440"><a href="#Hive.Generator-440"><span class="linenos">440</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="Hive.Generator-441"><a href="#Hive.Generator-441"><span class="linenos">441</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
-</span><span id="Hive.Generator-442"><a href="#Hive.Generator-442"><span class="linenos">442</span></a> <span class="p">),</span>
-</span><span id="Hive.Generator-443"><a href="#Hive.Generator-443"><span class="linenos">443</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-444"><a href="#Hive.Generator-444"><span class="linenos">444</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-445"><a href="#Hive.Generator-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-446"><a href="#Hive.Generator-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-447"><a href="#Hive.Generator-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-448"><a href="#Hive.Generator-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-449"><a href="#Hive.Generator-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
-</span><span id="Hive.Generator-450"><a href="#Hive.Generator-450"><span class="linenos">450</span></a> <span class="p">}</span>
-</span><span id="Hive.Generator-451"><a href="#Hive.Generator-451"><span class="linenos">451</span></a>
-</span><span id="Hive.Generator-452"><a href="#Hive.Generator-452"><span class="linenos">452</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Hive.Generator-453"><a href="#Hive.Generator-453"><span class="linenos">453</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">PROPERTIES_LOCATION</span><span class="p">,</span>
-</span><span id="Hive.Generator-454"><a href="#Hive.Generator-454"><span class="linenos">454</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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">POST_SCHEMA</span><span class="p">,</span>
-</span><span id="Hive.Generator-455"><a href="#Hive.Generator-455"><span class="linenos">455</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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">POST_SCHEMA</span><span class="p">,</span>
-</span><span id="Hive.Generator-456"><a href="#Hive.Generator-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VolatileProperty</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 class="p">,</span>
-</span><span id="Hive.Generator-457"><a href="#Hive.Generator-457"><span class="linenos">457</span></a> <span class="p">}</span>
-</span><span id="Hive.Generator-458"><a href="#Hive.Generator-458"><span class="linenos">458</span></a>
-</span><span id="Hive.Generator-459"><a href="#Hive.Generator-459"><span class="linenos">459</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator-460"><a href="#Hive.Generator-460"><span class="linenos">460</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator-461"><a href="#Hive.Generator-461"><span class="linenos">461</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Hive.Generator-462"><a href="#Hive.Generator-462"><span class="linenos">462</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Hive.Generator-463"><a href="#Hive.Generator-463"><span class="linenos">463</span></a>
-</span><span id="Hive.Generator-464"><a href="#Hive.Generator-464"><span class="linenos">464</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator-465"><a href="#Hive.Generator-465"><span class="linenos">465</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><span id="Hive.Generator-466"><a href="#Hive.Generator-466"><span class="linenos">466</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator-467"><a href="#Hive.Generator-467"><span class="linenos">467</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="Hive.Generator-468"><a href="#Hive.Generator-468"><span class="linenos">468</span></a> <span class="p">)</span>
-</span><span id="Hive.Generator-469"><a href="#Hive.Generator-469"><span class="linenos">469</span></a>
-</span><span id="Hive.Generator-470"><a href="#Hive.Generator-470"><span class="linenos">470</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator-471"><a href="#Hive.Generator-471"><span class="linenos">471</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
-</span><span id="Hive.Generator-472"><a href="#Hive.Generator-472"><span class="linenos">472</span></a>
-</span><span id="Hive.Generator-473"><a href="#Hive.Generator-473"><span class="linenos">473</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator-474"><a href="#Hive.Generator-474"><span class="linenos">474</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="Hive.Generator-475"><a href="#Hive.Generator-475"><span class="linenos">475</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
-</span><span id="Hive.Generator-476"><a href="#Hive.Generator-476"><span class="linenos">476</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="Hive.Generator-477"><a href="#Hive.Generator-477"><span class="linenos">477</span></a> <span class="p">):</span>
-</span><span id="Hive.Generator-478"><a href="#Hive.Generator-478"><span class="linenos">478</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator-479"><a href="#Hive.Generator-479"><span class="linenos">479</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
-</span><span id="Hive.Generator-480"><a href="#Hive.Generator-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="Hive.Generator-481"><a href="#Hive.Generator-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
-</span><span id="Hive.Generator-482"><a href="#Hive.Generator-482"><span class="linenos">482</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
-</span><span id="Hive.Generator-483"><a href="#Hive.Generator-483"><span class="linenos">483</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
-</span><span id="Hive.Generator-484"><a href="#Hive.Generator-484"><span class="linenos">484</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
-</span><span id="Hive.Generator-485"><a href="#Hive.Generator-485"><span class="linenos">485</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
-</span><span id="Hive.Generator-486"><a href="#Hive.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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator-487"><a href="#Hive.Generator-487"><span class="linenos">487</span></a> <span class="p">)</span>
-</span><span id="Hive.Generator-488"><a href="#Hive.Generator-488"><span class="linenos">488</span></a>
-</span><span id="Hive.Generator-489"><a href="#Hive.Generator-489"><span class="linenos">489</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_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="Hive.Generator-357"><a href="#Hive.Generator-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="Hive.Generator-358"><a href="#Hive.Generator-358"><span class="linenos">358</span></a> <span class="n">LIMIT_FETCH</span> <span class="o">=</span> <span class="s2">&quot;LIMIT&quot;</span>
+</span><span id="Hive.Generator-359"><a href="#Hive.Generator-359"><span class="linenos">359</span></a> <span class="n">TABLESAMPLE_WITH_METHOD</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Hive.Generator-360"><a href="#Hive.Generator-360"><span class="linenos">360</span></a> <span class="n">TABLESAMPLE_SIZE_IS_PERCENT</span> <span class="o">=</span> <span class="kc">True</span>
+</span><span id="Hive.Generator-361"><a href="#Hive.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="Hive.Generator-362"><a href="#Hive.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="Hive.Generator-363"><a href="#Hive.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="Hive.Generator-364"><a href="#Hive.Generator-364"><span class="linenos">364</span></a> <span class="n">INDEX_ON</span> <span class="o">=</span> <span class="s2">&quot;ON TABLE&quot;</span>
+</span><span id="Hive.Generator-365"><a href="#Hive.Generator-365"><span class="linenos">365</span></a> <span class="n">EXTRACT_ALLOWS_QUOTES</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Hive.Generator-366"><a href="#Hive.Generator-366"><span class="linenos">366</span></a>
+</span><span id="Hive.Generator-367"><a href="#Hive.Generator-367"><span class="linenos">367</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive.Generator-368"><a href="#Hive.Generator-368"><span class="linenos">368</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="Hive.Generator-369"><a href="#Hive.Generator-369"><span class="linenos">369</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">BIT</span><span class="p">:</span> <span class="s2">&quot;BOOLEAN&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-370"><a href="#Hive.Generator-370"><span class="linenos">370</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">DATETIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-371"><a href="#Hive.Generator-371"><span class="linenos">371</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">TEXT</span><span class="p">:</span> <span class="s2">&quot;STRING&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-372"><a href="#Hive.Generator-372"><span class="linenos">372</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">TIME</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-373"><a href="#Hive.Generator-373"><span class="linenos">373</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">TIMESTAMPTZ</span><span class="p">:</span> <span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-374"><a href="#Hive.Generator-374"><span class="linenos">374</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;BINARY&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-375"><a href="#Hive.Generator-375"><span class="linenos">375</span></a> <span class="p">}</span>
+</span><span id="Hive.Generator-376"><a href="#Hive.Generator-376"><span class="linenos">376</span></a>
+</span><span id="Hive.Generator-377"><a href="#Hive.Generator-377"><span class="linenos">377</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive.Generator-378"><a href="#Hive.Generator-378"><span class="linenos">378</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="Hive.Generator-379"><a href="#Hive.Generator-379"><span class="linenos">379</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Group</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">unalias_group</span><span class="p">]),</span>
+</span><span id="Hive.Generator-380"><a href="#Hive.Generator-380"><span class="linenos">380</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Select</span><span class="p">:</span> <span class="n">transforms</span><span class="o">.</span><span class="n">preprocess</span><span class="p">(</span>
+</span><span id="Hive.Generator-381"><a href="#Hive.Generator-381"><span class="linenos">381</span></a> <span class="p">[</span>
+</span><span id="Hive.Generator-382"><a href="#Hive.Generator-382"><span class="linenos">382</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span>
+</span><span id="Hive.Generator-383"><a href="#Hive.Generator-383"><span class="linenos">383</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">,</span>
+</span><span id="Hive.Generator-384"><a href="#Hive.Generator-384"><span class="linenos">384</span></a> <span class="n">transforms</span><span class="o">.</span><span class="n">unnest_to_explode</span><span class="p">,</span>
+</span><span id="Hive.Generator-385"><a href="#Hive.Generator-385"><span class="linenos">385</span></a> <span class="p">]</span>
+</span><span id="Hive.Generator-386"><a href="#Hive.Generator-386"><span class="linenos">386</span></a> <span class="p">),</span>
+</span><span id="Hive.Generator-387"><a href="#Hive.Generator-387"><span class="linenos">387</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Property</span><span class="p">:</span> <span class="n">_property_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-388"><a href="#Hive.Generator-388"><span class="linenos">388</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="Hive.Generator-389"><a href="#Hive.Generator-389"><span class="linenos">389</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;CONCAT&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-390"><a href="#Hive.Generator-390"><span class="linenos">390</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayJoin</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;CONCAT_WS&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 class="p">),</span>
+</span><span id="Hive.Generator-391"><a href="#Hive.Generator-391"><span class="linenos">391</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;SIZE&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-392"><a href="#Hive.Generator-392"><span class="linenos">392</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="Hive.Generator-393"><a href="#Hive.Generator-393"><span class="linenos">393</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-394"><a href="#Hive.Generator-394"><span class="linenos">394</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-395"><a href="#Hive.Generator-395"><span class="linenos">395</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-396"><a href="#Hive.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">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-397"><a href="#Hive.Generator-397"><span class="linenos">397</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-398"><a href="#Hive.Generator-398"><span class="linenos">398</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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(DATE_FORMAT(</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">Hive</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="Hive.Generator-399"><a href="#Hive.Generator-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 class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;TO_DATE(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 STRING), </span><span class="si">{</span><span class="n">Hive</span><span class="o">.</span><span class="n">DATEINT_FORMAT</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-400"><a href="#Hive.Generator-400"><span class="linenos">400</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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;STORED AS </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="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">isinstance</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="w"> </span><span class="n">exp</span><span class="o">.</span><span class="n">InputOutputFormat</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-401"><a href="#Hive.Generator-401"><span class="linenos">401</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNBASE64&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-402"><a href="#Hive.Generator-402"><span class="linenos">402</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-403"><a href="#Hive.Generator-403"><span class="linenos">403</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-404"><a href="#Hive.Generator-404"><span class="linenos">404</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="Hive.Generator-405"><a href="#Hive.Generator-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-406"><a href="#Hive.Generator-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;GET_JSON_OBJECT&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-407"><a href="#Hive.Generator-407"><span class="linenos">407</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="Hive.Generator-408"><a href="#Hive.Generator-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Left</span><span class="p">:</span> <span class="n">left_to_substring_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-409"><a href="#Hive.Generator-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Map</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-410"><a href="#Hive.Generator-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
+</span><span id="Hive.Generator-411"><a href="#Hive.Generator-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">MD5Digest</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;UNHEX&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;MD5&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><span id="Hive.Generator-412"><a href="#Hive.Generator-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
+</span><span id="Hive.Generator-413"><a href="#Hive.Generator-413"><span class="linenos">413</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 class="s2">&quot;MONTHS_BETWEEN&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="n">e</span><span class="o">.</span><span class="n">expression</span><span class="p">),</span>
+</span><span id="Hive.Generator-414"><a href="#Hive.Generator-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VarMap</span><span class="p">:</span> <span class="n">var_map_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-415"><a href="#Hive.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">create_with_partitions_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-416"><a href="#Hive.Generator-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Quantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-417"><a href="#Hive.Generator-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxQuantile</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;PERCENTILE_APPROX&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-418"><a href="#Hive.Generator-418"><span class="linenos">418</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="Hive.Generator-419"><a href="#Hive.Generator-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpReplace</span><span class="p">:</span> <span class="n">regexp_replace_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-420"><a href="#Hive.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">RegexpLike</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;RLIKE&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-421"><a href="#Hive.Generator-421"><span class="linenos">421</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;SPLIT&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-422"><a href="#Hive.Generator-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Right</span><span class="p">:</span> <span class="n">right_to_substring_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-423"><a href="#Hive.Generator-423"><span class="linenos">423</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="Hive.Generator-424"><a href="#Hive.Generator-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SchemaCommentProperty</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">naked_property</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Hive.Generator-425"><a href="#Hive.Generator-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SetAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;COLLECT_SET&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-426"><a href="#Hive.Generator-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Split</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;SPLIT(</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">, CONCAT(&#39;</span><span class="se">\\\\</span><span class="s2">Q&#39;, </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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">))&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-427"><a href="#Hive.Generator-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrPosition</span><span class="p">:</span> <span class="n">strposition_to_locate_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-428"><a href="#Hive.Generator-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="n">_str_to_date_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-429"><a href="#Hive.Generator-429"><span class="linenos">429</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="Hive.Generator-430"><a href="#Hive.Generator-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToUnix</span><span class="p">:</span> <span class="n">_str_to_unix_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-431"><a href="#Hive.Generator-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StructExtract</span><span class="p">:</span> <span class="n">struct_extract_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-432"><a href="#Hive.Generator-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToDate</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;TO_DATE&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-433"><a href="#Hive.Generator-433"><span class="linenos">433</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="Hive.Generator-434"><a href="#Hive.Generator-434"><span class="linenos">434</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeStrToUnix</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-435"><a href="#Hive.Generator-435"><span class="linenos">435</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="n">_time_to_str</span><span class="p">,</span>
+</span><span id="Hive.Generator-436"><a href="#Hive.Generator-436"><span class="linenos">436</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;UNIX_TIMESTAMP&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-437"><a href="#Hive.Generator-437"><span class="linenos">437</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;BASE64&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-438"><a href="#Hive.Generator-438"><span class="linenos">438</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 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 STRING), &#39;-&#39;, &#39;&#39;), 1, 8) AS INT)&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-439"><a href="#Hive.Generator-439"><span class="linenos">439</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</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;DATE_ADD(</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="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;expression&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-440"><a href="#Hive.Generator-440"><span class="linenos">440</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsToDate</span><span class="p">:</span> <span class="n">_to_date_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-441"><a href="#Hive.Generator-441"><span class="linenos">441</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">:</span> <span class="n">no_trycast_sql</span><span class="p">,</span>
+</span><span id="Hive.Generator-442"><a href="#Hive.Generator-442"><span class="linenos">442</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="Hive.Generator-443"><a href="#Hive.Generator-443"><span class="linenos">443</span></a> <span class="s2">&quot;FROM_UNIXTIME&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="n">_time_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+</span><span id="Hive.Generator-444"><a href="#Hive.Generator-444"><span class="linenos">444</span></a> <span class="p">),</span>
+</span><span id="Hive.Generator-445"><a href="#Hive.Generator-445"><span class="linenos">445</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-446"><a href="#Hive.Generator-446"><span class="linenos">446</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTimeStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FROM_UNIXTIME&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-447"><a href="#Hive.Generator-447"><span class="linenos">447</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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;PARTITIONED BY </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">&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-448"><a href="#Hive.Generator-448"><span class="linenos">448</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</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">properties</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;WITH SERDEPROPERTIES&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-449"><a href="#Hive.Generator-449"><span class="linenos">449</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NumberToStr</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;FORMAT_NUMBER&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-450"><a href="#Hive.Generator-450"><span class="linenos">450</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">LastDateOfMonth</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">&quot;LAST_DAY&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-451"><a href="#Hive.Generator-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">National</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">national_sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">),</span>
+</span><span id="Hive.Generator-452"><a href="#Hive.Generator-452"><span class="linenos">452</span></a> <span class="p">}</span>
+</span><span id="Hive.Generator-453"><a href="#Hive.Generator-453"><span class="linenos">453</span></a>
+</span><span id="Hive.Generator-454"><a href="#Hive.Generator-454"><span class="linenos">454</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Hive.Generator-455"><a href="#Hive.Generator-455"><span class="linenos">455</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">PROPERTIES_LOCATION</span><span class="p">,</span>
+</span><span id="Hive.Generator-456"><a href="#Hive.Generator-456"><span class="linenos">456</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</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">POST_SCHEMA</span><span class="p">,</span>
+</span><span id="Hive.Generator-457"><a href="#Hive.Generator-457"><span class="linenos">457</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</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">POST_SCHEMA</span><span class="p">,</span>
+</span><span id="Hive.Generator-458"><a href="#Hive.Generator-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">VolatileProperty</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 class="p">,</span>
+</span><span id="Hive.Generator-459"><a href="#Hive.Generator-459"><span class="linenos">459</span></a> <span class="p">}</span>
+</span><span id="Hive.Generator-460"><a href="#Hive.Generator-460"><span class="linenos">460</span></a>
+</span><span id="Hive.Generator-461"><a href="#Hive.Generator-461"><span class="linenos">461</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator-462"><a href="#Hive.Generator-462"><span class="linenos">462</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator-463"><a href="#Hive.Generator-463"><span class="linenos">463</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Hive.Generator-464"><a href="#Hive.Generator-464"><span class="linenos">464</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Hive.Generator-465"><a href="#Hive.Generator-465"><span class="linenos">465</span></a>
+</span><span id="Hive.Generator-466"><a href="#Hive.Generator-466"><span class="linenos">466</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator-467"><a href="#Hive.Generator-467"><span class="linenos">467</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><span id="Hive.Generator-468"><a href="#Hive.Generator-468"><span class="linenos">468</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator-469"><a href="#Hive.Generator-469"><span class="linenos">469</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="Hive.Generator-470"><a href="#Hive.Generator-470"><span class="linenos">470</span></a> <span class="p">)</span>
+</span><span id="Hive.Generator-471"><a href="#Hive.Generator-471"><span class="linenos">471</span></a>
+</span><span id="Hive.Generator-472"><a href="#Hive.Generator-472"><span class="linenos">472</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator-473"><a href="#Hive.Generator-473"><span class="linenos">473</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
+</span><span id="Hive.Generator-474"><a href="#Hive.Generator-474"><span class="linenos">474</span></a>
+</span><span id="Hive.Generator-475"><a href="#Hive.Generator-475"><span class="linenos">475</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator-476"><a href="#Hive.Generator-476"><span class="linenos">476</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="Hive.Generator-477"><a href="#Hive.Generator-477"><span class="linenos">477</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
+</span><span id="Hive.Generator-478"><a href="#Hive.Generator-478"><span class="linenos">478</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="Hive.Generator-479"><a href="#Hive.Generator-479"><span class="linenos">479</span></a> <span class="p">):</span>
+</span><span id="Hive.Generator-480"><a href="#Hive.Generator-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator-481"><a href="#Hive.Generator-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
+</span><span id="Hive.Generator-482"><a href="#Hive.Generator-482"><span class="linenos">482</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="Hive.Generator-483"><a href="#Hive.Generator-483"><span class="linenos">483</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
+</span><span id="Hive.Generator-484"><a href="#Hive.Generator-484"><span class="linenos">484</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
+</span><span id="Hive.Generator-485"><a href="#Hive.Generator-485"><span class="linenos">485</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
+</span><span id="Hive.Generator-486"><a href="#Hive.Generator-486"><span class="linenos">486</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</span><span id="Hive.Generator-487"><a href="#Hive.Generator-487"><span class="linenos">487</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Hive.Generator-488"><a href="#Hive.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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator-489"><a href="#Hive.Generator-489"><span class="linenos">489</span></a> <span class="p">)</span>
+</span><span id="Hive.Generator-490"><a href="#Hive.Generator-490"><span class="linenos">490</span></a>
+</span><span id="Hive.Generator-491"><a href="#Hive.Generator-491"><span class="linenos">491</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>
@@ -2380,10 +2386,10 @@ Default: True</li>
</div>
<a class="headerlink" href="#Hive.Generator.rowformatserdeproperty_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.rowformatserdeproperty_sql-459"><a href="#Hive.Generator.rowformatserdeproperty_sql-459"><span class="linenos">459</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator.rowformatserdeproperty_sql-460"><a href="#Hive.Generator.rowformatserdeproperty_sql-460"><span class="linenos">460</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator.rowformatserdeproperty_sql-461"><a href="#Hive.Generator.rowformatserdeproperty_sql-461"><span class="linenos">461</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Hive.Generator.rowformatserdeproperty_sql-462"><a href="#Hive.Generator.rowformatserdeproperty_sql-462"><span class="linenos">462</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.rowformatserdeproperty_sql-461"><a href="#Hive.Generator.rowformatserdeproperty_sql-461"><span class="linenos">461</span></a> <span class="k">def</span> <span class="nf">rowformatserdeproperty_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">RowFormatSerdeProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator.rowformatserdeproperty_sql-462"><a href="#Hive.Generator.rowformatserdeproperty_sql-462"><span class="linenos">462</span></a> <span class="n">serde_props</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;serde_properties&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator.rowformatserdeproperty_sql-463"><a href="#Hive.Generator.rowformatserdeproperty_sql-463"><span class="linenos">463</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Hive.Generator.rowformatserdeproperty_sql-464"><a href="#Hive.Generator.rowformatserdeproperty_sql-464"><span class="linenos">464</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;ROW FORMAT SERDE </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">expression</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="n">serde_props</span><span class="si">}</span><span class="s2">&quot;</span>
</span></pre></div>
@@ -2401,11 +2407,11 @@ Default: True</li>
</div>
<a class="headerlink" href="#Hive.Generator.arrayagg_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.arrayagg_sql-464"><a href="#Hive.Generator.arrayagg_sql-464"><span class="linenos">464</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator.arrayagg_sql-465"><a href="#Hive.Generator.arrayagg_sql-465"><span class="linenos">465</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><span id="Hive.Generator.arrayagg_sql-466"><a href="#Hive.Generator.arrayagg_sql-466"><span class="linenos">466</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
-</span><span id="Hive.Generator.arrayagg_sql-467"><a href="#Hive.Generator.arrayagg_sql-467"><span class="linenos">467</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
-</span><span id="Hive.Generator.arrayagg_sql-468"><a href="#Hive.Generator.arrayagg_sql-468"><span class="linenos">468</span></a> <span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.arrayagg_sql-466"><a href="#Hive.Generator.arrayagg_sql-466"><span class="linenos">466</span></a> <span class="k">def</span> <span class="nf">arrayagg_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">ArrayAgg</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator.arrayagg_sql-467"><a href="#Hive.Generator.arrayagg_sql-467"><span class="linenos">467</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><span id="Hive.Generator.arrayagg_sql-468"><a href="#Hive.Generator.arrayagg_sql-468"><span class="linenos">468</span></a> <span class="s2">&quot;COLLECT_LIST&quot;</span><span class="p">,</span>
+</span><span id="Hive.Generator.arrayagg_sql-469"><a href="#Hive.Generator.arrayagg_sql-469"><span class="linenos">469</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">this</span> <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">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Order</span><span class="p">)</span> <span class="k">else</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span>
+</span><span id="Hive.Generator.arrayagg_sql-470"><a href="#Hive.Generator.arrayagg_sql-470"><span class="linenos">470</span></a> <span class="p">)</span>
</span></pre></div>
@@ -2423,8 +2429,8 @@ Default: True</li>
</div>
<a class="headerlink" href="#Hive.Generator.with_properties"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.with_properties-470"><a href="#Hive.Generator.with_properties-470"><span class="linenos">470</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator.with_properties-471"><a href="#Hive.Generator.with_properties-471"><span class="linenos">471</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.with_properties-472"><a href="#Hive.Generator.with_properties-472"><span class="linenos">472</span></a> <span class="k">def</span> <span class="nf">with_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">properties</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator.with_properties-473"><a href="#Hive.Generator.with_properties-473"><span class="linenos">473</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span><span class="n">properties</span><span class="p">,</span> <span class="n">prefix</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seg</span><span class="p">(</span><span class="s2">&quot;TBLPROPERTIES&quot;</span><span class="p">))</span>
</span></pre></div>
@@ -2442,23 +2448,23 @@ Default: True</li>
</div>
<a class="headerlink" href="#Hive.Generator.datatype_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.datatype_sql-473"><a href="#Hive.Generator.datatype_sql-473"><span class="linenos">473</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Hive.Generator.datatype_sql-474"><a href="#Hive.Generator.datatype_sql-474"><span class="linenos">474</span></a> <span class="k">if</span> <span class="p">(</span>
-</span><span id="Hive.Generator.datatype_sql-475"><a href="#Hive.Generator.datatype_sql-475"><span class="linenos">475</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-476"><a href="#Hive.Generator.datatype_sql-476"><span class="linenos">476</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
-</span><span id="Hive.Generator.datatype_sql-477"><a href="#Hive.Generator.datatype_sql-477"><span class="linenos">477</span></a> <span class="p">):</span>
-</span><span id="Hive.Generator.datatype_sql-478"><a href="#Hive.Generator.datatype_sql-478"><span class="linenos">478</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-479"><a href="#Hive.Generator.datatype_sql-479"><span class="linenos">479</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
-</span><span id="Hive.Generator.datatype_sql-480"><a href="#Hive.Generator.datatype_sql-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-481"><a href="#Hive.Generator.datatype_sql-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
-</span><span id="Hive.Generator.datatype_sql-482"><a href="#Hive.Generator.datatype_sql-482"><span class="linenos">482</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-483"><a href="#Hive.Generator.datatype_sql-483"><span class="linenos">483</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
-</span><span id="Hive.Generator.datatype_sql-484"><a href="#Hive.Generator.datatype_sql-484"><span class="linenos">484</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-485"><a href="#Hive.Generator.datatype_sql-485"><span class="linenos">485</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
-</span><span id="Hive.Generator.datatype_sql-486"><a href="#Hive.Generator.datatype_sql-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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-487"><a href="#Hive.Generator.datatype_sql-487"><span class="linenos">487</span></a> <span class="p">)</span>
-</span><span id="Hive.Generator.datatype_sql-488"><a href="#Hive.Generator.datatype_sql-488"><span class="linenos">488</span></a>
-</span><span id="Hive.Generator.datatype_sql-489"><a href="#Hive.Generator.datatype_sql-489"><span class="linenos">489</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_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="Hive.Generator.datatype_sql-475"><a href="#Hive.Generator.datatype_sql-475"><span class="linenos">475</span></a> <span class="k">def</span> <span class="nf">datatype_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">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Hive.Generator.datatype_sql-476"><a href="#Hive.Generator.datatype_sql-476"><span class="linenos">476</span></a> <span class="k">if</span> <span class="p">(</span>
+</span><span id="Hive.Generator.datatype_sql-477"><a href="#Hive.Generator.datatype_sql-477"><span class="linenos">477</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</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">VARCHAR</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">NVARCHAR</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-478"><a href="#Hive.Generator.datatype_sql-478"><span class="linenos">478</span></a> <span class="ow">and</span> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span>
+</span><span id="Hive.Generator.datatype_sql-479"><a href="#Hive.Generator.datatype_sql-479"><span class="linenos">479</span></a> <span class="p">):</span>
+</span><span id="Hive.Generator.datatype_sql-480"><a href="#Hive.Generator.datatype_sql-480"><span class="linenos">480</span></a> <span class="n">expression</span> <span class="o">=</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;text&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-481"><a href="#Hive.Generator.datatype_sql-481"><span class="linenos">481</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">TEMPORAL_TYPES</span><span class="p">:</span>
+</span><span id="Hive.Generator.datatype_sql-482"><a href="#Hive.Generator.datatype_sql-482"><span class="linenos">482</span></a> <span class="n">expression</span> <span class="o">=</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="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-483"><a href="#Hive.Generator.datatype_sql-483"><span class="linenos">483</span></a> <span class="k">elif</span> <span class="n">expression</span><span class="o">.</span><span class="n">is_type</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">):</span>
+</span><span id="Hive.Generator.datatype_sql-484"><a href="#Hive.Generator.datatype_sql-484"><span class="linenos">484</span></a> <span class="n">size_expression</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">DataTypeSize</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-485"><a href="#Hive.Generator.datatype_sql-485"><span class="linenos">485</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span>
+</span><span id="Hive.Generator.datatype_sql-486"><a href="#Hive.Generator.datatype_sql-486"><span class="linenos">486</span></a> <span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size_expression</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-487"><a href="#Hive.Generator.datatype_sql-487"><span class="linenos">487</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Hive.Generator.datatype_sql-488"><a href="#Hive.Generator.datatype_sql-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">build</span><span class="p">(</span><span class="s2">&quot;float&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o">&lt;=</span> <span class="mi">32</span> <span class="k">else</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;double&quot;</span><span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-489"><a href="#Hive.Generator.datatype_sql-489"><span class="linenos">489</span></a> <span class="p">)</span>
+</span><span id="Hive.Generator.datatype_sql-490"><a href="#Hive.Generator.datatype_sql-490"><span class="linenos">490</span></a>
+</span><span id="Hive.Generator.datatype_sql-491"><a href="#Hive.Generator.datatype_sql-491"><span class="linenos">491</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</span></pre></div>