diff options
Diffstat (limited to 'docs/sqlglot/dialects/hive.html')
-rw-r--r-- | docs/sqlglot/dialects/hive.html | 1576 |
1 files changed, 842 insertions, 734 deletions
diff --git a/docs/sqlglot/dialects/hive.html b/docs/sqlglot/dialects/hive.html index 314179b..7f7a1ae 100644 --- a/docs/sqlglot/dialects/hive.html +++ b/docs/sqlglot/dialects/hive.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="generator" content="pdoc 14.4.0"/> + <meta name="generator" content="pdoc 14.5.0"/> <title>sqlglot.dialects.hive API documentation</title> <style>/*! * Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}</style> @@ -160,6 +160,9 @@ <a class="variable" href="#Hive.Generator.SUPPORTS_TO_NUMBER">SUPPORTS_TO_NUMBER</a> </li> <li> + <a class="variable" href="#Hive.Generator.WITH_PROPERTIES_PREFIX">WITH_PROPERTIES_PREFIX</a> + </li> + <li> <a class="variable" href="#Hive.Generator.EXPRESSIONS_WITHOUT_NESTED_CTES">EXPRESSIONS_WITHOUT_NESTED_CTES</a> </li> <li> @@ -190,9 +193,6 @@ <a class="function" href="#Hive.Generator.arrayagg_sql">arrayagg_sql</a> </li> <li> - <a class="function" href="#Hive.Generator.with_properties">with_properties</a> - </li> - <li> <a class="function" href="#Hive.Generator.datatype_sql">datatype_sql</a> </li> <li> @@ -202,6 +202,12 @@ <a class="function" href="#Hive.Generator.struct_sql">struct_sql</a> </li> <li> + <a class="function" href="#Hive.Generator.alterset_sql">alterset_sql</a> + </li> + <li> + <a class="function" href="#Hive.Generator.serdeproperties_sql">serdeproperties_sql</a> + </li> + <li> <a class="variable" href="#Hive.Generator.SELECT_KINDS">SELECT_KINDS</a> </li> <li> @@ -555,7 +561,7 @@ </span><span id="L-254"><a href="#L-254"><span class="linenos">254</span></a> <span class="s2">"REFRESH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFRESH</span><span class="p">,</span> </span><span id="L-255"><a href="#L-255"><span class="linenos">255</span></a> <span class="s2">"TIMESTAMP AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_SNAPSHOT</span><span class="p">,</span> </span><span id="L-256"><a href="#L-256"><span class="linenos">256</span></a> <span class="s2">"VERSION AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VERSION_SNAPSHOT</span><span class="p">,</span> -</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> +</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> </span><span id="L-258"><a href="#L-258"><span class="linenos">258</span></a> <span class="p">}</span> </span><span id="L-259"><a href="#L-259"><span class="linenos">259</span></a> </span><span id="L-260"><a href="#L-260"><span class="linenos">260</span></a> <span class="n">NUMERIC_LITERALS</span> <span class="o">=</span> <span class="p">{</span> @@ -633,7 +639,7 @@ </span><span id="L-332"><a href="#L-332"><span class="linenos">332</span></a> </span><span id="L-333"><a href="#L-333"><span class="linenos">333</span></a> <span class="n">PROPERTY_PARSERS</span> <span class="o">=</span> <span class="p">{</span> </span><span id="L-334"><a href="#L-334"><span class="linenos">334</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">PROPERTY_PARSERS</span><span class="p">,</span> -</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> +</span><span id="L-335"><a href="#L-335"><span class="linenos">335</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> </span><span id="L-336"><a href="#L-336"><span class="linenos">336</span></a> <span class="n">expressions</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_property</span><span class="p">)</span> </span><span id="L-337"><a href="#L-337"><span class="linenos">337</span></a> <span class="p">),</span> </span><span id="L-338"><a href="#L-338"><span class="linenos">338</span></a> <span class="p">}</span> @@ -744,126 +750,126 @@ </span><span id="L-443"><a href="#L-443"><span class="linenos">443</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span> </span><span id="L-444"><a href="#L-444"><span class="linenos">444</span></a> <span class="n">JSON_PATH_SINGLE_QUOTE_ESCAPE</span> <span class="o">=</span> <span class="kc">True</span> </span><span id="L-445"><a href="#L-445"><span class="linenos">445</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-446"><a href="#L-446"><span class="linenos">446</span></a> -</span><span id="L-447"><a href="#L-447"><span class="linenos">447</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</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">Subquery</span><span class="p">,</span> -</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> -</span><span id="L-452"><a href="#L-452"><span class="linenos">452</span></a> <span class="p">}</span> -</span><span id="L-453"><a href="#L-453"><span class="linenos">453</span></a> -</span><span id="L-454"><a href="#L-454"><span class="linenos">454</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</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">JSONPathSubscript</span><span class="p">,</span> -</span><span id="L-458"><a href="#L-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> -</span><span id="L-459"><a href="#L-459"><span class="linenos">459</span></a> <span class="p">}</span> -</span><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> -</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-462"><a href="#L-462"><span class="linenos">462</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-463"><a href="#L-463"><span class="linenos">463</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">"BOOLEAN"</span><span class="p">,</span> -</span><span id="L-464"><a href="#L-464"><span class="linenos">464</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</span><span class="p">,</span> -</span><span id="L-466"><a href="#L-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"STRING"</span><span class="p">,</span> -</span><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="L-468"><a href="#L-468"><span class="linenos">468</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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> -</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"BINARY"</span><span class="p">,</span> -</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a> <span class="p">}</span> -</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> -</span><span id="L-473"><a href="#L-473"><span class="linenos">473</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-474"><a href="#L-474"><span class="linenos">474</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-475"><a href="#L-475"><span class="linenos">475</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-476"><a href="#L-476"><span class="linenos">476</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-477"><a href="#L-477"><span class="linenos">477</span></a> <span class="p">[</span> -</span><span id="L-478"><a href="#L-478"><span class="linenos">478</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-479"><a href="#L-479"><span class="linenos">479</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-480"><a href="#L-480"><span class="linenos">480</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-481"><a href="#L-481"><span class="linenos">481</span></a> <span class="p">]</span> -</span><span id="L-482"><a href="#L-482"><span class="linenos">482</span></a> <span class="p">),</span> -</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Property</span><span class="p">:</span> <span class="n">_property_sql</span><span class="p">,</span> -</span><span id="L-484"><a href="#L-484"><span class="linenos">484</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</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">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span> -</span><span id="L-486"><a href="#L-486"><span class="linenos">486</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</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">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> -</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">),</span> -</span><span id="L-489"><a href="#L-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-490"><a href="#L-490"><span class="linenos">490</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">"SIZE"</span><span class="p">),</span> -</span><span id="L-491"><a href="#L-491"><span class="linenos">491</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span> -</span><span id="L-492"><a href="#L-492"><span class="linenos">492</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span> -</span><span id="L-493"><a href="#L-493"><span class="linenos">493</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> -</span><span id="L-494"><a href="#L-494"><span class="linenos">494</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> -</span><span id="L-495"><a href="#L-495"><span class="linenos">495</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> -</span><span id="L-496"><a href="#L-496"><span class="linenos">496</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> -</span><span id="L-497"><a href="#L-497"><span class="linenos">497</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="L-498"><a href="#L-498"><span class="linenos">498</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> -</span><span id="L-499"><a href="#L-499"><span class="linenos">499</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="L-500"><a href="#L-500"><span class="linenos">500</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> -</span><span id="L-501"><a href="#L-501"><span class="linenos">501</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="L-502"><a href="#L-502"><span class="linenos">502</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> -</span><span id="L-503"><a href="#L-503"><span class="linenos">503</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"UNBASE64"</span><span class="p">),</span> -</span><span id="L-504"><a href="#L-504"><span class="linenos">504</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">(),</span> -</span><span id="L-505"><a href="#L-505"><span class="linenos">505</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span> -</span><span id="L-506"><a href="#L-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"ISNAN"</span><span class="p">),</span> -</span><span id="L-507"><a href="#L-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-509"><a href="#L-509"><span class="linenos">509</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="L-510"><a href="#L-510"><span class="linenos">510</span></a> <span class="p">),</span> -</span><span id="L-511"><a href="#L-511"><span class="linenos">511</span></a> <span 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-512"><a href="#L-512"><span class="linenos">512</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-513"><a href="#L-513"><span class="linenos">513</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-514"><a href="#L-514"><span class="linenos">514</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-515"><a href="#L-515"><span class="linenos">515</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">"UNHEX"</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">"MD5"</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-516"><a href="#L-516"><span class="linenos">516</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-517"><a href="#L-517"><span class="linenos">517</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">"MONTHS_BETWEEN"</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-518"><a href="#L-518"><span class="linenos">518</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> -</span><span id="L-519"><a href="#L-519"><span class="linenos">519</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> -</span><span id="L-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="p">),</span> -</span><span id="L-521"><a href="#L-521"><span class="linenos">521</span></a> <span 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-522"><a href="#L-522"><span class="linenos">522</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> -</span><span id="L-523"><a href="#L-523"><span class="linenos">523</span></a> <span class="p">[</span> -</span><span id="L-524"><a href="#L-524"><span class="linenos">524</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> -</span><span id="L-525"><a href="#L-525"><span class="linenos">525</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> -</span><span id="L-526"><a href="#L-526"><span class="linenos">526</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> -</span><span id="L-527"><a href="#L-527"><span class="linenos">527</span></a> <span class="p">]</span> -</span><span id="L-528"><a href="#L-528"><span class="linenos">528</span></a> <span class="p">),</span> -</span><span id="L-529"><a href="#L-529"><span class="linenos">529</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">"PERCENTILE"</span><span class="p">),</span> -</span><span id="L-530"><a href="#L-530"><span class="linenos">530</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">"PERCENTILE_APPROX"</span><span class="p">),</span> -</span><span id="L-531"><a href="#L-531"><span class="linenos">531</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-532"><a href="#L-532"><span class="linenos">532</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-533"><a href="#L-533"><span class="linenos">533</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">"RLIKE"</span><span class="p">),</span> -</span><span id="L-534"><a href="#L-534"><span class="linenos">534</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">"SPLIT"</span><span class="p">),</span> -</span><span id="L-535"><a href="#L-535"><span class="linenos">535</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-536"><a href="#L-536"><span class="linenos">536</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-537"><a href="#L-537"><span class="linenos">537</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-538"><a href="#L-538"><span class="linenos">538</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> -</span><span id="L-539"><a href="#L-539"><span class="linenos">539</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> -</span><span id="L-540"><a href="#L-540"><span class="linenos">540</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-541"><a href="#L-541"><span class="linenos">541</span></a> <span class="p">),</span> -</span><span id="L-542"><a href="#L-542"><span class="linenos">542</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-543"><a href="#L-543"><span class="linenos">543</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-544"><a href="#L-544"><span class="linenos">544</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-545"><a href="#L-545"><span class="linenos">545</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-546"><a href="#L-546"><span class="linenos">546</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-547"><a href="#L-547"><span class="linenos">547</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">"TO_DATE"</span><span class="p">),</span> -</span><span id="L-548"><a href="#L-548"><span class="linenos">548</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-549"><a href="#L-549"><span class="linenos">549</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="L-550"><a href="#L-550"><span class="linenos">550</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> -</span><span id="L-551"><a href="#L-551"><span class="linenos">551</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="L-552"><a href="#L-552"><span class="linenos">552</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">"BASE64"</span><span class="p">),</span> -</span><span id="L-553"><a href="#L-553"><span class="linenos">553</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="L-554"><a href="#L-554"><span class="linenos">554</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> -</span><span id="L-555"><a href="#L-555"><span class="linenos">555</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> -</span><span id="L-556"><a href="#L-556"><span class="linenos">556</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> -</span><span id="L-557"><a href="#L-557"><span class="linenos">557</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-558"><a href="#L-558"><span class="linenos">558</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-559"><a href="#L-559"><span class="linenos">559</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-560"><a href="#L-560"><span class="linenos">560</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="p">),</span> -</span><span id="L-562"><a href="#L-562"><span class="linenos">562</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> -</span><span id="L-563"><a href="#L-563"><span class="linenos">563</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">"FROM_UNIXTIME"</span><span class="p">),</span> -</span><span id="L-564"><a href="#L-564"><span class="linenos">564</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="L-565"><a href="#L-565"><span class="linenos">565</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">"WITH SERDEPROPERTIES"</span><span class="p">),</span> +</span><span id="L-446"><a href="#L-446"><span class="linenos">446</span></a> <span class="n">WITH_PROPERTIES_PREFIX</span> <span class="o">=</span> <span class="s2">"TBLPROPERTIES"</span> +</span><span id="L-447"><a href="#L-447"><span class="linenos">447</span></a> +</span><span id="L-448"><a href="#L-448"><span class="linenos">448</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</span><span class="p">,</span> +</span><span id="L-451"><a href="#L-451"><span class="linenos">451</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Subquery</span><span class="p">,</span> +</span><span id="L-452"><a href="#L-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> +</span><span id="L-453"><a href="#L-453"><span class="linenos">453</span></a> <span class="p">}</span> +</span><span id="L-454"><a href="#L-454"><span class="linenos">454</span></a> +</span><span id="L-455"><a href="#L-455"><span class="linenos">455</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</span><span class="p">,</span> +</span><span id="L-458"><a href="#L-458"><span class="linenos">458</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span> +</span><span id="L-459"><a href="#L-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> +</span><span id="L-460"><a href="#L-460"><span class="linenos">460</span></a> <span class="p">}</span> +</span><span id="L-461"><a href="#L-461"><span class="linenos">461</span></a> +</span><span id="L-462"><a href="#L-462"><span class="linenos">462</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-463"><a href="#L-463"><span class="linenos">463</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-464"><a href="#L-464"><span class="linenos">464</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">"BOOLEAN"</span><span class="p">,</span> +</span><span id="L-465"><a href="#L-465"><span class="linenos">465</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="L-466"><a href="#L-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</span><span class="p">,</span> +</span><span id="L-467"><a href="#L-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"STRING"</span><span class="p">,</span> +</span><span id="L-468"><a href="#L-468"><span class="linenos">468</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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="L-469"><a href="#L-469"><span class="linenos">469</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="L-470"><a href="#L-470"><span class="linenos">470</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> +</span><span id="L-471"><a href="#L-471"><span class="linenos">471</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">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">"BINARY"</span><span class="p">,</span> +</span><span id="L-472"><a href="#L-472"><span class="linenos">472</span></a> <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="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-475"><a href="#L-475"><span class="linenos">475</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-476"><a href="#L-476"><span class="linenos">476</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-477"><a href="#L-477"><span class="linenos">477</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-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">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span> +</span><span id="L-480"><a href="#L-480"><span class="linenos">480</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-481"><a href="#L-481"><span class="linenos">481</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-482"><a href="#L-482"><span class="linenos">482</span></a> <span class="p">]</span> +</span><span id="L-483"><a href="#L-483"><span class="linenos">483</span></a> <span class="p">),</span> +</span><span id="L-484"><a href="#L-484"><span class="linenos">484</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-485"><a href="#L-485"><span class="linenos">485</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</span><span class="p">),</span> +</span><span id="L-486"><a href="#L-486"><span class="linenos">486</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</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">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</span><span class="p">),</span> +</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> +</span><span id="L-489"><a href="#L-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayConcat</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">),</span> +</span><span id="L-490"><a href="#L-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-491"><a href="#L-491"><span class="linenos">491</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">"SIZE"</span><span class="p">),</span> +</span><span id="L-492"><a href="#L-492"><span class="linenos">492</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArraySort</span><span class="p">:</span> <span class="n">_array_sort_sql</span><span class="p">,</span> +</span><span id="L-493"><a href="#L-493"><span class="linenos">493</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">With</span><span class="p">:</span> <span class="n">no_recursive_cte_sql</span><span class="p">,</span> +</span><span id="L-494"><a href="#L-494"><span class="linenos">494</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> +</span><span id="L-495"><a href="#L-495"><span class="linenos">495</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> +</span><span id="L-496"><a href="#L-496"><span class="linenos">496</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> +</span><span id="L-497"><a href="#L-497"><span class="linenos">497</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateSub</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> +</span><span id="L-498"><a href="#L-498"><span class="linenos">498</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="L-499"><a href="#L-499"><span class="linenos">499</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> +</span><span id="L-500"><a href="#L-500"><span class="linenos">500</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="L-501"><a href="#L-501"><span class="linenos">501</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> +</span><span id="L-502"><a href="#L-502"><span class="linenos">502</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FileFormatProperty</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="L-503"><a href="#L-503"><span class="linenos">503</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> +</span><span id="L-504"><a href="#L-504"><span class="linenos">504</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">FromBase64</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"UNBASE64"</span><span class="p">),</span> +</span><span id="L-505"><a href="#L-505"><span class="linenos">505</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">If</span><span class="p">:</span> <span class="n">if_sql</span><span class="p">(),</span> +</span><span id="L-506"><a href="#L-506"><span class="linenos">506</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ILike</span><span class="p">:</span> <span class="n">no_ilike_sql</span><span class="p">,</span> +</span><span id="L-507"><a href="#L-507"><span class="linenos">507</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">IsNan</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"ISNAN"</span><span class="p">),</span> +</span><span id="L-508"><a href="#L-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-509"><a href="#L-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-510"><a href="#L-510"><span class="linenos">510</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="L-511"><a href="#L-511"><span class="linenos">511</span></a> <span class="p">),</span> +</span><span id="L-512"><a href="#L-512"><span class="linenos">512</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-513"><a href="#L-513"><span class="linenos">513</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-514"><a href="#L-514"><span class="linenos">514</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-515"><a href="#L-515"><span class="linenos">515</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-516"><a href="#L-516"><span class="linenos">516</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">"UNHEX"</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">"MD5"</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-517"><a href="#L-517"><span class="linenos">517</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-518"><a href="#L-518"><span class="linenos">518</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">"MONTHS_BETWEEN"</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-519"><a href="#L-519"><span class="linenos">519</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> +</span><span id="L-520"><a href="#L-520"><span class="linenos">520</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> +</span><span id="L-521"><a href="#L-521"><span class="linenos">521</span></a> <span class="p">),</span> +</span><span id="L-522"><a href="#L-522"><span class="linenos">522</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-523"><a href="#L-523"><span class="linenos">523</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> +</span><span id="L-524"><a href="#L-524"><span class="linenos">524</span></a> <span class="p">[</span> +</span><span id="L-525"><a href="#L-525"><span class="linenos">525</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> +</span><span id="L-526"><a href="#L-526"><span class="linenos">526</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> +</span><span id="L-527"><a href="#L-527"><span class="linenos">527</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> +</span><span id="L-528"><a href="#L-528"><span class="linenos">528</span></a> <span class="p">]</span> +</span><span id="L-529"><a href="#L-529"><span class="linenos">529</span></a> <span class="p">),</span> +</span><span id="L-530"><a href="#L-530"><span class="linenos">530</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">"PERCENTILE"</span><span class="p">),</span> +</span><span id="L-531"><a href="#L-531"><span class="linenos">531</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">"PERCENTILE_APPROX"</span><span class="p">),</span> +</span><span id="L-532"><a href="#L-532"><span class="linenos">532</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-533"><a href="#L-533"><span class="linenos">533</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-534"><a href="#L-534"><span class="linenos">534</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">"RLIKE"</span><span class="p">),</span> +</span><span id="L-535"><a href="#L-535"><span class="linenos">535</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">"SPLIT"</span><span class="p">),</span> +</span><span id="L-536"><a href="#L-536"><span class="linenos">536</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-537"><a href="#L-537"><span class="linenos">537</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-538"><a href="#L-538"><span class="linenos">538</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-539"><a href="#L-539"><span class="linenos">539</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> +</span><span id="L-540"><a href="#L-540"><span class="linenos">540</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> +</span><span id="L-541"><a href="#L-541"><span class="linenos">541</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-542"><a href="#L-542"><span class="linenos">542</span></a> <span class="p">),</span> +</span><span id="L-543"><a href="#L-543"><span class="linenos">543</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-544"><a href="#L-544"><span class="linenos">544</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-545"><a href="#L-545"><span class="linenos">545</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-546"><a href="#L-546"><span class="linenos">546</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-547"><a href="#L-547"><span class="linenos">547</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-548"><a href="#L-548"><span class="linenos">548</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">"TO_DATE"</span><span class="p">),</span> +</span><span id="L-549"><a href="#L-549"><span class="linenos">549</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-550"><a href="#L-550"><span class="linenos">550</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="L-551"><a href="#L-551"><span class="linenos">551</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> +</span><span id="L-552"><a href="#L-552"><span class="linenos">552</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="L-553"><a href="#L-553"><span class="linenos">553</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">"BASE64"</span><span class="p">),</span> +</span><span id="L-554"><a href="#L-554"><span class="linenos">554</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="L-555"><a href="#L-555"><span class="linenos">555</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> +</span><span id="L-556"><a href="#L-556"><span class="linenos">556</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> +</span><span id="L-557"><a href="#L-557"><span class="linenos">557</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> +</span><span id="L-558"><a href="#L-558"><span class="linenos">558</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-559"><a href="#L-559"><span class="linenos">559</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-560"><a href="#L-560"><span class="linenos">560</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-561"><a href="#L-561"><span class="linenos">561</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-562"><a href="#L-562"><span class="linenos">562</span></a> <span class="p">),</span> +</span><span id="L-563"><a href="#L-563"><span class="linenos">563</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> +</span><span id="L-564"><a href="#L-564"><span class="linenos">564</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">"FROM_UNIXTIME"</span><span class="p">),</span> +</span><span id="L-565"><a href="#L-565"><span class="linenos">565</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> </span><span id="L-566"><a href="#L-566"><span class="linenos">566</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">"FORMAT_NUMBER"</span><span class="p">),</span> </span><span id="L-567"><a href="#L-567"><span class="linenos">567</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">""</span><span class="p">),</span> </span><span id="L-568"><a href="#L-568"><span class="linenos">568</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ClusteredColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> @@ -873,99 +879,117 @@ </span><span id="L-572"><a href="#L-572"><span class="linenos">572</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotForReplicationColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="L-573"><a href="#L-573"><span class="linenos">573</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnProperty</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="L-574"><a href="#L-574"><span class="linenos">574</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PrimaryKeyColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"PRIMARY KEY"</span><span class="p">,</span> -</span><span id="L-575"><a href="#L-575"><span class="linenos">575</span></a> <span class="p">}</span> -</span><span id="L-576"><a href="#L-576"><span class="linenos">576</span></a> -</span><span id="L-577"><a href="#L-577"><span class="linenos">577</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-578"><a href="#L-578"><span class="linenos">578</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-579"><a href="#L-579"><span class="linenos">579</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-580"><a href="#L-580"><span class="linenos">580</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-581"><a href="#L-581"><span class="linenos">581</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-582"><a href="#L-582"><span class="linenos">582</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-583"><a href="#L-583"><span class="linenos">583</span></a> <span class="p">}</span> -</span><span id="L-584"><a href="#L-584"><span class="linenos">584</span></a> -</span><span id="L-585"><a href="#L-585"><span class="linenos">585</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-586"><a href="#L-586"><span class="linenos">586</span></a> <span class="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">JSONPathWildcard</span><span class="p">):</span> -</span><span id="L-587"><a href="#L-587"><span class="linenos">587</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> -</span><span id="L-588"><a href="#L-588"><span class="linenos">588</span></a> <span class="k">return</span> <span class="s2">""</span> -</span><span id="L-589"><a href="#L-589"><span class="linenos">589</span></a> -</span><span id="L-590"><a href="#L-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="L-591"><a href="#L-591"><span class="linenos">591</span></a> -</span><span id="L-592"><a href="#L-592"><span class="linenos">592</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-593"><a href="#L-593"><span class="linenos">593</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="L-594"><a href="#L-594"><span class="linenos">594</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> -</span><span id="L-595"><a href="#L-595"><span class="linenos">595</span></a> -</span><span id="L-596"><a href="#L-596"><span class="linenos">596</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> -</span><span id="L-597"><a href="#L-597"><span class="linenos">597</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> -</span><span id="L-598"><a href="#L-598"><span class="linenos">598</span></a> -</span><span id="L-599"><a href="#L-599"><span class="linenos">599</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> -</span><span id="L-600"><a href="#L-600"><span class="linenos">600</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> -</span><span id="L-601"><a href="#L-601"><span class="linenos">601</span></a> <span class="k">return</span> <span class="n">this</span> -</span><span id="L-602"><a href="#L-602"><span class="linenos">602</span></a> -</span><span id="L-603"><a href="#L-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> -</span><span id="L-604"><a href="#L-604"><span class="linenos">604</span></a> -</span><span id="L-605"><a href="#L-605"><span class="linenos">605</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-606"><a href="#L-606"><span class="linenos">606</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> -</span><span id="L-607"><a href="#L-607"><span class="linenos">607</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> -</span><span id="L-608"><a href="#L-608"><span class="linenos">608</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> -</span><span id="L-609"><a href="#L-609"><span class="linenos">609</span></a> -</span><span id="L-610"><a href="#L-610"><span class="linenos">610</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="L-611"><a href="#L-611"><span class="linenos">611</span></a> -</span><span id="L-612"><a href="#L-612"><span class="linenos">612</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-613"><a href="#L-613"><span class="linenos">613</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> -</span><span id="L-614"><a href="#L-614"><span class="linenos">614</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> -</span><span id="L-615"><a href="#L-615"><span class="linenos">615</span></a> -</span><span id="L-616"><a href="#L-616"><span class="linenos">616</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="L-617"><a href="#L-617"><span class="linenos">617</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="L-618"><a href="#L-618"><span class="linenos">618</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> -</span><span id="L-619"><a href="#L-619"><span class="linenos">619</span></a> -</span><span id="L-620"><a href="#L-620"><span class="linenos">620</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-621"><a href="#L-621"><span class="linenos">621</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">"serde_properties"</span><span class="p">)</span> -</span><span id="L-622"><a href="#L-622"><span class="linenos">622</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="L-623"><a href="#L-623"><span class="linenos">623</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> -</span><span id="L-624"><a href="#L-624"><span class="linenos">624</span></a> -</span><span id="L-625"><a href="#L-625"><span class="linenos">625</span></a> <span class="k">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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-626"><a href="#L-626"><span class="linenos">626</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-627"><a href="#L-627"><span class="linenos">627</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> -</span><span id="L-628"><a href="#L-628"><span class="linenos">628</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">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-629"><a href="#L-629"><span class="linenos">629</span></a> <span class="p">)</span> -</span><span id="L-630"><a href="#L-630"><span class="linenos">630</span></a> -</span><span id="L-631"><a href="#L-631"><span class="linenos">631</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-632"><a href="#L-632"><span class="linenos">632</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">"TBLPROPERTIES"</span><span class="p">))</span> -</span><span id="L-633"><a href="#L-633"><span class="linenos">633</span></a> -</span><span id="L-634"><a href="#L-634"><span class="linenos">634</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-635"><a href="#L-635"><span class="linenos">635</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> -</span><span id="L-636"><a href="#L-636"><span class="linenos">636</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> -</span><span id="L-637"><a href="#L-637"><span class="linenos">637</span></a> <span class="p">):</span> -</span><span id="L-638"><a href="#L-638"><span class="linenos">638</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">"text"</span><span class="p">)</span> -</span><span id="L-639"><a href="#L-639"><span class="linenos">639</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> -</span><span id="L-640"><a href="#L-640"><span class="linenos">640</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> -</span><span id="L-641"><a href="#L-641"><span class="linenos">641</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-642"><a href="#L-642"><span class="linenos">642</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-643"><a href="#L-643"><span class="linenos">643</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">"float"</span><span class="p">):</span> -</span><span id="L-644"><a href="#L-644"><span class="linenos">644</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">DataTypeParam</span><span class="p">)</span> -</span><span id="L-645"><a href="#L-645"><span class="linenos">645</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> -</span><span id="L-646"><a href="#L-646"><span class="linenos">646</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-647"><a href="#L-647"><span class="linenos">647</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="L-648"><a href="#L-648"><span class="linenos">648</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> -</span><span id="L-649"><a href="#L-649"><span class="linenos">649</span></a> <span class="p">)</span> +</span><span id="L-575"><a href="#L-575"><span class="linenos">575</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="L-576"><a href="#L-576"><span class="linenos">576</span></a> <span class="p">}</span> +</span><span id="L-577"><a href="#L-577"><span class="linenos">577</span></a> +</span><span id="L-578"><a href="#L-578"><span class="linenos">578</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-579"><a href="#L-579"><span class="linenos">579</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-580"><a href="#L-580"><span class="linenos">580</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-581"><a href="#L-581"><span class="linenos">581</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-582"><a href="#L-582"><span class="linenos">582</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-583"><a href="#L-583"><span class="linenos">583</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-584"><a href="#L-584"><span class="linenos">584</span></a> <span class="p">}</span> +</span><span id="L-585"><a href="#L-585"><span class="linenos">585</span></a> +</span><span id="L-586"><a href="#L-586"><span class="linenos">586</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-587"><a href="#L-587"><span class="linenos">587</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">):</span> +</span><span id="L-588"><a href="#L-588"><span class="linenos">588</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> +</span><span id="L-589"><a href="#L-589"><span class="linenos">589</span></a> <span class="k">return</span> <span class="s2">""</span> +</span><span id="L-590"><a href="#L-590"><span class="linenos">590</span></a> +</span><span id="L-591"><a href="#L-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="L-592"><a href="#L-592"><span class="linenos">592</span></a> +</span><span id="L-593"><a href="#L-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-594"><a href="#L-594"><span class="linenos">594</span></a> <span class="n">this</span> <span class="o">=</span> <span class="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">"this"</span><span class="p">)</span> +</span><span id="L-595"><a href="#L-595"><span class="linenos">595</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> +</span><span id="L-596"><a href="#L-596"><span class="linenos">596</span></a> +</span><span id="L-597"><a href="#L-597"><span class="linenos">597</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> +</span><span id="L-598"><a href="#L-598"><span class="linenos">598</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> +</span><span id="L-599"><a href="#L-599"><span class="linenos">599</span></a> +</span><span id="L-600"><a href="#L-600"><span class="linenos">600</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> +</span><span id="L-601"><a href="#L-601"><span class="linenos">601</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> +</span><span id="L-602"><a href="#L-602"><span class="linenos">602</span></a> <span class="k">return</span> <span class="n">this</span> +</span><span id="L-603"><a href="#L-603"><span class="linenos">603</span></a> +</span><span id="L-604"><a href="#L-604"><span class="linenos">604</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> +</span><span id="L-605"><a href="#L-605"><span class="linenos">605</span></a> +</span><span id="L-606"><a href="#L-606"><span class="linenos">606</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-607"><a href="#L-607"><span class="linenos">607</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> +</span><span id="L-608"><a href="#L-608"><span class="linenos">608</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> +</span><span id="L-609"><a href="#L-609"><span class="linenos">609</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> +</span><span id="L-610"><a href="#L-610"><span class="linenos">610</span></a> +</span><span id="L-611"><a href="#L-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="L-612"><a href="#L-612"><span class="linenos">612</span></a> +</span><span id="L-613"><a href="#L-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-614"><a href="#L-614"><span class="linenos">614</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> +</span><span id="L-615"><a href="#L-615"><span class="linenos">615</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> +</span><span id="L-616"><a href="#L-616"><span class="linenos">616</span></a> +</span><span id="L-617"><a href="#L-617"><span class="linenos">617</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="L-618"><a href="#L-618"><span class="linenos">618</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-619"><a href="#L-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-620"><a href="#L-620"><span class="linenos">620</span></a> +</span><span id="L-621"><a href="#L-621"><span class="linenos">621</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-622"><a href="#L-622"><span class="linenos">622</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">"serde_properties"</span><span class="p">)</span> +</span><span id="L-623"><a href="#L-623"><span class="linenos">623</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-624"><a href="#L-624"><span class="linenos">624</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-625"><a href="#L-625"><span class="linenos">625</span></a> +</span><span id="L-626"><a href="#L-626"><span class="linenos">626</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-627"><a href="#L-627"><span class="linenos">627</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-628"><a href="#L-628"><span class="linenos">628</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> +</span><span id="L-629"><a href="#L-629"><span class="linenos">629</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-630"><a href="#L-630"><span class="linenos">630</span></a> <span class="p">)</span> +</span><span id="L-631"><a href="#L-631"><span class="linenos">631</span></a> +</span><span id="L-632"><a href="#L-632"><span class="linenos">632</span></a> <span class="k">def</span> <span class="nf">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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-633"><a href="#L-633"><span class="linenos">633</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> +</span><span id="L-634"><a href="#L-634"><span class="linenos">634</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> +</span><span id="L-635"><a href="#L-635"><span class="linenos">635</span></a> <span class="p">):</span> +</span><span id="L-636"><a href="#L-636"><span class="linenos">636</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">"text"</span><span class="p">)</span> +</span><span id="L-637"><a href="#L-637"><span class="linenos">637</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> +</span><span id="L-638"><a href="#L-638"><span class="linenos">638</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> +</span><span id="L-639"><a href="#L-639"><span class="linenos">639</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-640"><a href="#L-640"><span class="linenos">640</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-641"><a href="#L-641"><span class="linenos">641</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">"float"</span><span class="p">):</span> +</span><span id="L-642"><a href="#L-642"><span class="linenos">642</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">DataTypeParam</span><span class="p">)</span> +</span><span id="L-643"><a href="#L-643"><span class="linenos">643</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> +</span><span id="L-644"><a href="#L-644"><span class="linenos">644</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-645"><a href="#L-645"><span class="linenos">645</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="L-646"><a href="#L-646"><span class="linenos">646</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> +</span><span id="L-647"><a href="#L-647"><span class="linenos">647</span></a> <span class="p">)</span> +</span><span id="L-648"><a href="#L-648"><span class="linenos">648</span></a> +</span><span id="L-649"><a href="#L-649"><span class="linenos">649</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-650"><a href="#L-650"><span class="linenos">650</span></a> -</span><span id="L-651"><a href="#L-651"><span class="linenos">651</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="L-652"><a href="#L-652"><span class="linenos">652</span></a> -</span><span id="L-653"><a href="#L-653"><span class="linenos">653</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-654"><a href="#L-654"><span class="linenos">654</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="L-655"><a href="#L-655"><span class="linenos">655</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="L-656"><a href="#L-656"><span class="linenos">656</span></a> -</span><span id="L-657"><a href="#L-657"><span class="linenos">657</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-658"><a href="#L-658"><span class="linenos">658</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-659"><a href="#L-659"><span class="linenos">659</span></a> -</span><span id="L-660"><a href="#L-660"><span class="linenos">660</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> -</span><span id="L-661"><a href="#L-661"><span class="linenos">661</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> -</span><span id="L-662"><a href="#L-662"><span class="linenos">662</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> -</span><span id="L-663"><a href="#L-663"><span class="linenos">663</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-664"><a href="#L-664"><span class="linenos">664</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-665"><a href="#L-665"><span class="linenos">665</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="L-651"><a href="#L-651"><span class="linenos">651</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-652"><a href="#L-652"><span class="linenos">652</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="L-653"><a href="#L-653"><span class="linenos">653</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="L-654"><a href="#L-654"><span class="linenos">654</span></a> +</span><span id="L-655"><a href="#L-655"><span class="linenos">655</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-656"><a href="#L-656"><span class="linenos">656</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-657"><a href="#L-657"><span class="linenos">657</span></a> +</span><span id="L-658"><a href="#L-658"><span class="linenos">658</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> +</span><span id="L-659"><a href="#L-659"><span class="linenos">659</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> +</span><span id="L-660"><a href="#L-660"><span class="linenos">660</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> +</span><span id="L-661"><a href="#L-661"><span class="linenos">661</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-662"><a href="#L-662"><span class="linenos">662</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-663"><a href="#L-663"><span class="linenos">663</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="L-664"><a href="#L-664"><span class="linenos">664</span></a> +</span><span id="L-665"><a href="#L-665"><span class="linenos">665</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> </span><span id="L-666"><a href="#L-666"><span class="linenos">666</span></a> -</span><span id="L-667"><a href="#L-667"><span class="linenos">667</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> +</span><span id="L-667"><a href="#L-667"><span class="linenos">667</span></a> <span class="k">def</span> <span class="nf">alterset_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">AlterSet</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-668"><a href="#L-668"><span class="linenos">668</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-669"><a href="#L-669"><span class="linenos">669</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">exprs</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-670"><a href="#L-670"><span class="linenos">670</span></a> <span class="n">location</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">"location"</span><span class="p">)</span> +</span><span id="L-671"><a href="#L-671"><span class="linenos">671</span></a> <span class="n">location</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" LOCATION </span><span class="si">{</span><span class="n">location</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">location</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-672"><a href="#L-672"><span class="linenos">672</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"file_format"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">)</span> +</span><span id="L-673"><a href="#L-673"><span class="linenos">673</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" FILEFORMAT </span><span class="si">{</span><span class="n">file_format</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">file_format</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-674"><a href="#L-674"><span class="linenos">674</span></a> <span class="n">serde</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">"serde"</span><span class="p">)</span> +</span><span id="L-675"><a href="#L-675"><span class="linenos">675</span></a> <span class="n">serde</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" SERDE </span><span class="si">{</span><span class="n">serde</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-676"><a href="#L-676"><span class="linenos">676</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"tag"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">""</span><span class="p">)</span> +</span><span id="L-677"><a href="#L-677"><span class="linenos">677</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" TAGS </span><span class="si">{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">tags</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-678"><a href="#L-678"><span class="linenos">678</span></a> +</span><span id="L-679"><a href="#L-679"><span class="linenos">679</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"SET</span><span class="si">{</span><span class="n">serde</span><span class="si">}{</span><span class="n">exprs</span><span class="si">}{</span><span class="n">location</span><span class="si">}{</span><span class="n">file_format</span><span class="si">}{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-680"><a href="#L-680"><span class="linenos">680</span></a> +</span><span id="L-681"><a href="#L-681"><span class="linenos">681</span></a> <span class="k">def</span> <span class="nf">serdeproperties_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">SerdeProperties</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-682"><a href="#L-682"><span class="linenos">682</span></a> <span class="n">prefix</span> <span class="o">=</span> <span class="s2">"WITH "</span> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"with"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-683"><a href="#L-683"><span class="linenos">683</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-684"><a href="#L-684"><span class="linenos">684</span></a> +</span><span id="L-685"><a href="#L-685"><span class="linenos">685</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">SERDEPROPERTIES (</span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">)"</span> </span></pre></div> @@ -1084,7 +1108,7 @@ </span><span id="Hive-255"><a href="#Hive-255"><span class="linenos">255</span></a> <span class="s2">"REFRESH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFRESH</span><span class="p">,</span> </span><span id="Hive-256"><a href="#Hive-256"><span class="linenos">256</span></a> <span class="s2">"TIMESTAMP AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_SNAPSHOT</span><span class="p">,</span> </span><span id="Hive-257"><a href="#Hive-257"><span class="linenos">257</span></a> <span class="s2">"VERSION AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VERSION_SNAPSHOT</span><span class="p">,</span> -</span><span id="Hive-258"><a href="#Hive-258"><span class="linenos">258</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> +</span><span id="Hive-258"><a href="#Hive-258"><span class="linenos">258</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> </span><span id="Hive-259"><a href="#Hive-259"><span class="linenos">259</span></a> <span class="p">}</span> </span><span id="Hive-260"><a href="#Hive-260"><span class="linenos">260</span></a> </span><span id="Hive-261"><a href="#Hive-261"><span class="linenos">261</span></a> <span class="n">NUMERIC_LITERALS</span> <span class="o">=</span> <span class="p">{</span> @@ -1162,7 +1186,7 @@ </span><span id="Hive-333"><a href="#Hive-333"><span class="linenos">333</span></a> </span><span id="Hive-334"><a href="#Hive-334"><span class="linenos">334</span></a> <span class="n">PROPERTY_PARSERS</span> <span class="o">=</span> <span class="p">{</span> </span><span id="Hive-335"><a href="#Hive-335"><span class="linenos">335</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">PROPERTY_PARSERS</span><span class="p">,</span> -</span><span id="Hive-336"><a href="#Hive-336"><span class="linenos">336</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> +</span><span id="Hive-336"><a href="#Hive-336"><span class="linenos">336</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> </span><span id="Hive-337"><a href="#Hive-337"><span class="linenos">337</span></a> <span class="n">expressions</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_property</span><span class="p">)</span> </span><span id="Hive-338"><a href="#Hive-338"><span class="linenos">338</span></a> <span class="p">),</span> </span><span id="Hive-339"><a href="#Hive-339"><span class="linenos">339</span></a> <span class="p">}</span> @@ -1273,126 +1297,126 @@ </span><span id="Hive-444"><a href="#Hive-444"><span class="linenos">444</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span> </span><span id="Hive-445"><a href="#Hive-445"><span class="linenos">445</span></a> <span class="n">JSON_PATH_SINGLE_QUOTE_ESCAPE</span> <span class="o">=</span> <span class="kc">True</span> </span><span id="Hive-446"><a href="#Hive-446"><span class="linenos">446</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Hive-447"><a href="#Hive-447"><span class="linenos">447</span></a> -</span><span id="Hive-448"><a href="#Hive-448"><span class="linenos">448</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</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">Subquery</span><span class="p">,</span> -</span><span id="Hive-452"><a href="#Hive-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> -</span><span id="Hive-453"><a href="#Hive-453"><span class="linenos">453</span></a> <span class="p">}</span> -</span><span id="Hive-454"><a href="#Hive-454"><span class="linenos">454</span></a> -</span><span id="Hive-455"><a href="#Hive-455"><span class="linenos">455</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</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">JSONPathSubscript</span><span class="p">,</span> -</span><span id="Hive-459"><a href="#Hive-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> -</span><span id="Hive-460"><a href="#Hive-460"><span class="linenos">460</span></a> <span class="p">}</span> -</span><span id="Hive-461"><a href="#Hive-461"><span class="linenos">461</span></a> -</span><span id="Hive-462"><a href="#Hive-462"><span class="linenos">462</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive-463"><a href="#Hive-463"><span class="linenos">463</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-464"><a href="#Hive-464"><span class="linenos">464</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">"BOOLEAN"</span><span class="p">,</span> -</span><span id="Hive-465"><a href="#Hive-465"><span class="linenos">465</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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="Hive-466"><a href="#Hive-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</span><span class="p">,</span> -</span><span id="Hive-467"><a href="#Hive-467"><span class="linenos">467</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">"STRING"</span><span class="p">,</span> -</span><span id="Hive-468"><a href="#Hive-468"><span class="linenos">468</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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="Hive-469"><a href="#Hive-469"><span class="linenos">469</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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="Hive-470"><a href="#Hive-470"><span class="linenos">470</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">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> -</span><span id="Hive-471"><a href="#Hive-471"><span class="linenos">471</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">"BINARY"</span><span class="p">,</span> -</span><span id="Hive-472"><a href="#Hive-472"><span class="linenos">472</span></a> <span class="p">}</span> -</span><span id="Hive-473"><a href="#Hive-473"><span class="linenos">473</span></a> -</span><span id="Hive-474"><a href="#Hive-474"><span class="linenos">474</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive-475"><a href="#Hive-475"><span class="linenos">475</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-476"><a href="#Hive-476"><span class="linenos">476</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-477"><a href="#Hive-477"><span class="linenos">477</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-478"><a href="#Hive-478"><span class="linenos">478</span></a> <span class="p">[</span> -</span><span id="Hive-479"><a href="#Hive-479"><span class="linenos">479</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-480"><a href="#Hive-480"><span class="linenos">480</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-481"><a href="#Hive-481"><span class="linenos">481</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-482"><a href="#Hive-482"><span class="linenos">482</span></a> <span class="p">]</span> -</span><span id="Hive-483"><a href="#Hive-483"><span class="linenos">483</span></a> <span class="p">),</span> -</span><span id="Hive-484"><a href="#Hive-484"><span class="linenos">484</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-485"><a href="#Hive-485"><span class="linenos">485</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</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">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</span><span class="p">,</span> -</span><span id="Hive-487"><a href="#Hive-487"><span class="linenos">487</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</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">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> -</span><span id="Hive-489"><a href="#Hive-489"><span class="linenos">489</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">"CONCAT"</span><span class="p">),</span> -</span><span id="Hive-490"><a href="#Hive-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-491"><a href="#Hive-491"><span class="linenos">491</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">"SIZE"</span><span class="p">),</span> -</span><span id="Hive-492"><a href="#Hive-492"><span class="linenos">492</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-493"><a href="#Hive-493"><span class="linenos">493</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-494"><a href="#Hive-494"><span class="linenos">494</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-495"><a href="#Hive-495"><span class="linenos">495</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-496"><a href="#Hive-496"><span class="linenos">496</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> -</span><span id="Hive-497"><a href="#Hive-497"><span class="linenos">497</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-498"><a href="#Hive-498"><span class="linenos">498</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive-499"><a href="#Hive-499"><span class="linenos">499</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> -</span><span id="Hive-500"><a href="#Hive-500"><span class="linenos">500</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive-501"><a href="#Hive-501"><span class="linenos">501</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> -</span><span id="Hive-502"><a href="#Hive-502"><span class="linenos">502</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><span id="Hive-503"><a href="#Hive-503"><span class="linenos">503</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> -</span><span id="Hive-504"><a href="#Hive-504"><span class="linenos">504</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">"UNBASE64"</span><span class="p">),</span> -</span><span id="Hive-505"><a href="#Hive-505"><span class="linenos">505</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-506"><a href="#Hive-506"><span class="linenos">506</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-507"><a href="#Hive-507"><span class="linenos">507</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">"ISNAN"</span><span class="p">),</span> -</span><span id="Hive-508"><a href="#Hive-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-509"><a href="#Hive-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-510"><a href="#Hive-510"><span class="linenos">510</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="Hive-511"><a href="#Hive-511"><span class="linenos">511</span></a> <span class="p">),</span> -</span><span id="Hive-512"><a href="#Hive-512"><span class="linenos">512</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-513"><a href="#Hive-513"><span class="linenos">513</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-514"><a href="#Hive-514"><span class="linenos">514</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-515"><a href="#Hive-515"><span class="linenos">515</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-516"><a href="#Hive-516"><span class="linenos">516</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">"UNHEX"</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">"MD5"</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-517"><a href="#Hive-517"><span class="linenos">517</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-518"><a href="#Hive-518"><span class="linenos">518</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">"MONTHS_BETWEEN"</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-519"><a href="#Hive-519"><span class="linenos">519</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> -</span><span id="Hive-520"><a href="#Hive-520"><span class="linenos">520</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> -</span><span id="Hive-521"><a href="#Hive-521"><span class="linenos">521</span></a> <span class="p">),</span> -</span><span id="Hive-522"><a href="#Hive-522"><span class="linenos">522</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-523"><a href="#Hive-523"><span class="linenos">523</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> -</span><span id="Hive-524"><a href="#Hive-524"><span class="linenos">524</span></a> <span class="p">[</span> -</span><span id="Hive-525"><a href="#Hive-525"><span class="linenos">525</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> -</span><span id="Hive-526"><a href="#Hive-526"><span class="linenos">526</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> -</span><span id="Hive-527"><a href="#Hive-527"><span class="linenos">527</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> -</span><span id="Hive-528"><a href="#Hive-528"><span class="linenos">528</span></a> <span class="p">]</span> -</span><span id="Hive-529"><a href="#Hive-529"><span class="linenos">529</span></a> <span class="p">),</span> -</span><span id="Hive-530"><a href="#Hive-530"><span class="linenos">530</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">"PERCENTILE"</span><span class="p">),</span> -</span><span id="Hive-531"><a href="#Hive-531"><span class="linenos">531</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">"PERCENTILE_APPROX"</span><span class="p">),</span> -</span><span id="Hive-532"><a href="#Hive-532"><span class="linenos">532</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-533"><a href="#Hive-533"><span class="linenos">533</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-534"><a href="#Hive-534"><span class="linenos">534</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">"RLIKE"</span><span class="p">),</span> -</span><span id="Hive-535"><a href="#Hive-535"><span class="linenos">535</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">"SPLIT"</span><span class="p">),</span> -</span><span id="Hive-536"><a href="#Hive-536"><span class="linenos">536</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-537"><a href="#Hive-537"><span class="linenos">537</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-538"><a href="#Hive-538"><span class="linenos">538</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-539"><a href="#Hive-539"><span class="linenos">539</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> -</span><span id="Hive-540"><a href="#Hive-540"><span class="linenos">540</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> -</span><span id="Hive-541"><a href="#Hive-541"><span class="linenos">541</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-542"><a href="#Hive-542"><span class="linenos">542</span></a> <span class="p">),</span> -</span><span id="Hive-543"><a href="#Hive-543"><span class="linenos">543</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-544"><a href="#Hive-544"><span class="linenos">544</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-545"><a href="#Hive-545"><span class="linenos">545</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-546"><a href="#Hive-546"><span class="linenos">546</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-547"><a href="#Hive-547"><span class="linenos">547</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-548"><a href="#Hive-548"><span class="linenos">548</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">"TO_DATE"</span><span class="p">),</span> -</span><span id="Hive-549"><a href="#Hive-549"><span class="linenos">549</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-550"><a href="#Hive-550"><span class="linenos">550</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="Hive-551"><a href="#Hive-551"><span class="linenos">551</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> -</span><span id="Hive-552"><a href="#Hive-552"><span class="linenos">552</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="Hive-553"><a href="#Hive-553"><span class="linenos">553</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">"BASE64"</span><span class="p">),</span> -</span><span id="Hive-554"><a href="#Hive-554"><span class="linenos">554</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive-555"><a href="#Hive-555"><span class="linenos">555</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> -</span><span id="Hive-556"><a href="#Hive-556"><span class="linenos">556</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> -</span><span id="Hive-557"><a href="#Hive-557"><span class="linenos">557</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> -</span><span id="Hive-558"><a href="#Hive-558"><span class="linenos">558</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-559"><a href="#Hive-559"><span class="linenos">559</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-560"><a href="#Hive-560"><span class="linenos">560</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-561"><a href="#Hive-561"><span class="linenos">561</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-562"><a href="#Hive-562"><span class="linenos">562</span></a> <span class="p">),</span> -</span><span id="Hive-563"><a href="#Hive-563"><span class="linenos">563</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> -</span><span id="Hive-564"><a href="#Hive-564"><span class="linenos">564</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">"FROM_UNIXTIME"</span><span class="p">),</span> -</span><span id="Hive-565"><a href="#Hive-565"><span class="linenos">565</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="Hive-566"><a href="#Hive-566"><span class="linenos">566</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">"WITH SERDEPROPERTIES"</span><span class="p">),</span> +</span><span id="Hive-447"><a href="#Hive-447"><span class="linenos">447</span></a> <span class="n">WITH_PROPERTIES_PREFIX</span> <span class="o">=</span> <span class="s2">"TBLPROPERTIES"</span> +</span><span id="Hive-448"><a href="#Hive-448"><span class="linenos">448</span></a> +</span><span id="Hive-449"><a href="#Hive-449"><span class="linenos">449</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</span><span class="p">,</span> +</span><span id="Hive-452"><a href="#Hive-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Subquery</span><span class="p">,</span> +</span><span id="Hive-453"><a href="#Hive-453"><span class="linenos">453</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> +</span><span id="Hive-454"><a href="#Hive-454"><span class="linenos">454</span></a> <span class="p">}</span> +</span><span id="Hive-455"><a href="#Hive-455"><span class="linenos">455</span></a> +</span><span id="Hive-456"><a href="#Hive-456"><span class="linenos">456</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</span><span class="p">,</span> +</span><span id="Hive-459"><a href="#Hive-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</span><span class="p">,</span> +</span><span id="Hive-460"><a href="#Hive-460"><span class="linenos">460</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> +</span><span id="Hive-461"><a href="#Hive-461"><span class="linenos">461</span></a> <span class="p">}</span> +</span><span id="Hive-462"><a href="#Hive-462"><span class="linenos">462</span></a> +</span><span id="Hive-463"><a href="#Hive-463"><span class="linenos">463</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive-464"><a href="#Hive-464"><span class="linenos">464</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-465"><a href="#Hive-465"><span class="linenos">465</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">"BOOLEAN"</span><span class="p">,</span> +</span><span id="Hive-466"><a href="#Hive-466"><span class="linenos">466</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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="Hive-467"><a href="#Hive-467"><span class="linenos">467</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</span><span class="p">,</span> +</span><span id="Hive-468"><a href="#Hive-468"><span class="linenos">468</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">"STRING"</span><span class="p">,</span> +</span><span id="Hive-469"><a href="#Hive-469"><span class="linenos">469</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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="Hive-470"><a href="#Hive-470"><span class="linenos">470</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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="Hive-471"><a href="#Hive-471"><span class="linenos">471</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">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> +</span><span id="Hive-472"><a href="#Hive-472"><span class="linenos">472</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">"BINARY"</span><span class="p">,</span> +</span><span id="Hive-473"><a href="#Hive-473"><span class="linenos">473</span></a> <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="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive-476"><a href="#Hive-476"><span class="linenos">476</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-477"><a href="#Hive-477"><span class="linenos">477</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-478"><a href="#Hive-478"><span class="linenos">478</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-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">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span> +</span><span id="Hive-481"><a href="#Hive-481"><span class="linenos">481</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-482"><a href="#Hive-482"><span class="linenos">482</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-483"><a href="#Hive-483"><span class="linenos">483</span></a> <span class="p">]</span> +</span><span id="Hive-484"><a href="#Hive-484"><span class="linenos">484</span></a> <span class="p">),</span> +</span><span id="Hive-485"><a href="#Hive-485"><span class="linenos">485</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-486"><a href="#Hive-486"><span class="linenos">486</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</span><span class="p">),</span> +</span><span id="Hive-487"><a href="#Hive-487"><span class="linenos">487</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-488"><a href="#Hive-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</span><span class="p">),</span> +</span><span id="Hive-489"><a href="#Hive-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> +</span><span id="Hive-490"><a href="#Hive-490"><span class="linenos">490</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">"CONCAT"</span><span class="p">),</span> +</span><span id="Hive-491"><a href="#Hive-491"><span class="linenos">491</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-492"><a href="#Hive-492"><span class="linenos">492</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">"SIZE"</span><span class="p">),</span> +</span><span id="Hive-493"><a href="#Hive-493"><span class="linenos">493</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-494"><a href="#Hive-494"><span class="linenos">494</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-495"><a href="#Hive-495"><span class="linenos">495</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-496"><a href="#Hive-496"><span class="linenos">496</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-497"><a href="#Hive-497"><span class="linenos">497</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> +</span><span id="Hive-498"><a href="#Hive-498"><span class="linenos">498</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-499"><a href="#Hive-499"><span class="linenos">499</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive-500"><a href="#Hive-500"><span class="linenos">500</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> +</span><span id="Hive-501"><a href="#Hive-501"><span class="linenos">501</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive-502"><a href="#Hive-502"><span class="linenos">502</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> +</span><span id="Hive-503"><a href="#Hive-503"><span class="linenos">503</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><span id="Hive-504"><a href="#Hive-504"><span class="linenos">504</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> +</span><span id="Hive-505"><a href="#Hive-505"><span class="linenos">505</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">"UNBASE64"</span><span class="p">),</span> +</span><span id="Hive-506"><a href="#Hive-506"><span class="linenos">506</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-507"><a href="#Hive-507"><span class="linenos">507</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-508"><a href="#Hive-508"><span class="linenos">508</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">"ISNAN"</span><span class="p">),</span> +</span><span id="Hive-509"><a href="#Hive-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-510"><a href="#Hive-510"><span class="linenos">510</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-511"><a href="#Hive-511"><span class="linenos">511</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="Hive-512"><a href="#Hive-512"><span class="linenos">512</span></a> <span class="p">),</span> +</span><span id="Hive-513"><a href="#Hive-513"><span class="linenos">513</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-514"><a href="#Hive-514"><span class="linenos">514</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-515"><a href="#Hive-515"><span class="linenos">515</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-516"><a href="#Hive-516"><span class="linenos">516</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-517"><a href="#Hive-517"><span class="linenos">517</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">"UNHEX"</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">"MD5"</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-518"><a href="#Hive-518"><span class="linenos">518</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-519"><a href="#Hive-519"><span class="linenos">519</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">"MONTHS_BETWEEN"</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-520"><a href="#Hive-520"><span class="linenos">520</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> +</span><span id="Hive-521"><a href="#Hive-521"><span class="linenos">521</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> +</span><span id="Hive-522"><a href="#Hive-522"><span class="linenos">522</span></a> <span class="p">),</span> +</span><span id="Hive-523"><a href="#Hive-523"><span class="linenos">523</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-524"><a href="#Hive-524"><span class="linenos">524</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> +</span><span id="Hive-525"><a href="#Hive-525"><span class="linenos">525</span></a> <span class="p">[</span> +</span><span id="Hive-526"><a href="#Hive-526"><span class="linenos">526</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> +</span><span id="Hive-527"><a href="#Hive-527"><span class="linenos">527</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> +</span><span id="Hive-528"><a href="#Hive-528"><span class="linenos">528</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> +</span><span id="Hive-529"><a href="#Hive-529"><span class="linenos">529</span></a> <span class="p">]</span> +</span><span id="Hive-530"><a href="#Hive-530"><span class="linenos">530</span></a> <span class="p">),</span> +</span><span id="Hive-531"><a href="#Hive-531"><span class="linenos">531</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">"PERCENTILE"</span><span class="p">),</span> +</span><span id="Hive-532"><a href="#Hive-532"><span class="linenos">532</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">"PERCENTILE_APPROX"</span><span class="p">),</span> +</span><span id="Hive-533"><a href="#Hive-533"><span class="linenos">533</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-534"><a href="#Hive-534"><span class="linenos">534</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-535"><a href="#Hive-535"><span class="linenos">535</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">"RLIKE"</span><span class="p">),</span> +</span><span id="Hive-536"><a href="#Hive-536"><span class="linenos">536</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">"SPLIT"</span><span class="p">),</span> +</span><span id="Hive-537"><a href="#Hive-537"><span class="linenos">537</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-538"><a href="#Hive-538"><span class="linenos">538</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-539"><a href="#Hive-539"><span class="linenos">539</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-540"><a href="#Hive-540"><span class="linenos">540</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> +</span><span id="Hive-541"><a href="#Hive-541"><span class="linenos">541</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> +</span><span id="Hive-542"><a href="#Hive-542"><span class="linenos">542</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-543"><a href="#Hive-543"><span class="linenos">543</span></a> <span class="p">),</span> +</span><span id="Hive-544"><a href="#Hive-544"><span class="linenos">544</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-545"><a href="#Hive-545"><span class="linenos">545</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-546"><a href="#Hive-546"><span class="linenos">546</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-547"><a href="#Hive-547"><span class="linenos">547</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-548"><a href="#Hive-548"><span class="linenos">548</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-549"><a href="#Hive-549"><span class="linenos">549</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">"TO_DATE"</span><span class="p">),</span> +</span><span id="Hive-550"><a href="#Hive-550"><span class="linenos">550</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-551"><a href="#Hive-551"><span class="linenos">551</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="Hive-552"><a href="#Hive-552"><span class="linenos">552</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> +</span><span id="Hive-553"><a href="#Hive-553"><span class="linenos">553</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="Hive-554"><a href="#Hive-554"><span class="linenos">554</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">"BASE64"</span><span class="p">),</span> +</span><span id="Hive-555"><a href="#Hive-555"><span class="linenos">555</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive-556"><a href="#Hive-556"><span class="linenos">556</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> +</span><span id="Hive-557"><a href="#Hive-557"><span class="linenos">557</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> +</span><span id="Hive-558"><a href="#Hive-558"><span class="linenos">558</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> +</span><span id="Hive-559"><a href="#Hive-559"><span class="linenos">559</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-560"><a href="#Hive-560"><span class="linenos">560</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-561"><a href="#Hive-561"><span class="linenos">561</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-562"><a href="#Hive-562"><span class="linenos">562</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-563"><a href="#Hive-563"><span class="linenos">563</span></a> <span class="p">),</span> +</span><span id="Hive-564"><a href="#Hive-564"><span class="linenos">564</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> +</span><span id="Hive-565"><a href="#Hive-565"><span class="linenos">565</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">"FROM_UNIXTIME"</span><span class="p">),</span> +</span><span id="Hive-566"><a href="#Hive-566"><span class="linenos">566</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> </span><span id="Hive-567"><a href="#Hive-567"><span class="linenos">567</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">"FORMAT_NUMBER"</span><span class="p">),</span> </span><span id="Hive-568"><a href="#Hive-568"><span class="linenos">568</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">""</span><span class="p">),</span> </span><span id="Hive-569"><a href="#Hive-569"><span class="linenos">569</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ClusteredColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> @@ -1402,99 +1426,117 @@ </span><span id="Hive-573"><a href="#Hive-573"><span class="linenos">573</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotForReplicationColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="Hive-574"><a href="#Hive-574"><span class="linenos">574</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnProperty</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="Hive-575"><a href="#Hive-575"><span class="linenos">575</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PrimaryKeyColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"PRIMARY KEY"</span><span class="p">,</span> -</span><span id="Hive-576"><a href="#Hive-576"><span class="linenos">576</span></a> <span class="p">}</span> -</span><span id="Hive-577"><a href="#Hive-577"><span class="linenos">577</span></a> -</span><span id="Hive-578"><a href="#Hive-578"><span class="linenos">578</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive-579"><a href="#Hive-579"><span class="linenos">579</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-580"><a href="#Hive-580"><span class="linenos">580</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-581"><a href="#Hive-581"><span class="linenos">581</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-582"><a href="#Hive-582"><span class="linenos">582</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-583"><a href="#Hive-583"><span class="linenos">583</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-584"><a href="#Hive-584"><span class="linenos">584</span></a> <span class="p">}</span> -</span><span id="Hive-585"><a href="#Hive-585"><span class="linenos">585</span></a> -</span><span id="Hive-586"><a href="#Hive-586"><span class="linenos">586</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-587"><a href="#Hive-587"><span class="linenos">587</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">):</span> -</span><span id="Hive-588"><a href="#Hive-588"><span class="linenos">588</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> -</span><span id="Hive-589"><a href="#Hive-589"><span class="linenos">589</span></a> <span class="k">return</span> <span class="s2">""</span> -</span><span id="Hive-590"><a href="#Hive-590"><span class="linenos">590</span></a> -</span><span id="Hive-591"><a href="#Hive-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive-592"><a href="#Hive-592"><span class="linenos">592</span></a> -</span><span id="Hive-593"><a href="#Hive-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-594"><a href="#Hive-594"><span class="linenos">594</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive-595"><a href="#Hive-595"><span class="linenos">595</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> -</span><span id="Hive-596"><a href="#Hive-596"><span class="linenos">596</span></a> -</span><span id="Hive-597"><a href="#Hive-597"><span class="linenos">597</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> -</span><span id="Hive-598"><a href="#Hive-598"><span class="linenos">598</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> -</span><span id="Hive-599"><a href="#Hive-599"><span class="linenos">599</span></a> -</span><span id="Hive-600"><a href="#Hive-600"><span class="linenos">600</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> -</span><span id="Hive-601"><a href="#Hive-601"><span class="linenos">601</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> -</span><span id="Hive-602"><a href="#Hive-602"><span class="linenos">602</span></a> <span class="k">return</span> <span class="n">this</span> -</span><span id="Hive-603"><a href="#Hive-603"><span class="linenos">603</span></a> -</span><span id="Hive-604"><a href="#Hive-604"><span class="linenos">604</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> -</span><span id="Hive-605"><a href="#Hive-605"><span class="linenos">605</span></a> -</span><span id="Hive-606"><a href="#Hive-606"><span class="linenos">606</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-607"><a href="#Hive-607"><span class="linenos">607</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> -</span><span id="Hive-608"><a href="#Hive-608"><span class="linenos">608</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> -</span><span id="Hive-609"><a href="#Hive-609"><span class="linenos">609</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> -</span><span id="Hive-610"><a href="#Hive-610"><span class="linenos">610</span></a> -</span><span id="Hive-611"><a href="#Hive-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive-612"><a href="#Hive-612"><span class="linenos">612</span></a> -</span><span id="Hive-613"><a href="#Hive-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-614"><a href="#Hive-614"><span class="linenos">614</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> -</span><span id="Hive-615"><a href="#Hive-615"><span class="linenos">615</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> -</span><span id="Hive-616"><a href="#Hive-616"><span class="linenos">616</span></a> -</span><span id="Hive-617"><a href="#Hive-617"><span class="linenos">617</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive-618"><a href="#Hive-618"><span class="linenos">618</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Hive-619"><a href="#Hive-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> -</span><span id="Hive-620"><a href="#Hive-620"><span class="linenos">620</span></a> -</span><span id="Hive-621"><a href="#Hive-621"><span class="linenos">621</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-622"><a href="#Hive-622"><span class="linenos">622</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">"serde_properties"</span><span class="p">)</span> -</span><span id="Hive-623"><a href="#Hive-623"><span class="linenos">623</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="Hive-624"><a href="#Hive-624"><span class="linenos">624</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> -</span><span id="Hive-625"><a href="#Hive-625"><span class="linenos">625</span></a> -</span><span id="Hive-626"><a href="#Hive-626"><span class="linenos">626</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-627"><a href="#Hive-627"><span class="linenos">627</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-628"><a href="#Hive-628"><span class="linenos">628</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> -</span><span id="Hive-629"><a href="#Hive-629"><span class="linenos">629</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-630"><a href="#Hive-630"><span class="linenos">630</span></a> <span class="p">)</span> -</span><span id="Hive-631"><a href="#Hive-631"><span class="linenos">631</span></a> -</span><span id="Hive-632"><a href="#Hive-632"><span class="linenos">632</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-633"><a href="#Hive-633"><span class="linenos">633</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">"TBLPROPERTIES"</span><span class="p">))</span> -</span><span id="Hive-634"><a href="#Hive-634"><span class="linenos">634</span></a> -</span><span id="Hive-635"><a href="#Hive-635"><span class="linenos">635</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-636"><a href="#Hive-636"><span class="linenos">636</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> -</span><span id="Hive-637"><a href="#Hive-637"><span class="linenos">637</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> -</span><span id="Hive-638"><a href="#Hive-638"><span class="linenos">638</span></a> <span class="p">):</span> -</span><span id="Hive-639"><a href="#Hive-639"><span class="linenos">639</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">"text"</span><span class="p">)</span> -</span><span id="Hive-640"><a href="#Hive-640"><span class="linenos">640</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> -</span><span id="Hive-641"><a href="#Hive-641"><span class="linenos">641</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> -</span><span id="Hive-642"><a href="#Hive-642"><span class="linenos">642</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-643"><a href="#Hive-643"><span class="linenos">643</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-644"><a href="#Hive-644"><span class="linenos">644</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">"float"</span><span class="p">):</span> -</span><span id="Hive-645"><a href="#Hive-645"><span class="linenos">645</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">DataTypeParam</span><span class="p">)</span> -</span><span id="Hive-646"><a href="#Hive-646"><span class="linenos">646</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> -</span><span id="Hive-647"><a href="#Hive-647"><span class="linenos">647</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-648"><a href="#Hive-648"><span class="linenos">648</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="Hive-649"><a href="#Hive-649"><span class="linenos">649</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> -</span><span id="Hive-650"><a href="#Hive-650"><span class="linenos">650</span></a> <span class="p">)</span> +</span><span id="Hive-576"><a href="#Hive-576"><span class="linenos">576</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="Hive-577"><a href="#Hive-577"><span class="linenos">577</span></a> <span class="p">}</span> +</span><span id="Hive-578"><a href="#Hive-578"><span class="linenos">578</span></a> +</span><span id="Hive-579"><a href="#Hive-579"><span class="linenos">579</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive-580"><a href="#Hive-580"><span class="linenos">580</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-581"><a href="#Hive-581"><span class="linenos">581</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-582"><a href="#Hive-582"><span class="linenos">582</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-583"><a href="#Hive-583"><span class="linenos">583</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-584"><a href="#Hive-584"><span class="linenos">584</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-585"><a href="#Hive-585"><span class="linenos">585</span></a> <span class="p">}</span> +</span><span id="Hive-586"><a href="#Hive-586"><span class="linenos">586</span></a> +</span><span id="Hive-587"><a href="#Hive-587"><span class="linenos">587</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-588"><a href="#Hive-588"><span class="linenos">588</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">):</span> +</span><span id="Hive-589"><a href="#Hive-589"><span class="linenos">589</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> +</span><span id="Hive-590"><a href="#Hive-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="s2">""</span> +</span><span id="Hive-591"><a href="#Hive-591"><span class="linenos">591</span></a> +</span><span id="Hive-592"><a href="#Hive-592"><span class="linenos">592</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive-593"><a href="#Hive-593"><span class="linenos">593</span></a> +</span><span id="Hive-594"><a href="#Hive-594"><span class="linenos">594</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-595"><a href="#Hive-595"><span class="linenos">595</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive-596"><a href="#Hive-596"><span class="linenos">596</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> +</span><span id="Hive-597"><a href="#Hive-597"><span class="linenos">597</span></a> +</span><span id="Hive-598"><a href="#Hive-598"><span class="linenos">598</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> +</span><span id="Hive-599"><a href="#Hive-599"><span class="linenos">599</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> +</span><span id="Hive-600"><a href="#Hive-600"><span class="linenos">600</span></a> +</span><span id="Hive-601"><a href="#Hive-601"><span class="linenos">601</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> +</span><span id="Hive-602"><a href="#Hive-602"><span class="linenos">602</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> +</span><span id="Hive-603"><a href="#Hive-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="n">this</span> +</span><span id="Hive-604"><a href="#Hive-604"><span class="linenos">604</span></a> +</span><span id="Hive-605"><a href="#Hive-605"><span class="linenos">605</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> +</span><span id="Hive-606"><a href="#Hive-606"><span class="linenos">606</span></a> +</span><span id="Hive-607"><a href="#Hive-607"><span class="linenos">607</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-608"><a href="#Hive-608"><span class="linenos">608</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> +</span><span id="Hive-609"><a href="#Hive-609"><span class="linenos">609</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> +</span><span id="Hive-610"><a href="#Hive-610"><span class="linenos">610</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> +</span><span id="Hive-611"><a href="#Hive-611"><span class="linenos">611</span></a> +</span><span id="Hive-612"><a href="#Hive-612"><span class="linenos">612</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive-613"><a href="#Hive-613"><span class="linenos">613</span></a> +</span><span id="Hive-614"><a href="#Hive-614"><span class="linenos">614</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-615"><a href="#Hive-615"><span class="linenos">615</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> +</span><span id="Hive-616"><a href="#Hive-616"><span class="linenos">616</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> +</span><span id="Hive-617"><a href="#Hive-617"><span class="linenos">617</span></a> +</span><span id="Hive-618"><a href="#Hive-618"><span class="linenos">618</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive-619"><a href="#Hive-619"><span class="linenos">619</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive-620"><a href="#Hive-620"><span class="linenos">620</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive-621"><a href="#Hive-621"><span class="linenos">621</span></a> +</span><span id="Hive-622"><a href="#Hive-622"><span class="linenos">622</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-623"><a href="#Hive-623"><span class="linenos">623</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">"serde_properties"</span><span class="p">)</span> +</span><span id="Hive-624"><a href="#Hive-624"><span class="linenos">624</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-625"><a href="#Hive-625"><span class="linenos">625</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive-626"><a href="#Hive-626"><span class="linenos">626</span></a> +</span><span id="Hive-627"><a href="#Hive-627"><span class="linenos">627</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-628"><a href="#Hive-628"><span class="linenos">628</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-629"><a href="#Hive-629"><span class="linenos">629</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> +</span><span id="Hive-630"><a href="#Hive-630"><span class="linenos">630</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-631"><a href="#Hive-631"><span class="linenos">631</span></a> <span class="p">)</span> +</span><span id="Hive-632"><a href="#Hive-632"><span class="linenos">632</span></a> +</span><span id="Hive-633"><a href="#Hive-633"><span class="linenos">633</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-634"><a href="#Hive-634"><span class="linenos">634</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> +</span><span id="Hive-635"><a href="#Hive-635"><span class="linenos">635</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> +</span><span id="Hive-636"><a href="#Hive-636"><span class="linenos">636</span></a> <span class="p">):</span> +</span><span id="Hive-637"><a href="#Hive-637"><span class="linenos">637</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">"text"</span><span class="p">)</span> +</span><span id="Hive-638"><a href="#Hive-638"><span class="linenos">638</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> +</span><span id="Hive-639"><a href="#Hive-639"><span class="linenos">639</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> +</span><span id="Hive-640"><a href="#Hive-640"><span class="linenos">640</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-641"><a href="#Hive-641"><span class="linenos">641</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-642"><a href="#Hive-642"><span class="linenos">642</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">"float"</span><span class="p">):</span> +</span><span id="Hive-643"><a href="#Hive-643"><span class="linenos">643</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">DataTypeParam</span><span class="p">)</span> +</span><span id="Hive-644"><a href="#Hive-644"><span class="linenos">644</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> +</span><span id="Hive-645"><a href="#Hive-645"><span class="linenos">645</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-646"><a href="#Hive-646"><span class="linenos">646</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="Hive-647"><a href="#Hive-647"><span class="linenos">647</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> +</span><span id="Hive-648"><a href="#Hive-648"><span class="linenos">648</span></a> <span class="p">)</span> +</span><span id="Hive-649"><a href="#Hive-649"><span class="linenos">649</span></a> +</span><span id="Hive-650"><a href="#Hive-650"><span class="linenos">650</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-651"><a href="#Hive-651"><span class="linenos">651</span></a> -</span><span id="Hive-652"><a href="#Hive-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive-653"><a href="#Hive-653"><span class="linenos">653</span></a> -</span><span id="Hive-654"><a href="#Hive-654"><span class="linenos">654</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-655"><a href="#Hive-655"><span class="linenos">655</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive-656"><a href="#Hive-656"><span class="linenos">656</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Hive-657"><a href="#Hive-657"><span class="linenos">657</span></a> -</span><span id="Hive-658"><a href="#Hive-658"><span class="linenos">658</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive-659"><a href="#Hive-659"><span class="linenos">659</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Hive-660"><a href="#Hive-660"><span class="linenos">660</span></a> -</span><span id="Hive-661"><a href="#Hive-661"><span class="linenos">661</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> -</span><span id="Hive-662"><a href="#Hive-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> -</span><span id="Hive-663"><a href="#Hive-663"><span class="linenos">663</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> -</span><span id="Hive-664"><a href="#Hive-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-665"><a href="#Hive-665"><span class="linenos">665</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Hive-666"><a href="#Hive-666"><span class="linenos">666</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="Hive-652"><a href="#Hive-652"><span class="linenos">652</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-653"><a href="#Hive-653"><span class="linenos">653</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive-654"><a href="#Hive-654"><span class="linenos">654</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Hive-655"><a href="#Hive-655"><span class="linenos">655</span></a> +</span><span id="Hive-656"><a href="#Hive-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-657"><a href="#Hive-657"><span class="linenos">657</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Hive-658"><a href="#Hive-658"><span class="linenos">658</span></a> +</span><span id="Hive-659"><a href="#Hive-659"><span class="linenos">659</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> +</span><span id="Hive-660"><a href="#Hive-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> +</span><span id="Hive-661"><a href="#Hive-661"><span class="linenos">661</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> +</span><span id="Hive-662"><a href="#Hive-662"><span class="linenos">662</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-663"><a href="#Hive-663"><span class="linenos">663</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Hive-664"><a href="#Hive-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="Hive-665"><a href="#Hive-665"><span class="linenos">665</span></a> +</span><span id="Hive-666"><a href="#Hive-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> </span><span id="Hive-667"><a href="#Hive-667"><span class="linenos">667</span></a> -</span><span id="Hive-668"><a href="#Hive-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> +</span><span id="Hive-668"><a href="#Hive-668"><span class="linenos">668</span></a> <span class="k">def</span> <span class="nf">alterset_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">AlterSet</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-669"><a href="#Hive-669"><span class="linenos">669</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive-670"><a href="#Hive-670"><span class="linenos">670</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">exprs</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-671"><a href="#Hive-671"><span class="linenos">671</span></a> <span class="n">location</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">"location"</span><span class="p">)</span> +</span><span id="Hive-672"><a href="#Hive-672"><span class="linenos">672</span></a> <span class="n">location</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" LOCATION </span><span class="si">{</span><span class="n">location</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">location</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-673"><a href="#Hive-673"><span class="linenos">673</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"file_format"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">)</span> +</span><span id="Hive-674"><a href="#Hive-674"><span class="linenos">674</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" FILEFORMAT </span><span class="si">{</span><span class="n">file_format</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">file_format</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-675"><a href="#Hive-675"><span class="linenos">675</span></a> <span class="n">serde</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">"serde"</span><span class="p">)</span> +</span><span id="Hive-676"><a href="#Hive-676"><span class="linenos">676</span></a> <span class="n">serde</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" SERDE </span><span class="si">{</span><span class="n">serde</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-677"><a href="#Hive-677"><span class="linenos">677</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"tag"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">""</span><span class="p">)</span> +</span><span id="Hive-678"><a href="#Hive-678"><span class="linenos">678</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" TAGS </span><span class="si">{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">tags</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-679"><a href="#Hive-679"><span class="linenos">679</span></a> +</span><span id="Hive-680"><a href="#Hive-680"><span class="linenos">680</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"SET</span><span class="si">{</span><span class="n">serde</span><span class="si">}{</span><span class="n">exprs</span><span class="si">}{</span><span class="n">location</span><span class="si">}{</span><span class="n">file_format</span><span class="si">}{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive-681"><a href="#Hive-681"><span class="linenos">681</span></a> +</span><span id="Hive-682"><a href="#Hive-682"><span class="linenos">682</span></a> <span class="k">def</span> <span class="nf">serdeproperties_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">SerdeProperties</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive-683"><a href="#Hive-683"><span class="linenos">683</span></a> <span class="n">prefix</span> <span class="o">=</span> <span class="s2">"WITH "</span> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"with"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive-684"><a href="#Hive-684"><span class="linenos">684</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive-685"><a href="#Hive-685"><span class="linenos">685</span></a> +</span><span id="Hive-686"><a href="#Hive-686"><span class="linenos">686</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">SERDEPROPERTIES (</span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">)"</span> </span></pre></div> @@ -1957,7 +1999,7 @@ </span><span id="Hive.Tokenizer-255"><a href="#Hive.Tokenizer-255"><span class="linenos">255</span></a> <span class="s2">"REFRESH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFRESH</span><span class="p">,</span> </span><span id="Hive.Tokenizer-256"><a href="#Hive.Tokenizer-256"><span class="linenos">256</span></a> <span class="s2">"TIMESTAMP AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP_SNAPSHOT</span><span class="p">,</span> </span><span id="Hive.Tokenizer-257"><a href="#Hive.Tokenizer-257"><span class="linenos">257</span></a> <span class="s2">"VERSION AS OF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VERSION_SNAPSHOT</span><span class="p">,</span> -</span><span id="Hive.Tokenizer-258"><a href="#Hive.Tokenizer-258"><span class="linenos">258</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> +</span><span id="Hive.Tokenizer-258"><a href="#Hive.Tokenizer-258"><span class="linenos">258</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SERDE_PROPERTIES</span><span class="p">,</span> </span><span id="Hive.Tokenizer-259"><a href="#Hive.Tokenizer-259"><span class="linenos">259</span></a> <span class="p">}</span> </span><span id="Hive.Tokenizer-260"><a href="#Hive.Tokenizer-260"><span class="linenos">260</span></a> </span><span id="Hive.Tokenizer-261"><a href="#Hive.Tokenizer-261"><span class="linenos">261</span></a> <span class="n">NUMERIC_LITERALS</span> <span class="o">=</span> <span class="p">{</span> @@ -2026,7 +2068,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">{'{%': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%-': <TokenType.BLOCK_START: 'BLOCK_START'>, '%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '+%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '{{+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{{-': <TokenType.BLOCK_START: 'BLOCK_START'>, '+}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '/*+': <TokenType.HINT: 'HINT'>, '==': <TokenType.EQ: 'EQ'>, '::': <TokenType.DCOLON: 'DCOLON'>, '||': <TokenType.DPIPE: 'DPIPE'>, '>=': <TokenType.GTE: 'GTE'>, '<=': <TokenType.LTE: 'LTE'>, '<>': <TokenType.NEQ: 'NEQ'>, '!=': <TokenType.NEQ: 'NEQ'>, ':=': <TokenType.COLON_EQ: 'COLON_EQ'>, '<=>': <TokenType.NULLSAFE_EQ: 'NULLSAFE_EQ'>, '->': <TokenType.ARROW: 'ARROW'>, '->>': <TokenType.DARROW: 'DARROW'>, '=>': <TokenType.FARROW: 'FARROW'>, '#>': <TokenType.HASH_ARROW: 'HASH_ARROW'>, '#>>': <TokenType.DHASH_ARROW: 'DHASH_ARROW'>, '<->': <TokenType.LR_ARROW: 'LR_ARROW'>, '&&': <TokenType.DAMP: 'DAMP'>, '??': <TokenType.DQMARK: 'DQMARK'>, 'ALL': <TokenType.ALL: 'ALL'>, 'ALWAYS': <TokenType.ALWAYS: 'ALWAYS'>, 'AND': <TokenType.AND: 'AND'>, 'ANTI': <TokenType.ANTI: 'ANTI'>, 'ANY': <TokenType.ANY: 'ANY'>, 'ASC': <TokenType.ASC: 'ASC'>, 'AS': <TokenType.ALIAS: 'ALIAS'>, 'ASOF': <TokenType.ASOF: 'ASOF'>, 'AUTOINCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'AUTO_INCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'BEGIN': <TokenType.BEGIN: 'BEGIN'>, 'BETWEEN': <TokenType.BETWEEN: 'BETWEEN'>, 'CACHE': <TokenType.CACHE: 'CACHE'>, 'UNCACHE': <TokenType.UNCACHE: 'UNCACHE'>, 'CASE': <TokenType.CASE: 'CASE'>, 'CHARACTER SET': <TokenType.CHARACTER_SET: 'CHARACTER_SET'>, 'CLUSTER BY': <TokenType.CLUSTER_BY: 'CLUSTER_BY'>, 'COLLATE': <TokenType.COLLATE: 'COLLATE'>, 'COLUMN': <TokenType.COLUMN: 'COLUMN'>, 'COMMIT': <TokenType.COMMIT: 'COMMIT'>, 'CONNECT BY': <TokenType.CONNECT_BY: 'CONNECT_BY'>, 'CONSTRAINT': <TokenType.CONSTRAINT: 'CONSTRAINT'>, 'COPY': <TokenType.COPY: 'COPY'>, 'CREATE': <TokenType.CREATE: 'CREATE'>, 'CROSS': <TokenType.CROSS: 'CROSS'>, 'CUBE': <TokenType.CUBE: 'CUBE'>, 'CURRENT_DATE': <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, 'CURRENT_TIME': <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, 'CURRENT_TIMESTAMP': <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, 'CURRENT_USER': <TokenType.CURRENT_USER: 'CURRENT_USER'>, 'DATABASE': <TokenType.DATABASE: 'DATABASE'>, 'DEFAULT': <TokenType.DEFAULT: 'DEFAULT'>, 'DELETE': <TokenType.DELETE: 'DELETE'>, 'DESC': <TokenType.DESC: 'DESC'>, 'DESCRIBE': <TokenType.DESCRIBE: 'DESCRIBE'>, 'DISTINCT': <TokenType.DISTINCT: 'DISTINCT'>, 'DISTRIBUTE BY': <TokenType.DISTRIBUTE_BY: 'DISTRIBUTE_BY'>, 'DIV': <TokenType.DIV: 'DIV'>, 'DROP': <TokenType.DROP: 'DROP'>, 'ELSE': <TokenType.ELSE: 'ELSE'>, 'END': <TokenType.END: 'END'>, 'ENUM': <TokenType.ENUM: 'ENUM'>, 'ESCAPE': <TokenType.ESCAPE: 'ESCAPE'>, 'EXCEPT': <TokenType.EXCEPT: 'EXCEPT'>, 'EXECUTE': <TokenType.EXECUTE: 'EXECUTE'>, 'EXISTS': <TokenType.EXISTS: 'EXISTS'>, 'FALSE': <TokenType.FALSE: 'FALSE'>, 'FETCH': <TokenType.FETCH: 'FETCH'>, 'FILTER': <TokenType.FILTER: 'FILTER'>, 'FIRST': <TokenType.FIRST: 'FIRST'>, 'FULL': <TokenType.FULL: 'FULL'>, 'FUNCTION': <TokenType.FUNCTION: 'FUNCTION'>, 'FOR': <TokenType.FOR: 'FOR'>, 'FOREIGN KEY': <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, 'FORMAT': <TokenType.FORMAT: 'FORMAT'>, 'FROM': <TokenType.FROM: 'FROM'>, 'GEOGRAPHY': <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, 'GEOMETRY': <TokenType.GEOMETRY: 'GEOMETRY'>, 'GLOB': <TokenType.GLOB: 'GLOB'>, 'GROUP BY': <TokenType.GROUP_BY: 'GROUP_BY'>, 'GROUPING SETS': <TokenType.GROUPING_SETS: 'GROUPING_SETS'>, 'HAVING': <TokenType.HAVING: 'HAVING'>, 'ILIKE': <TokenType.ILIKE: 'ILIKE'>, 'IN': <TokenType.IN: 'IN'>, 'INDEX': <TokenType.INDEX: 'INDEX'>, 'INET': <TokenType.INET: 'INET'>, 'INNER': <TokenType.INNER: 'INNER'>, 'INSERT': <TokenType.INSERT: 'INSERT'>, 'INTERVAL': <TokenType.INTERVAL: 'INTERVAL'>, 'INTERSECT': <TokenType.INTERSECT: 'INTERSECT'>, 'INTO': <TokenType.INTO: 'INTO'>, 'IS': <TokenType.IS: 'IS'>, 'ISNULL': <TokenType.ISNULL: 'ISNULL'>, 'JOIN': <TokenType.JOIN: 'JOIN'>, 'KEEP': <TokenType.KEEP: 'KEEP'>, 'KILL': <TokenType.KILL: 'KILL'>, 'LATERAL': <TokenType.LATERAL: 'LATERAL'>, 'LEFT': <TokenType.LEFT: 'LEFT'>, 'LIKE': <TokenType.LIKE: 'LIKE'>, 'LIMIT': <TokenType.LIMIT: 'LIMIT'>, 'LOAD': <TokenType.LOAD: 'LOAD'>, 'LOCK': <TokenType.LOCK: 'LOCK'>, 'MERGE': <TokenType.MERGE: 'MERGE'>, 'NATURAL': <TokenType.NATURAL: 'NATURAL'>, 'NEXT': <TokenType.NEXT: 'NEXT'>, 'NOT': <TokenType.NOT: 'NOT'>, 'NOTNULL': <TokenType.NOTNULL: 'NOTNULL'>, 'NULL': <TokenType.NULL: 'NULL'>, 'OBJECT': <TokenType.OBJECT: 'OBJECT'>, 'OFFSET': <TokenType.OFFSET: 'OFFSET'>, 'ON': <TokenType.ON: 'ON'>, 'OR': <TokenType.OR: 'OR'>, 'XOR': <TokenType.XOR: 'XOR'>, 'ORDER BY': <TokenType.ORDER_BY: 'ORDER_BY'>, 'ORDINALITY': <TokenType.ORDINALITY: 'ORDINALITY'>, 'OUTER': <TokenType.OUTER: 'OUTER'>, 'OVER': <TokenType.OVER: 'OVER'>, 'OVERLAPS': <TokenType.OVERLAPS: 'OVERLAPS'>, 'OVERWRITE': <TokenType.OVERWRITE: 'OVERWRITE'>, 'PARTITION': <TokenType.PARTITION: 'PARTITION'>, 'PARTITION BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED_BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PERCENT': <TokenType.PERCENT: 'PERCENT'>, 'PIVOT': <TokenType.PIVOT: 'PIVOT'>, 'PRAGMA': <TokenType.PRAGMA: 'PRAGMA'>, 'PRIMARY KEY': <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, 'PROCEDURE': <TokenType.PROCEDURE: 'PROCEDURE'>, 'QUALIFY': <TokenType.QUALIFY: 'QUALIFY'>, 'RANGE': <TokenType.RANGE: 'RANGE'>, 'RECURSIVE': <TokenType.RECURSIVE: 'RECURSIVE'>, 'REGEXP': <TokenType.RLIKE: 'RLIKE'>, 'REPLACE': <TokenType.REPLACE: 'REPLACE'>, 'RETURNING': <TokenType.RETURNING: 'RETURNING'>, 'REFERENCES': <TokenType.REFERENCES: 'REFERENCES'>, 'RIGHT': <TokenType.RIGHT: 'RIGHT'>, 'RLIKE': <TokenType.RLIKE: 'RLIKE'>, 'ROLLBACK': <TokenType.ROLLBACK: 'ROLLBACK'>, 'ROLLUP': <TokenType.ROLLUP: 'ROLLUP'>, 'ROW': <TokenType.ROW: 'ROW'>, 'ROWS': <TokenType.ROWS: 'ROWS'>, 'SCHEMA': <TokenType.SCHEMA: 'SCHEMA'>, 'SELECT': <TokenType.SELECT: 'SELECT'>, 'SEMI': <TokenType.SEMI: 'SEMI'>, 'SET': <TokenType.SET: 'SET'>, 'SETTINGS': <TokenType.SETTINGS: 'SETTINGS'>, 'SHOW': <TokenType.SHOW: 'SHOW'>, 'SIMILAR TO': <TokenType.SIMILAR_TO: 'SIMILAR_TO'>, 'SOME': <TokenType.SOME: 'SOME'>, 'SORT BY': <TokenType.SORT_BY: 'SORT_BY'>, 'START WITH': <TokenType.START_WITH: 'START_WITH'>, 'TABLE': <TokenType.TABLE: 'TABLE'>, 'TABLESAMPLE': <TokenType.TABLE_SAMPLE: 'TABLE_SAMPLE'>, 'TEMP': <TokenType.TEMPORARY: 'TEMPORARY'>, 'TEMPORARY': <TokenType.TEMPORARY: 'TEMPORARY'>, 'THEN': <TokenType.THEN: 'THEN'>, 'TRUE': <TokenType.TRUE: 'TRUE'>, 'TRUNCATE': <TokenType.TRUNCATE: 'TRUNCATE'>, 'UNION': <TokenType.UNION: 'UNION'>, 'UNKNOWN': <TokenType.UNKNOWN: 'UNKNOWN'>, 'UNNEST': <TokenType.UNNEST: 'UNNEST'>, 'UNPIVOT': <TokenType.UNPIVOT: 'UNPIVOT'>, 'UPDATE': <TokenType.UPDATE: 'UPDATE'>, 'USE': <TokenType.USE: 'USE'>, 'USING': <TokenType.USING: 'USING'>, 'UUID': <TokenType.UUID: 'UUID'>, 'VALUES': <TokenType.VALUES: 'VALUES'>, 'VIEW': <TokenType.VIEW: 'VIEW'>, 'VOLATILE': <TokenType.VOLATILE: 'VOLATILE'>, 'WHEN': <TokenType.WHEN: 'WHEN'>, 'WHERE': <TokenType.WHERE: 'WHERE'>, 'WINDOW': <TokenType.WINDOW: 'WINDOW'>, 'WITH': <TokenType.WITH: 'WITH'>, 'APPLY': <TokenType.APPLY: 'APPLY'>, 'ARRAY': <TokenType.ARRAY: 'ARRAY'>, 'BIT': <TokenType.BIT: 'BIT'>, 'BOOL': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BOOLEAN': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BYTE': <TokenType.TINYINT: 'TINYINT'>, 'MEDIUMINT': <TokenType.MEDIUMINT: 'MEDIUMINT'>, 'INT1': <TokenType.TINYINT: 'TINYINT'>, 'TINYINT': <TokenType.TINYINT: 'TINYINT'>, 'INT16': <TokenType.SMALLINT: 'SMALLINT'>, 'SHORT': <TokenType.SMALLINT: 'SMALLINT'>, 'SMALLINT': <TokenType.SMALLINT: 'SMALLINT'>, 'INT128': <TokenType.INT128: 'INT128'>, 'HUGEINT': <TokenType.INT128: 'INT128'>, 'INT2': <TokenType.SMALLINT: 'SMALLINT'>, 'INTEGER': <TokenType.INT: 'INT'>, 'INT': <TokenType.INT: 'INT'>, 'INT4': <TokenType.INT: 'INT'>, 'INT32': <TokenType.INT: 'INT'>, 'INT64': <TokenType.BIGINT: 'BIGINT'>, 'LONG': <TokenType.BIGINT: 'BIGINT'>, 'BIGINT': <TokenType.BIGINT: 'BIGINT'>, 'INT8': <TokenType.TINYINT: 'TINYINT'>, 'UINT': <TokenType.UINT: 'UINT'>, 'DEC': <TokenType.DECIMAL: 'DECIMAL'>, 'DECIMAL': <TokenType.DECIMAL: 'DECIMAL'>, 'BIGDECIMAL': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'BIGNUMERIC': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'MAP': <TokenType.MAP: 'MAP'>, 'NULLABLE': <TokenType.NULLABLE: 'NULLABLE'>, 'NUMBER': <TokenType.DECIMAL: 'DECIMAL'>, 'NUMERIC': <TokenType.DECIMAL: 'DECIMAL'>, 'FIXED': <TokenType.DECIMAL: 'DECIMAL'>, 'REAL': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT4': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT8': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE PRECISION': <TokenType.DOUBLE: 'DOUBLE'>, 'JSON': <TokenType.JSON: 'JSON'>, 'CHAR': <TokenType.CHAR: 'CHAR'>, 'CHARACTER': <TokenType.CHAR: 'CHAR'>, 'NCHAR': <TokenType.NCHAR: 'NCHAR'>, 'VARCHAR': <TokenType.VARCHAR: 'VARCHAR'>, 'VARCHAR2': <TokenType.VARCHAR: 'VARCHAR'>, 'NVARCHAR': <TokenType.NVARCHAR: 'NVARCHAR'>, 'NVARCHAR2': <TokenType.NVARCHAR: 'NVARCHAR'>, 'BPCHAR': <TokenType.BPCHAR: 'BPCHAR'>, 'STR': <TokenType.TEXT: 'TEXT'>, 'STRING': <TokenType.TEXT: 'TEXT'>, 'TEXT': <TokenType.TEXT: 'TEXT'>, 'LONGTEXT': <TokenType.LONGTEXT: 'LONGTEXT'>, 'MEDIUMTEXT': <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, 'TINYTEXT': <TokenType.TINYTEXT: 'TINYTEXT'>, 'CLOB': <TokenType.TEXT: 'TEXT'>, 'LONGVARCHAR': <TokenType.TEXT: 'TEXT'>, 'BINARY': <TokenType.BINARY: 'BINARY'>, 'BLOB': <TokenType.VARBINARY: 'VARBINARY'>, 'LONGBLOB': <TokenType.LONGBLOB: 'LONGBLOB'>, 'MEDIUMBLOB': <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, 'TINYBLOB': <TokenType.TINYBLOB: 'TINYBLOB'>, 'BYTEA': <TokenType.VARBINARY: 'VARBINARY'>, 'VARBINARY': <TokenType.VARBINARY: 'VARBINARY'>, 'TIME': <TokenType.TIME: 'TIME'>, 'TIMETZ': <TokenType.TIMETZ: 'TIMETZ'>, 'TIMESTAMP': <TokenType.TIMESTAMP: 'TIMESTAMP'>, 'TIMESTAMPTZ': <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, 'TIMESTAMPLTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMP_LTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMPNTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'TIMESTAMP_NTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'DATE': <TokenType.DATE: 'DATE'>, 'DATETIME': <TokenType.DATETIME: 'DATETIME'>, 'INT4RANGE': <TokenType.INT4RANGE: 'INT4RANGE'>, 'INT4MULTIRANGE': <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, 'INT8RANGE': <TokenType.INT8RANGE: 'INT8RANGE'>, 'INT8MULTIRANGE': <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, 'NUMRANGE': <TokenType.NUMRANGE: 'NUMRANGE'>, 'NUMMULTIRANGE': <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, 'TSRANGE': <TokenType.TSRANGE: 'TSRANGE'>, 'TSMULTIRANGE': <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, 'TSTZRANGE': <TokenType.TSTZRANGE: 'TSTZRANGE'>, 'TSTZMULTIRANGE': <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, 'DATERANGE': <TokenType.DATERANGE: 'DATERANGE'>, 'DATEMULTIRANGE': <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, 'UNIQUE': <TokenType.UNIQUE: 'UNIQUE'>, 'STRUCT': <TokenType.STRUCT: 'STRUCT'>, 'SEQUENCE': <TokenType.SEQUENCE: 'SEQUENCE'>, 'VARIANT': <TokenType.VARIANT: 'VARIANT'>, 'ALTER': <TokenType.ALTER: 'ALTER'>, 'ANALYZE': <TokenType.COMMAND: 'COMMAND'>, 'CALL': <TokenType.COMMAND: 'COMMAND'>, 'COMMENT': <TokenType.COMMENT: 'COMMENT'>, 'EXPLAIN': <TokenType.COMMAND: 'COMMAND'>, 'GRANT': <TokenType.COMMAND: 'COMMAND'>, 'OPTIMIZE': <TokenType.COMMAND: 'COMMAND'>, 'PREPARE': <TokenType.COMMAND: 'COMMAND'>, 'VACUUM': <TokenType.COMMAND: 'COMMAND'>, 'USER-DEFINED': <TokenType.USERDEFINED: 'USERDEFINED'>, 'FOR VERSION': <TokenType.VERSION_SNAPSHOT: 'VERSION_SNAPSHOT'>, 'FOR TIMESTAMP': <TokenType.TIMESTAMP_SNAPSHOT: 'TIMESTAMP_SNAPSHOT'>, 'ADD ARCHIVE': <TokenType.COMMAND: 'COMMAND'>, 'ADD ARCHIVES': <TokenType.COMMAND: 'COMMAND'>, 'ADD FILE': <TokenType.COMMAND: 'COMMAND'>, 'ADD FILES': <TokenType.COMMAND: 'COMMAND'>, 'ADD JAR': <TokenType.COMMAND: 'COMMAND'>, 'ADD JARS': <TokenType.COMMAND: 'COMMAND'>, 'MSCK REPAIR': <TokenType.COMMAND: 'COMMAND'>, 'REFRESH': <TokenType.REFRESH: 'REFRESH'>, 'TIMESTAMP AS OF': <TokenType.TIMESTAMP_SNAPSHOT: 'TIMESTAMP_SNAPSHOT'>, 'VERSION AS OF': <TokenType.VERSION_SNAPSHOT: 'VERSION_SNAPSHOT'>, 'WITH SERDEPROPERTIES': <TokenType.SERDE_PROPERTIES: 'SERDE_PROPERTIES'>}</span> + <label class="view-value-button pdoc-button" for="Hive.Tokenizer.KEYWORDS-view-value"></label><span class="default_value">{'{%': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%-': <TokenType.BLOCK_START: 'BLOCK_START'>, '%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '+%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '{{+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{{-': <TokenType.BLOCK_START: 'BLOCK_START'>, '+}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '/*+': <TokenType.HINT: 'HINT'>, '==': <TokenType.EQ: 'EQ'>, '::': <TokenType.DCOLON: 'DCOLON'>, '||': <TokenType.DPIPE: 'DPIPE'>, '>=': <TokenType.GTE: 'GTE'>, '<=': <TokenType.LTE: 'LTE'>, '<>': <TokenType.NEQ: 'NEQ'>, '!=': <TokenType.NEQ: 'NEQ'>, ':=': <TokenType.COLON_EQ: 'COLON_EQ'>, '<=>': <TokenType.NULLSAFE_EQ: 'NULLSAFE_EQ'>, '->': <TokenType.ARROW: 'ARROW'>, '->>': <TokenType.DARROW: 'DARROW'>, '=>': <TokenType.FARROW: 'FARROW'>, '#>': <TokenType.HASH_ARROW: 'HASH_ARROW'>, '#>>': <TokenType.DHASH_ARROW: 'DHASH_ARROW'>, '<->': <TokenType.LR_ARROW: 'LR_ARROW'>, '&&': <TokenType.DAMP: 'DAMP'>, '??': <TokenType.DQMARK: 'DQMARK'>, 'ALL': <TokenType.ALL: 'ALL'>, 'ALWAYS': <TokenType.ALWAYS: 'ALWAYS'>, 'AND': <TokenType.AND: 'AND'>, 'ANTI': <TokenType.ANTI: 'ANTI'>, 'ANY': <TokenType.ANY: 'ANY'>, 'ASC': <TokenType.ASC: 'ASC'>, 'AS': <TokenType.ALIAS: 'ALIAS'>, 'ASOF': <TokenType.ASOF: 'ASOF'>, 'AUTOINCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'AUTO_INCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'BEGIN': <TokenType.BEGIN: 'BEGIN'>, 'BETWEEN': <TokenType.BETWEEN: 'BETWEEN'>, 'CACHE': <TokenType.CACHE: 'CACHE'>, 'UNCACHE': <TokenType.UNCACHE: 'UNCACHE'>, 'CASE': <TokenType.CASE: 'CASE'>, 'CHARACTER SET': <TokenType.CHARACTER_SET: 'CHARACTER_SET'>, 'CLUSTER BY': <TokenType.CLUSTER_BY: 'CLUSTER_BY'>, 'COLLATE': <TokenType.COLLATE: 'COLLATE'>, 'COLUMN': <TokenType.COLUMN: 'COLUMN'>, 'COMMIT': <TokenType.COMMIT: 'COMMIT'>, 'CONNECT BY': <TokenType.CONNECT_BY: 'CONNECT_BY'>, 'CONSTRAINT': <TokenType.CONSTRAINT: 'CONSTRAINT'>, 'COPY': <TokenType.COPY: 'COPY'>, 'CREATE': <TokenType.CREATE: 'CREATE'>, 'CROSS': <TokenType.CROSS: 'CROSS'>, 'CUBE': <TokenType.CUBE: 'CUBE'>, 'CURRENT_DATE': <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, 'CURRENT_TIME': <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, 'CURRENT_TIMESTAMP': <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, 'CURRENT_USER': <TokenType.CURRENT_USER: 'CURRENT_USER'>, 'DATABASE': <TokenType.DATABASE: 'DATABASE'>, 'DEFAULT': <TokenType.DEFAULT: 'DEFAULT'>, 'DELETE': <TokenType.DELETE: 'DELETE'>, 'DESC': <TokenType.DESC: 'DESC'>, 'DESCRIBE': <TokenType.DESCRIBE: 'DESCRIBE'>, 'DISTINCT': <TokenType.DISTINCT: 'DISTINCT'>, 'DISTRIBUTE BY': <TokenType.DISTRIBUTE_BY: 'DISTRIBUTE_BY'>, 'DIV': <TokenType.DIV: 'DIV'>, 'DROP': <TokenType.DROP: 'DROP'>, 'ELSE': <TokenType.ELSE: 'ELSE'>, 'END': <TokenType.END: 'END'>, 'ENUM': <TokenType.ENUM: 'ENUM'>, 'ESCAPE': <TokenType.ESCAPE: 'ESCAPE'>, 'EXCEPT': <TokenType.EXCEPT: 'EXCEPT'>, 'EXECUTE': <TokenType.EXECUTE: 'EXECUTE'>, 'EXISTS': <TokenType.EXISTS: 'EXISTS'>, 'FALSE': <TokenType.FALSE: 'FALSE'>, 'FETCH': <TokenType.FETCH: 'FETCH'>, 'FILTER': <TokenType.FILTER: 'FILTER'>, 'FIRST': <TokenType.FIRST: 'FIRST'>, 'FULL': <TokenType.FULL: 'FULL'>, 'FUNCTION': <TokenType.FUNCTION: 'FUNCTION'>, 'FOR': <TokenType.FOR: 'FOR'>, 'FOREIGN KEY': <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, 'FORMAT': <TokenType.FORMAT: 'FORMAT'>, 'FROM': <TokenType.FROM: 'FROM'>, 'GEOGRAPHY': <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, 'GEOMETRY': <TokenType.GEOMETRY: 'GEOMETRY'>, 'GLOB': <TokenType.GLOB: 'GLOB'>, 'GROUP BY': <TokenType.GROUP_BY: 'GROUP_BY'>, 'GROUPING SETS': <TokenType.GROUPING_SETS: 'GROUPING_SETS'>, 'HAVING': <TokenType.HAVING: 'HAVING'>, 'ILIKE': <TokenType.ILIKE: 'ILIKE'>, 'IN': <TokenType.IN: 'IN'>, 'INDEX': <TokenType.INDEX: 'INDEX'>, 'INET': <TokenType.INET: 'INET'>, 'INNER': <TokenType.INNER: 'INNER'>, 'INSERT': <TokenType.INSERT: 'INSERT'>, 'INTERVAL': <TokenType.INTERVAL: 'INTERVAL'>, 'INTERSECT': <TokenType.INTERSECT: 'INTERSECT'>, 'INTO': <TokenType.INTO: 'INTO'>, 'IS': <TokenType.IS: 'IS'>, 'ISNULL': <TokenType.ISNULL: 'ISNULL'>, 'JOIN': <TokenType.JOIN: 'JOIN'>, 'KEEP': <TokenType.KEEP: 'KEEP'>, 'KILL': <TokenType.KILL: 'KILL'>, 'LATERAL': <TokenType.LATERAL: 'LATERAL'>, 'LEFT': <TokenType.LEFT: 'LEFT'>, 'LIKE': <TokenType.LIKE: 'LIKE'>, 'LIMIT': <TokenType.LIMIT: 'LIMIT'>, 'LOAD': <TokenType.LOAD: 'LOAD'>, 'LOCK': <TokenType.LOCK: 'LOCK'>, 'MERGE': <TokenType.MERGE: 'MERGE'>, 'NATURAL': <TokenType.NATURAL: 'NATURAL'>, 'NEXT': <TokenType.NEXT: 'NEXT'>, 'NOT': <TokenType.NOT: 'NOT'>, 'NOTNULL': <TokenType.NOTNULL: 'NOTNULL'>, 'NULL': <TokenType.NULL: 'NULL'>, 'OBJECT': <TokenType.OBJECT: 'OBJECT'>, 'OFFSET': <TokenType.OFFSET: 'OFFSET'>, 'ON': <TokenType.ON: 'ON'>, 'OR': <TokenType.OR: 'OR'>, 'XOR': <TokenType.XOR: 'XOR'>, 'ORDER BY': <TokenType.ORDER_BY: 'ORDER_BY'>, 'ORDINALITY': <TokenType.ORDINALITY: 'ORDINALITY'>, 'OUTER': <TokenType.OUTER: 'OUTER'>, 'OVER': <TokenType.OVER: 'OVER'>, 'OVERLAPS': <TokenType.OVERLAPS: 'OVERLAPS'>, 'OVERWRITE': <TokenType.OVERWRITE: 'OVERWRITE'>, 'PARTITION': <TokenType.PARTITION: 'PARTITION'>, 'PARTITION BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED_BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PERCENT': <TokenType.PERCENT: 'PERCENT'>, 'PIVOT': <TokenType.PIVOT: 'PIVOT'>, 'PRAGMA': <TokenType.PRAGMA: 'PRAGMA'>, 'PRIMARY KEY': <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, 'PROCEDURE': <TokenType.PROCEDURE: 'PROCEDURE'>, 'QUALIFY': <TokenType.QUALIFY: 'QUALIFY'>, 'RANGE': <TokenType.RANGE: 'RANGE'>, 'RECURSIVE': <TokenType.RECURSIVE: 'RECURSIVE'>, 'REGEXP': <TokenType.RLIKE: 'RLIKE'>, 'REPLACE': <TokenType.REPLACE: 'REPLACE'>, 'RETURNING': <TokenType.RETURNING: 'RETURNING'>, 'REFERENCES': <TokenType.REFERENCES: 'REFERENCES'>, 'RIGHT': <TokenType.RIGHT: 'RIGHT'>, 'RLIKE': <TokenType.RLIKE: 'RLIKE'>, 'ROLLBACK': <TokenType.ROLLBACK: 'ROLLBACK'>, 'ROLLUP': <TokenType.ROLLUP: 'ROLLUP'>, 'ROW': <TokenType.ROW: 'ROW'>, 'ROWS': <TokenType.ROWS: 'ROWS'>, 'SCHEMA': <TokenType.SCHEMA: 'SCHEMA'>, 'SELECT': <TokenType.SELECT: 'SELECT'>, 'SEMI': <TokenType.SEMI: 'SEMI'>, 'SET': <TokenType.SET: 'SET'>, 'SETTINGS': <TokenType.SETTINGS: 'SETTINGS'>, 'SHOW': <TokenType.SHOW: 'SHOW'>, 'SIMILAR TO': <TokenType.SIMILAR_TO: 'SIMILAR_TO'>, 'SOME': <TokenType.SOME: 'SOME'>, 'SORT BY': <TokenType.SORT_BY: 'SORT_BY'>, 'START WITH': <TokenType.START_WITH: 'START_WITH'>, 'TABLE': <TokenType.TABLE: 'TABLE'>, 'TABLESAMPLE': <TokenType.TABLE_SAMPLE: 'TABLE_SAMPLE'>, 'TEMP': <TokenType.TEMPORARY: 'TEMPORARY'>, 'TEMPORARY': <TokenType.TEMPORARY: 'TEMPORARY'>, 'THEN': <TokenType.THEN: 'THEN'>, 'TRUE': <TokenType.TRUE: 'TRUE'>, 'TRUNCATE': <TokenType.TRUNCATE: 'TRUNCATE'>, 'UNION': <TokenType.UNION: 'UNION'>, 'UNKNOWN': <TokenType.UNKNOWN: 'UNKNOWN'>, 'UNNEST': <TokenType.UNNEST: 'UNNEST'>, 'UNPIVOT': <TokenType.UNPIVOT: 'UNPIVOT'>, 'UPDATE': <TokenType.UPDATE: 'UPDATE'>, 'USE': <TokenType.USE: 'USE'>, 'USING': <TokenType.USING: 'USING'>, 'UUID': <TokenType.UUID: 'UUID'>, 'VALUES': <TokenType.VALUES: 'VALUES'>, 'VIEW': <TokenType.VIEW: 'VIEW'>, 'VOLATILE': <TokenType.VOLATILE: 'VOLATILE'>, 'WHEN': <TokenType.WHEN: 'WHEN'>, 'WHERE': <TokenType.WHERE: 'WHERE'>, 'WINDOW': <TokenType.WINDOW: 'WINDOW'>, 'WITH': <TokenType.WITH: 'WITH'>, 'APPLY': <TokenType.APPLY: 'APPLY'>, 'ARRAY': <TokenType.ARRAY: 'ARRAY'>, 'BIT': <TokenType.BIT: 'BIT'>, 'BOOL': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BOOLEAN': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BYTE': <TokenType.TINYINT: 'TINYINT'>, 'MEDIUMINT': <TokenType.MEDIUMINT: 'MEDIUMINT'>, 'INT1': <TokenType.TINYINT: 'TINYINT'>, 'TINYINT': <TokenType.TINYINT: 'TINYINT'>, 'INT16': <TokenType.SMALLINT: 'SMALLINT'>, 'SHORT': <TokenType.SMALLINT: 'SMALLINT'>, 'SMALLINT': <TokenType.SMALLINT: 'SMALLINT'>, 'INT128': <TokenType.INT128: 'INT128'>, 'HUGEINT': <TokenType.INT128: 'INT128'>, 'INT2': <TokenType.SMALLINT: 'SMALLINT'>, 'INTEGER': <TokenType.INT: 'INT'>, 'INT': <TokenType.INT: 'INT'>, 'INT4': <TokenType.INT: 'INT'>, 'INT32': <TokenType.INT: 'INT'>, 'INT64': <TokenType.BIGINT: 'BIGINT'>, 'LONG': <TokenType.BIGINT: 'BIGINT'>, 'BIGINT': <TokenType.BIGINT: 'BIGINT'>, 'INT8': <TokenType.TINYINT: 'TINYINT'>, 'UINT': <TokenType.UINT: 'UINT'>, 'DEC': <TokenType.DECIMAL: 'DECIMAL'>, 'DECIMAL': <TokenType.DECIMAL: 'DECIMAL'>, 'BIGDECIMAL': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'BIGNUMERIC': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'MAP': <TokenType.MAP: 'MAP'>, 'NULLABLE': <TokenType.NULLABLE: 'NULLABLE'>, 'NUMBER': <TokenType.DECIMAL: 'DECIMAL'>, 'NUMERIC': <TokenType.DECIMAL: 'DECIMAL'>, 'FIXED': <TokenType.DECIMAL: 'DECIMAL'>, 'REAL': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT4': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT8': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE PRECISION': <TokenType.DOUBLE: 'DOUBLE'>, 'JSON': <TokenType.JSON: 'JSON'>, 'CHAR': <TokenType.CHAR: 'CHAR'>, 'CHARACTER': <TokenType.CHAR: 'CHAR'>, 'NCHAR': <TokenType.NCHAR: 'NCHAR'>, 'VARCHAR': <TokenType.VARCHAR: 'VARCHAR'>, 'VARCHAR2': <TokenType.VARCHAR: 'VARCHAR'>, 'NVARCHAR': <TokenType.NVARCHAR: 'NVARCHAR'>, 'NVARCHAR2': <TokenType.NVARCHAR: 'NVARCHAR'>, 'BPCHAR': <TokenType.BPCHAR: 'BPCHAR'>, 'STR': <TokenType.TEXT: 'TEXT'>, 'STRING': <TokenType.TEXT: 'TEXT'>, 'TEXT': <TokenType.TEXT: 'TEXT'>, 'LONGTEXT': <TokenType.LONGTEXT: 'LONGTEXT'>, 'MEDIUMTEXT': <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, 'TINYTEXT': <TokenType.TINYTEXT: 'TINYTEXT'>, 'CLOB': <TokenType.TEXT: 'TEXT'>, 'LONGVARCHAR': <TokenType.TEXT: 'TEXT'>, 'BINARY': <TokenType.BINARY: 'BINARY'>, 'BLOB': <TokenType.VARBINARY: 'VARBINARY'>, 'LONGBLOB': <TokenType.LONGBLOB: 'LONGBLOB'>, 'MEDIUMBLOB': <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, 'TINYBLOB': <TokenType.TINYBLOB: 'TINYBLOB'>, 'BYTEA': <TokenType.VARBINARY: 'VARBINARY'>, 'VARBINARY': <TokenType.VARBINARY: 'VARBINARY'>, 'TIME': <TokenType.TIME: 'TIME'>, 'TIMETZ': <TokenType.TIMETZ: 'TIMETZ'>, 'TIMESTAMP': <TokenType.TIMESTAMP: 'TIMESTAMP'>, 'TIMESTAMPTZ': <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, 'TIMESTAMPLTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMP_LTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMPNTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'TIMESTAMP_NTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'DATE': <TokenType.DATE: 'DATE'>, 'DATETIME': <TokenType.DATETIME: 'DATETIME'>, 'INT4RANGE': <TokenType.INT4RANGE: 'INT4RANGE'>, 'INT4MULTIRANGE': <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, 'INT8RANGE': <TokenType.INT8RANGE: 'INT8RANGE'>, 'INT8MULTIRANGE': <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, 'NUMRANGE': <TokenType.NUMRANGE: 'NUMRANGE'>, 'NUMMULTIRANGE': <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, 'TSRANGE': <TokenType.TSRANGE: 'TSRANGE'>, 'TSMULTIRANGE': <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, 'TSTZRANGE': <TokenType.TSTZRANGE: 'TSTZRANGE'>, 'TSTZMULTIRANGE': <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, 'DATERANGE': <TokenType.DATERANGE: 'DATERANGE'>, 'DATEMULTIRANGE': <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, 'UNIQUE': <TokenType.UNIQUE: 'UNIQUE'>, 'STRUCT': <TokenType.STRUCT: 'STRUCT'>, 'SEQUENCE': <TokenType.SEQUENCE: 'SEQUENCE'>, 'VARIANT': <TokenType.VARIANT: 'VARIANT'>, 'ALTER': <TokenType.ALTER: 'ALTER'>, 'ANALYZE': <TokenType.COMMAND: 'COMMAND'>, 'CALL': <TokenType.COMMAND: 'COMMAND'>, 'COMMENT': <TokenType.COMMENT: 'COMMENT'>, 'EXPLAIN': <TokenType.COMMAND: 'COMMAND'>, 'GRANT': <TokenType.COMMAND: 'COMMAND'>, 'OPTIMIZE': <TokenType.COMMAND: 'COMMAND'>, 'PREPARE': <TokenType.COMMAND: 'COMMAND'>, 'VACUUM': <TokenType.COMMAND: 'COMMAND'>, 'USER-DEFINED': <TokenType.USERDEFINED: 'USERDEFINED'>, 'FOR VERSION': <TokenType.VERSION_SNAPSHOT: 'VERSION_SNAPSHOT'>, 'FOR TIMESTAMP': <TokenType.TIMESTAMP_SNAPSHOT: 'TIMESTAMP_SNAPSHOT'>, 'ADD ARCHIVE': <TokenType.COMMAND: 'COMMAND'>, 'ADD ARCHIVES': <TokenType.COMMAND: 'COMMAND'>, 'ADD FILE': <TokenType.COMMAND: 'COMMAND'>, 'ADD FILES': <TokenType.COMMAND: 'COMMAND'>, 'ADD JAR': <TokenType.COMMAND: 'COMMAND'>, 'ADD JARS': <TokenType.COMMAND: 'COMMAND'>, 'MSCK REPAIR': <TokenType.COMMAND: 'COMMAND'>, 'REFRESH': <TokenType.REFRESH: 'REFRESH'>, 'TIMESTAMP AS OF': <TokenType.TIMESTAMP_SNAPSHOT: 'TIMESTAMP_SNAPSHOT'>, 'VERSION AS OF': <TokenType.VERSION_SNAPSHOT: 'VERSION_SNAPSHOT'>, 'SERDEPROPERTIES': <TokenType.SERDE_PROPERTIES: 'SERDE_PROPERTIES'>}</span> </div> @@ -2155,7 +2197,7 @@ </span><span id="Hive.Parser-333"><a href="#Hive.Parser-333"><span class="linenos">333</span></a> </span><span id="Hive.Parser-334"><a href="#Hive.Parser-334"><span class="linenos">334</span></a> <span class="n">PROPERTY_PARSERS</span> <span class="o">=</span> <span class="p">{</span> </span><span id="Hive.Parser-335"><a href="#Hive.Parser-335"><span class="linenos">335</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">PROPERTY_PARSERS</span><span class="p">,</span> -</span><span id="Hive.Parser-336"><a href="#Hive.Parser-336"><span class="linenos">336</span></a> <span class="s2">"WITH SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> +</span><span id="Hive.Parser-336"><a href="#Hive.Parser-336"><span class="linenos">336</span></a> <span class="s2">"SERDEPROPERTIES"</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">SerdeProperties</span><span class="p">(</span> </span><span id="Hive.Parser-337"><a href="#Hive.Parser-337"><span class="linenos">337</span></a> <span class="n">expressions</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_property</span><span class="p">)</span> </span><span id="Hive.Parser-338"><a href="#Hive.Parser-338"><span class="linenos">338</span></a> <span class="p">),</span> </span><span id="Hive.Parser-339"><a href="#Hive.Parser-339"><span class="linenos">339</span></a> <span class="p">}</span> @@ -2339,7 +2381,7 @@ Default: 3</li> <div class="attr variable"> <span class="name">PROPERTY_PARSERS</span> = <input id="Hive.Parser.PROPERTY_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.PROPERTY_PARSERS-view-value"></label><span class="default_value">{'ALLOWED_VALUES': <function Parser.<lambda>>, 'ALGORITHM': <function Parser.<lambda>>, 'AUTO': <function Parser.<lambda>>, 'AUTO_INCREMENT': <function Parser.<lambda>>, 'BACKUP': <function Parser.<lambda>>, 'BLOCKCOMPRESSION': <function Parser.<lambda>>, 'CHARSET': <function Parser.<lambda>>, 'CHARACTER SET': <function Parser.<lambda>>, 'CHECKSUM': <function Parser.<lambda>>, 'CLUSTER BY': <function Parser.<lambda>>, 'CLUSTERED': <function Parser.<lambda>>, 'COLLATE': <function Parser.<lambda>>, 'COMMENT': <function Parser.<lambda>>, 'CONTAINS': <function Parser.<lambda>>, 'COPY': <function Parser.<lambda>>, 'DATABLOCKSIZE': <function Parser.<lambda>>, 'DEFINER': <function Parser.<lambda>>, 'DETERMINISTIC': <function Parser.<lambda>>, 'DISTKEY': <function Parser.<lambda>>, 'DISTSTYLE': <function Parser.<lambda>>, 'ENGINE': <function Parser.<lambda>>, 'EXECUTE': <function Parser.<lambda>>, 'EXTERNAL': <function Parser.<lambda>>, 'FALLBACK': <function Parser.<lambda>>, 'FORMAT': <function Parser.<lambda>>, 'FREESPACE': <function Parser.<lambda>>, 'GLOBAL': <function Parser.<lambda>>, 'HEAP': <function Parser.<lambda>>, 'ICEBERG': <function Parser.<lambda>>, 'IMMUTABLE': <function Parser.<lambda>>, 'INHERITS': <function Parser.<lambda>>, 'INPUT': <function Parser.<lambda>>, 'JOURNAL': <function Parser.<lambda>>, 'LANGUAGE': <function Parser.<lambda>>, 'LAYOUT': <function Parser.<lambda>>, 'LIFETIME': <function Parser.<lambda>>, 'LIKE': <function Parser.<lambda>>, 'LOCATION': <function Parser.<lambda>>, 'LOCK': <function Parser.<lambda>>, 'LOCKING': <function Parser.<lambda>>, 'LOG': <function Parser.<lambda>>, 'MATERIALIZED': <function Parser.<lambda>>, 'MERGEBLOCKRATIO': <function Parser.<lambda>>, 'MODIFIES': <function Parser.<lambda>>, 'MULTISET': <function Parser.<lambda>>, 'NO': <function Parser.<lambda>>, 'ON': <function Parser.<lambda>>, 'ORDER BY': <function Parser.<lambda>>, 'OUTPUT': <function Parser.<lambda>>, 'PARTITION': <function Parser.<lambda>>, 'PARTITION BY': <function Parser.<lambda>>, 'PARTITIONED BY': <function Parser.<lambda>>, 'PARTITIONED_BY': <function Parser.<lambda>>, 'PRIMARY KEY': <function Parser.<lambda>>, 'RANGE': <function Parser.<lambda>>, 'READS': <function Parser.<lambda>>, 'REMOTE': <function Parser.<lambda>>, 'RETURNS': <function Parser.<lambda>>, 'ROW': <function Parser.<lambda>>, 'ROW_FORMAT': <function Parser.<lambda>>, 'SAMPLE': <function Parser.<lambda>>, 'SET': <function Parser.<lambda>>, 'SETTINGS': <function Parser.<lambda>>, 'SHARING': <function Parser.<lambda>>, 'SORTKEY': <function Parser.<lambda>>, 'SOURCE': <function Parser.<lambda>>, 'STABLE': <function Parser.<lambda>>, 'STORED': <function Parser.<lambda>>, 'SYSTEM_VERSIONING': <function Parser.<lambda>>, 'TBLPROPERTIES': <function Parser.<lambda>>, 'TEMP': <function Parser.<lambda>>, 'TEMPORARY': <function Parser.<lambda>>, 'TO': <function Parser.<lambda>>, 'TRANSIENT': <function Parser.<lambda>>, 'TRANSFORM': <function Parser.<lambda>>, 'TTL': <function Parser.<lambda>>, 'USING': <function Parser.<lambda>>, 'UNLOGGED': <function Parser.<lambda>>, 'VOLATILE': <function Parser.<lambda>>, 'WITH': <function Parser.<lambda>>, 'WITH SERDEPROPERTIES': <function <a href="#Hive.Parser">Hive.Parser</a>.<lambda>>}</span> + <label class="view-value-button pdoc-button" for="Hive.Parser.PROPERTY_PARSERS-view-value"></label><span class="default_value">{'ALLOWED_VALUES': <function Parser.<lambda>>, 'ALGORITHM': <function Parser.<lambda>>, 'AUTO': <function Parser.<lambda>>, 'AUTO_INCREMENT': <function Parser.<lambda>>, 'BACKUP': <function Parser.<lambda>>, 'BLOCKCOMPRESSION': <function Parser.<lambda>>, 'CHARSET': <function Parser.<lambda>>, 'CHARACTER SET': <function Parser.<lambda>>, 'CHECKSUM': <function Parser.<lambda>>, 'CLUSTER BY': <function Parser.<lambda>>, 'CLUSTERED': <function Parser.<lambda>>, 'COLLATE': <function Parser.<lambda>>, 'COMMENT': <function Parser.<lambda>>, 'CONTAINS': <function Parser.<lambda>>, 'COPY': <function Parser.<lambda>>, 'DATABLOCKSIZE': <function Parser.<lambda>>, 'DATA_DELETION': <function Parser.<lambda>>, 'DEFINER': <function Parser.<lambda>>, 'DETERMINISTIC': <function Parser.<lambda>>, 'DISTKEY': <function Parser.<lambda>>, 'DISTSTYLE': <function Parser.<lambda>>, 'ENGINE': <function Parser.<lambda>>, 'EXECUTE': <function Parser.<lambda>>, 'EXTERNAL': <function Parser.<lambda>>, 'FALLBACK': <function Parser.<lambda>>, 'FORMAT': <function Parser.<lambda>>, 'FREESPACE': <function Parser.<lambda>>, 'GLOBAL': <function Parser.<lambda>>, 'HEAP': <function Parser.<lambda>>, 'ICEBERG': <function Parser.<lambda>>, 'IMMUTABLE': <function Parser.<lambda>>, 'INHERITS': <function Parser.<lambda>>, 'INPUT': <function Parser.<lambda>>, 'JOURNAL': <function Parser.<lambda>>, 'LANGUAGE': <function Parser.<lambda>>, 'LAYOUT': <function Parser.<lambda>>, 'LIFETIME': <function Parser.<lambda>>, 'LIKE': <function Parser.<lambda>>, 'LOCATION': <function Parser.<lambda>>, 'LOCK': <function Parser.<lambda>>, 'LOCKING': <function Parser.<lambda>>, 'LOG': <function Parser.<lambda>>, 'MATERIALIZED': <function Parser.<lambda>>, 'MERGEBLOCKRATIO': <function Parser.<lambda>>, 'MODIFIES': <function Parser.<lambda>>, 'MULTISET': <function Parser.<lambda>>, 'NO': <function Parser.<lambda>>, 'ON': <function Parser.<lambda>>, 'ORDER BY': <function Parser.<lambda>>, 'OUTPUT': <function Parser.<lambda>>, 'PARTITION': <function Parser.<lambda>>, 'PARTITION BY': <function Parser.<lambda>>, 'PARTITIONED BY': <function Parser.<lambda>>, 'PARTITIONED_BY': <function Parser.<lambda>>, 'PRIMARY KEY': <function Parser.<lambda>>, 'RANGE': <function Parser.<lambda>>, 'READS': <function Parser.<lambda>>, 'REMOTE': <function Parser.<lambda>>, 'RETURNS': <function Parser.<lambda>>, 'STRICT': <function Parser.<lambda>>, 'ROW': <function Parser.<lambda>>, 'ROW_FORMAT': <function Parser.<lambda>>, 'SAMPLE': <function Parser.<lambda>>, 'SET': <function Parser.<lambda>>, 'SETTINGS': <function Parser.<lambda>>, 'SHARING': <function Parser.<lambda>>, 'SORTKEY': <function Parser.<lambda>>, 'SOURCE': <function Parser.<lambda>>, 'STABLE': <function Parser.<lambda>>, 'STORED': <function Parser.<lambda>>, 'SYSTEM_VERSIONING': <function Parser.<lambda>>, 'TBLPROPERTIES': <function Parser.<lambda>>, 'TEMP': <function Parser.<lambda>>, 'TEMPORARY': <function Parser.<lambda>>, 'TO': <function Parser.<lambda>>, 'TRANSIENT': <function Parser.<lambda>>, 'TRANSFORM': <function Parser.<lambda>>, 'TTL': <function Parser.<lambda>>, 'USING': <function Parser.<lambda>>, 'UNLOGGED': <function Parser.<lambda>>, 'VOLATILE': <function Parser.<lambda>>, 'WITH': <function Parser.<lambda>>, 'SERDEPROPERTIES': <function <a href="#Hive.Parser">Hive.Parser</a>.<lambda>>}</span> </div> @@ -2471,6 +2513,7 @@ Default: 3</li> <dd id="Hive.Parser.UNION_MODIFIERS" class="variable"><a href="../parser.html#Parser.UNION_MODIFIERS">UNION_MODIFIERS</a></dd> <dd id="Hive.Parser.NO_PAREN_IF_COMMANDS" class="variable"><a href="../parser.html#Parser.NO_PAREN_IF_COMMANDS">NO_PAREN_IF_COMMANDS</a></dd> <dd id="Hive.Parser.JSON_ARROWS_REQUIRE_JSON_TYPE" class="variable"><a href="../parser.html#Parser.JSON_ARROWS_REQUIRE_JSON_TYPE">JSON_ARROWS_REQUIRE_JSON_TYPE</a></dd> + <dd id="Hive.Parser.COLON_IS_JSON_EXTRACT" class="variable"><a href="../parser.html#Parser.COLON_IS_JSON_EXTRACT">COLON_IS_JSON_EXTRACT</a></dd> <dd id="Hive.Parser.SUPPORTS_IMPLICIT_UNNEST" class="variable"><a href="../parser.html#Parser.SUPPORTS_IMPLICIT_UNNEST">SUPPORTS_IMPLICIT_UNNEST</a></dd> <dd id="Hive.Parser.INTERVAL_SPANS" class="variable"><a href="../parser.html#Parser.INTERVAL_SPANS">INTERVAL_SPANS</a></dd> <dd id="Hive.Parser.SUPPORTS_PARTITION_SELECTION" class="variable"><a href="../parser.html#Parser.SUPPORTS_PARTITION_SELECTION">SUPPORTS_PARTITION_SELECTION</a></dd> @@ -2515,126 +2558,126 @@ Default: 3</li> </span><span id="Hive.Generator-444"><a href="#Hive.Generator-444"><span class="linenos">444</span></a> <span class="n">LAST_DAY_SUPPORTS_DATE_PART</span> <span class="o">=</span> <span class="kc">False</span> </span><span id="Hive.Generator-445"><a href="#Hive.Generator-445"><span class="linenos">445</span></a> <span class="n">JSON_PATH_SINGLE_QUOTE_ESCAPE</span> <span class="o">=</span> <span class="kc">True</span> </span><span id="Hive.Generator-446"><a href="#Hive.Generator-446"><span class="linenos">446</span></a> <span class="n">SUPPORTS_TO_NUMBER</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Hive.Generator-447"><a href="#Hive.Generator-447"><span class="linenos">447</span></a> -</span><span id="Hive.Generator-448"><a href="#Hive.Generator-448"><span class="linenos">448</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</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">Subquery</span><span class="p">,</span> -</span><span id="Hive.Generator-452"><a href="#Hive.Generator-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> -</span><span id="Hive.Generator-453"><a href="#Hive.Generator-453"><span class="linenos">453</span></a> <span class="p">}</span> -</span><span id="Hive.Generator-454"><a href="#Hive.Generator-454"><span class="linenos">454</span></a> -</span><span id="Hive.Generator-455"><a href="#Hive.Generator-455"><span class="linenos">455</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</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">JSONPathSubscript</span><span class="p">,</span> -</span><span id="Hive.Generator-459"><a href="#Hive.Generator-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> -</span><span id="Hive.Generator-460"><a href="#Hive.Generator-460"><span class="linenos">460</span></a> <span class="p">}</span> -</span><span id="Hive.Generator-461"><a href="#Hive.Generator-461"><span class="linenos">461</span></a> -</span><span id="Hive.Generator-462"><a href="#Hive.Generator-462"><span class="linenos">462</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive.Generator-463"><a href="#Hive.Generator-463"><span class="linenos">463</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-464"><a href="#Hive.Generator-464"><span class="linenos">464</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">"BOOLEAN"</span><span class="p">,</span> -</span><span id="Hive.Generator-465"><a href="#Hive.Generator-465"><span class="linenos">465</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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="Hive.Generator-466"><a href="#Hive.Generator-466"><span class="linenos">466</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</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">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">"STRING"</span><span class="p">,</span> -</span><span id="Hive.Generator-468"><a href="#Hive.Generator-468"><span class="linenos">468</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">"TIMESTAMP"</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">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">"TIMESTAMP"</span><span class="p">,</span> -</span><span id="Hive.Generator-470"><a href="#Hive.Generator-470"><span class="linenos">470</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">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> -</span><span id="Hive.Generator-471"><a href="#Hive.Generator-471"><span class="linenos">471</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">"BINARY"</span><span class="p">,</span> -</span><span id="Hive.Generator-472"><a href="#Hive.Generator-472"><span class="linenos">472</span></a> <span class="p">}</span> -</span><span id="Hive.Generator-473"><a href="#Hive.Generator-473"><span class="linenos">473</span></a> -</span><span id="Hive.Generator-474"><a href="#Hive.Generator-474"><span class="linenos">474</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive.Generator-475"><a href="#Hive.Generator-475"><span class="linenos">475</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-476"><a href="#Hive.Generator-476"><span class="linenos">476</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-477"><a href="#Hive.Generator-477"><span class="linenos">477</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-478"><a href="#Hive.Generator-478"><span class="linenos">478</span></a> <span class="p">[</span> -</span><span id="Hive.Generator-479"><a href="#Hive.Generator-479"><span class="linenos">479</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-480"><a href="#Hive.Generator-480"><span class="linenos">480</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-481"><a href="#Hive.Generator-481"><span class="linenos">481</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-482"><a href="#Hive.Generator-482"><span class="linenos">482</span></a> <span class="p">]</span> -</span><span id="Hive.Generator-483"><a href="#Hive.Generator-483"><span class="linenos">483</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-484"><a href="#Hive.Generator-484"><span class="linenos">484</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-485"><a href="#Hive.Generator-485"><span class="linenos">485</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</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">ApproxDistinct</span><span class="p">:</span> <span class="n">approx_count_distinct_sql</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">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</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">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> -</span><span id="Hive.Generator-489"><a href="#Hive.Generator-489"><span class="linenos">489</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">"CONCAT"</span><span class="p">),</span> -</span><span id="Hive.Generator-490"><a href="#Hive.Generator-490"><span class="linenos">490</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-491"><a href="#Hive.Generator-491"><span class="linenos">491</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">"SIZE"</span><span class="p">),</span> -</span><span id="Hive.Generator-492"><a href="#Hive.Generator-492"><span class="linenos">492</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-493"><a href="#Hive.Generator-493"><span class="linenos">493</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-494"><a href="#Hive.Generator-494"><span class="linenos">494</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-495"><a href="#Hive.Generator-495"><span class="linenos">495</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-496"><a href="#Hive.Generator-496"><span class="linenos">496</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> -</span><span id="Hive.Generator-497"><a href="#Hive.Generator-497"><span class="linenos">497</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-498"><a href="#Hive.Generator-498"><span class="linenos">498</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive.Generator-499"><a href="#Hive.Generator-499"><span class="linenos">499</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> -</span><span id="Hive.Generator-500"><a href="#Hive.Generator-500"><span class="linenos">500</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive.Generator-501"><a href="#Hive.Generator-501"><span class="linenos">501</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> -</span><span id="Hive.Generator-502"><a href="#Hive.Generator-502"><span class="linenos">502</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><span id="Hive.Generator-503"><a href="#Hive.Generator-503"><span class="linenos">503</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> -</span><span id="Hive.Generator-504"><a href="#Hive.Generator-504"><span class="linenos">504</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">"UNBASE64"</span><span class="p">),</span> -</span><span id="Hive.Generator-505"><a href="#Hive.Generator-505"><span class="linenos">505</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-506"><a href="#Hive.Generator-506"><span class="linenos">506</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-507"><a href="#Hive.Generator-507"><span class="linenos">507</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">"ISNAN"</span><span class="p">),</span> -</span><span id="Hive.Generator-508"><a href="#Hive.Generator-508"><span class="linenos">508</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-509"><a href="#Hive.Generator-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-510"><a href="#Hive.Generator-510"><span class="linenos">510</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="Hive.Generator-511"><a href="#Hive.Generator-511"><span class="linenos">511</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-512"><a href="#Hive.Generator-512"><span class="linenos">512</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-513"><a href="#Hive.Generator-513"><span class="linenos">513</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-514"><a href="#Hive.Generator-514"><span class="linenos">514</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-515"><a href="#Hive.Generator-515"><span class="linenos">515</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-516"><a href="#Hive.Generator-516"><span class="linenos">516</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">"UNHEX"</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">"MD5"</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-517"><a href="#Hive.Generator-517"><span class="linenos">517</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-518"><a href="#Hive.Generator-518"><span class="linenos">518</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">"MONTHS_BETWEEN"</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-519"><a href="#Hive.Generator-519"><span class="linenos">519</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> -</span><span id="Hive.Generator-520"><a href="#Hive.Generator-520"><span class="linenos">520</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> -</span><span id="Hive.Generator-521"><a href="#Hive.Generator-521"><span class="linenos">521</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-522"><a href="#Hive.Generator-522"><span class="linenos">522</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-523"><a href="#Hive.Generator-523"><span class="linenos">523</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> -</span><span id="Hive.Generator-524"><a href="#Hive.Generator-524"><span class="linenos">524</span></a> <span class="p">[</span> -</span><span id="Hive.Generator-525"><a href="#Hive.Generator-525"><span class="linenos">525</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> -</span><span id="Hive.Generator-526"><a href="#Hive.Generator-526"><span class="linenos">526</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> -</span><span id="Hive.Generator-527"><a href="#Hive.Generator-527"><span class="linenos">527</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> -</span><span id="Hive.Generator-528"><a href="#Hive.Generator-528"><span class="linenos">528</span></a> <span class="p">]</span> -</span><span id="Hive.Generator-529"><a href="#Hive.Generator-529"><span class="linenos">529</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-530"><a href="#Hive.Generator-530"><span class="linenos">530</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">"PERCENTILE"</span><span class="p">),</span> -</span><span id="Hive.Generator-531"><a href="#Hive.Generator-531"><span class="linenos">531</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">"PERCENTILE_APPROX"</span><span class="p">),</span> -</span><span id="Hive.Generator-532"><a href="#Hive.Generator-532"><span class="linenos">532</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-533"><a href="#Hive.Generator-533"><span class="linenos">533</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-534"><a href="#Hive.Generator-534"><span class="linenos">534</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">"RLIKE"</span><span class="p">),</span> -</span><span id="Hive.Generator-535"><a href="#Hive.Generator-535"><span class="linenos">535</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">"SPLIT"</span><span class="p">),</span> -</span><span id="Hive.Generator-536"><a href="#Hive.Generator-536"><span class="linenos">536</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-537"><a href="#Hive.Generator-537"><span class="linenos">537</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-538"><a href="#Hive.Generator-538"><span class="linenos">538</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-539"><a href="#Hive.Generator-539"><span class="linenos">539</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> -</span><span id="Hive.Generator-540"><a href="#Hive.Generator-540"><span class="linenos">540</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> -</span><span id="Hive.Generator-541"><a href="#Hive.Generator-541"><span class="linenos">541</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-542"><a href="#Hive.Generator-542"><span class="linenos">542</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-543"><a href="#Hive.Generator-543"><span class="linenos">543</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-544"><a href="#Hive.Generator-544"><span class="linenos">544</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-545"><a href="#Hive.Generator-545"><span class="linenos">545</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-546"><a href="#Hive.Generator-546"><span class="linenos">546</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-547"><a href="#Hive.Generator-547"><span class="linenos">547</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-548"><a href="#Hive.Generator-548"><span class="linenos">548</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">"TO_DATE"</span><span class="p">),</span> -</span><span id="Hive.Generator-549"><a href="#Hive.Generator-549"><span class="linenos">549</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-550"><a href="#Hive.Generator-550"><span class="linenos">550</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="Hive.Generator-551"><a href="#Hive.Generator-551"><span class="linenos">551</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> -</span><span id="Hive.Generator-552"><a href="#Hive.Generator-552"><span class="linenos">552</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> -</span><span id="Hive.Generator-553"><a href="#Hive.Generator-553"><span class="linenos">553</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">"BASE64"</span><span class="p">),</span> -</span><span id="Hive.Generator-554"><a href="#Hive.Generator-554"><span class="linenos">554</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> -</span><span id="Hive.Generator-555"><a href="#Hive.Generator-555"><span class="linenos">555</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> -</span><span id="Hive.Generator-556"><a href="#Hive.Generator-556"><span class="linenos">556</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> -</span><span id="Hive.Generator-557"><a href="#Hive.Generator-557"><span class="linenos">557</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> -</span><span id="Hive.Generator-558"><a href="#Hive.Generator-558"><span class="linenos">558</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-559"><a href="#Hive.Generator-559"><span class="linenos">559</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-560"><a href="#Hive.Generator-560"><span class="linenos">560</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-561"><a href="#Hive.Generator-561"><span class="linenos">561</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-562"><a href="#Hive.Generator-562"><span class="linenos">562</span></a> <span class="p">),</span> -</span><span id="Hive.Generator-563"><a href="#Hive.Generator-563"><span class="linenos">563</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> -</span><span id="Hive.Generator-564"><a href="#Hive.Generator-564"><span class="linenos">564</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">"FROM_UNIXTIME"</span><span class="p">),</span> -</span><span id="Hive.Generator-565"><a href="#Hive.Generator-565"><span class="linenos">565</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="Hive.Generator-566"><a href="#Hive.Generator-566"><span class="linenos">566</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">"WITH SERDEPROPERTIES"</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">WITH_PROPERTIES_PREFIX</span> <span class="o">=</span> <span class="s2">"TBLPROPERTIES"</span> +</span><span id="Hive.Generator-448"><a href="#Hive.Generator-448"><span class="linenos">448</span></a> +</span><span id="Hive.Generator-449"><a href="#Hive.Generator-449"><span class="linenos">449</span></a> <span class="n">EXPRESSIONS_WITHOUT_NESTED_CTES</span> <span class="o">=</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">Insert</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">Select</span><span class="p">,</span> +</span><span id="Hive.Generator-452"><a href="#Hive.Generator-452"><span class="linenos">452</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Subquery</span><span class="p">,</span> +</span><span id="Hive.Generator-453"><a href="#Hive.Generator-453"><span class="linenos">453</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Union</span><span class="p">,</span> +</span><span id="Hive.Generator-454"><a href="#Hive.Generator-454"><span class="linenos">454</span></a> <span class="p">}</span> +</span><span id="Hive.Generator-455"><a href="#Hive.Generator-455"><span class="linenos">455</span></a> +</span><span id="Hive.Generator-456"><a href="#Hive.Generator-456"><span class="linenos">456</span></a> <span class="n">SUPPORTED_JSON_PATH_PARTS</span> <span class="o">=</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">JSONPathKey</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">JSONPathRoot</span><span class="p">,</span> +</span><span id="Hive.Generator-459"><a href="#Hive.Generator-459"><span class="linenos">459</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathSubscript</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">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">,</span> +</span><span id="Hive.Generator-461"><a href="#Hive.Generator-461"><span class="linenos">461</span></a> <span class="p">}</span> +</span><span id="Hive.Generator-462"><a href="#Hive.Generator-462"><span class="linenos">462</span></a> +</span><span id="Hive.Generator-463"><a href="#Hive.Generator-463"><span class="linenos">463</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive.Generator-464"><a href="#Hive.Generator-464"><span class="linenos">464</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-465"><a href="#Hive.Generator-465"><span class="linenos">465</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">"BOOLEAN"</span><span class="p">,</span> +</span><span id="Hive.Generator-466"><a href="#Hive.Generator-466"><span class="linenos">466</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">"TIMESTAMP"</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">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">ROWVERSION</span><span class="p">:</span> <span class="s2">"BINARY"</span><span class="p">,</span> +</span><span id="Hive.Generator-468"><a href="#Hive.Generator-468"><span class="linenos">468</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">"STRING"</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">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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="Hive.Generator-470"><a href="#Hive.Generator-470"><span class="linenos">470</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">"TIMESTAMP"</span><span class="p">,</span> +</span><span id="Hive.Generator-471"><a href="#Hive.Generator-471"><span class="linenos">471</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">UTINYINT</span><span class="p">:</span> <span class="s2">"SMALLINT"</span><span class="p">,</span> +</span><span id="Hive.Generator-472"><a href="#Hive.Generator-472"><span class="linenos">472</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">"BINARY"</span><span class="p">,</span> +</span><span id="Hive.Generator-473"><a href="#Hive.Generator-473"><span class="linenos">473</span></a> <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="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive.Generator-476"><a href="#Hive.Generator-476"><span class="linenos">476</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-477"><a href="#Hive.Generator-477"><span class="linenos">477</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-478"><a href="#Hive.Generator-478"><span class="linenos">478</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-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">transforms</span><span class="o">.</span><span class="n">eliminate_qualify</span><span class="p">,</span> +</span><span id="Hive.Generator-481"><a href="#Hive.Generator-481"><span class="linenos">481</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-482"><a href="#Hive.Generator-482"><span class="linenos">482</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-483"><a href="#Hive.Generator-483"><span class="linenos">483</span></a> <span class="p">]</span> +</span><span id="Hive.Generator-484"><a href="#Hive.Generator-484"><span class="linenos">484</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-485"><a href="#Hive.Generator-485"><span class="linenos">485</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-486"><a href="#Hive.Generator-486"><span class="linenos">486</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">AnyValue</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"FIRST"</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">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-488"><a href="#Hive.Generator-488"><span class="linenos">488</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMax</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MAX_BY"</span><span class="p">),</span> +</span><span id="Hive.Generator-489"><a href="#Hive.Generator-489"><span class="linenos">489</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArgMin</span><span class="p">:</span> <span class="n">arg_max_or_min_no_count</span><span class="p">(</span><span class="s2">"MIN_BY"</span><span class="p">),</span> +</span><span id="Hive.Generator-490"><a href="#Hive.Generator-490"><span class="linenos">490</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">"CONCAT"</span><span class="p">),</span> +</span><span id="Hive.Generator-491"><a href="#Hive.Generator-491"><span class="linenos">491</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayToString</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">"CONCAT_WS"</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-492"><a href="#Hive.Generator-492"><span class="linenos">492</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">"SIZE"</span><span class="p">),</span> +</span><span id="Hive.Generator-493"><a href="#Hive.Generator-493"><span class="linenos">493</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-494"><a href="#Hive.Generator-494"><span class="linenos">494</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-495"><a href="#Hive.Generator-495"><span class="linenos">495</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-496"><a href="#Hive.Generator-496"><span class="linenos">496</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-497"><a href="#Hive.Generator-497"><span class="linenos">497</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateStrToDate</span><span class="p">:</span> <span class="n">datestrtodate_sql</span><span class="p">,</span> +</span><span id="Hive.Generator-498"><a href="#Hive.Generator-498"><span class="linenos">498</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-499"><a href="#Hive.Generator-499"><span class="linenos">499</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DateToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive.Generator-500"><a href="#Hive.Generator-500"><span class="linenos">500</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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)"</span><span class="p">,</span> +</span><span id="Hive.Generator-501"><a href="#Hive.Generator-501"><span class="linenos">501</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">DiToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive.Generator-502"><a href="#Hive.Generator-502"><span class="linenos">502</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">)"</span><span class="p">,</span> +</span><span id="Hive.Generator-503"><a href="#Hive.Generator-503"><span class="linenos">503</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><span id="Hive.Generator-504"><a href="#Hive.Generator-504"><span class="linenos">504</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</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">"</span><span class="p">,</span> +</span><span id="Hive.Generator-505"><a href="#Hive.Generator-505"><span class="linenos">505</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">"UNBASE64"</span><span class="p">),</span> +</span><span id="Hive.Generator-506"><a href="#Hive.Generator-506"><span class="linenos">506</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-507"><a href="#Hive.Generator-507"><span class="linenos">507</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-508"><a href="#Hive.Generator-508"><span class="linenos">508</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">"ISNAN"</span><span class="p">),</span> +</span><span id="Hive.Generator-509"><a href="#Hive.Generator-509"><span class="linenos">509</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtract</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">"GET_JSON_OBJECT"</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-510"><a href="#Hive.Generator-510"><span class="linenos">510</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">JSONExtractScalar</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-511"><a href="#Hive.Generator-511"><span class="linenos">511</span></a> <span class="s2">"GET_JSON_OBJECT"</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><span id="Hive.Generator-512"><a href="#Hive.Generator-512"><span class="linenos">512</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-513"><a href="#Hive.Generator-513"><span class="linenos">513</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-514"><a href="#Hive.Generator-514"><span class="linenos">514</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-515"><a href="#Hive.Generator-515"><span class="linenos">515</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-516"><a href="#Hive.Generator-516"><span class="linenos">516</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-517"><a href="#Hive.Generator-517"><span class="linenos">517</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">"UNHEX"</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">"MD5"</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-518"><a href="#Hive.Generator-518"><span class="linenos">518</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-519"><a href="#Hive.Generator-519"><span class="linenos">519</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">"MONTHS_BETWEEN"</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-520"><a href="#Hive.Generator-520"><span class="linenos">520</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotNullColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">_</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="p">(</span> +</span><span id="Hive.Generator-521"><a href="#Hive.Generator-521"><span class="linenos">521</span></a> <span class="s2">""</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"allow_null"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"NOT NULL"</span> +</span><span id="Hive.Generator-522"><a href="#Hive.Generator-522"><span class="linenos">522</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-523"><a href="#Hive.Generator-523"><span class="linenos">523</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-524"><a href="#Hive.Generator-524"><span class="linenos">524</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Create</span><span class="p">:</span> <span class="n">preprocess</span><span class="p">(</span> +</span><span id="Hive.Generator-525"><a href="#Hive.Generator-525"><span class="linenos">525</span></a> <span class="p">[</span> +</span><span id="Hive.Generator-526"><a href="#Hive.Generator-526"><span class="linenos">526</span></a> <span class="n">remove_unique_constraints</span><span class="p">,</span> +</span><span id="Hive.Generator-527"><a href="#Hive.Generator-527"><span class="linenos">527</span></a> <span class="n">ctas_with_tmp_tables_to_create_tmp_view</span><span class="p">,</span> +</span><span id="Hive.Generator-528"><a href="#Hive.Generator-528"><span class="linenos">528</span></a> <span class="n">move_schema_columns_to_partitioned_by</span><span class="p">,</span> +</span><span id="Hive.Generator-529"><a href="#Hive.Generator-529"><span class="linenos">529</span></a> <span class="p">]</span> +</span><span id="Hive.Generator-530"><a href="#Hive.Generator-530"><span class="linenos">530</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-531"><a href="#Hive.Generator-531"><span class="linenos">531</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">"PERCENTILE"</span><span class="p">),</span> +</span><span id="Hive.Generator-532"><a href="#Hive.Generator-532"><span class="linenos">532</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">"PERCENTILE_APPROX"</span><span class="p">),</span> +</span><span id="Hive.Generator-533"><a href="#Hive.Generator-533"><span class="linenos">533</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-534"><a href="#Hive.Generator-534"><span class="linenos">534</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-535"><a href="#Hive.Generator-535"><span class="linenos">535</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">"RLIKE"</span><span class="p">),</span> +</span><span id="Hive.Generator-536"><a href="#Hive.Generator-536"><span class="linenos">536</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">"SPLIT"</span><span class="p">),</span> +</span><span id="Hive.Generator-537"><a href="#Hive.Generator-537"><span class="linenos">537</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-538"><a href="#Hive.Generator-538"><span class="linenos">538</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-539"><a href="#Hive.Generator-539"><span class="linenos">539</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-540"><a href="#Hive.Generator-540"><span class="linenos">540</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ArrayUniqueAgg</span><span class="p">:</span> <span class="n">rename_func</span><span class="p">(</span><span class="s2">"COLLECT_SET"</span><span class="p">),</span> +</span><span id="Hive.Generator-541"><a href="#Hive.Generator-541"><span class="linenos">541</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="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span> +</span><span id="Hive.Generator-542"><a href="#Hive.Generator-542"><span class="linenos">542</span></a> <span class="s2">"SPLIT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"CONCAT"</span><span class="p">,</span> <span class="s2">"'</span><span class="se">\\\\</span><span class="s2">Q'"</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-543"><a href="#Hive.Generator-543"><span class="linenos">543</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-544"><a href="#Hive.Generator-544"><span class="linenos">544</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-545"><a href="#Hive.Generator-545"><span class="linenos">545</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-546"><a href="#Hive.Generator-546"><span class="linenos">546</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-547"><a href="#Hive.Generator-547"><span class="linenos">547</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-548"><a href="#Hive.Generator-548"><span class="linenos">548</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-549"><a href="#Hive.Generator-549"><span class="linenos">549</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">"TO_DATE"</span><span class="p">),</span> +</span><span id="Hive.Generator-550"><a href="#Hive.Generator-550"><span class="linenos">550</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-551"><a href="#Hive.Generator-551"><span class="linenos">551</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="Hive.Generator-552"><a href="#Hive.Generator-552"><span class="linenos">552</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TimeToStr</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"DATE_FORMAT"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">format_time</span><span class="p">(</span><span class="n">e</span><span class="p">)),</span> +</span><span id="Hive.Generator-553"><a href="#Hive.Generator-553"><span class="linenos">553</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">"UNIX_TIMESTAMP"</span><span class="p">),</span> +</span><span id="Hive.Generator-554"><a href="#Hive.Generator-554"><span class="linenos">554</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">"BASE64"</span><span class="p">),</span> +</span><span id="Hive.Generator-555"><a href="#Hive.Generator-555"><span class="linenos">555</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDiToDi</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> +</span><span id="Hive.Generator-556"><a href="#Hive.Generator-556"><span class="linenos">556</span></a> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS STRING), '-', ''), 1, 8) AS INT)"</span><span class="p">,</span> +</span><span id="Hive.Generator-557"><a href="#Hive.Generator-557"><span class="linenos">557</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsAdd</span><span class="p">:</span> <span class="n">_add_date_sql</span><span class="p">,</span> +</span><span id="Hive.Generator-558"><a href="#Hive.Generator-558"><span class="linenos">558</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">TsOrDsDiff</span><span class="p">:</span> <span class="n">_date_diff_sql</span><span class="p">,</span> +</span><span id="Hive.Generator-559"><a href="#Hive.Generator-559"><span class="linenos">559</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-560"><a href="#Hive.Generator-560"><span class="linenos">560</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-561"><a href="#Hive.Generator-561"><span class="linenos">561</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-562"><a href="#Hive.Generator-562"><span class="linenos">562</span></a> <span class="s2">"FROM_UNIXTIME"</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="s2">"hive"</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-563"><a href="#Hive.Generator-563"><span class="linenos">563</span></a> <span class="p">),</span> +</span><span id="Hive.Generator-564"><a href="#Hive.Generator-564"><span class="linenos">564</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">UnixToTime</span><span class="p">:</span> <span class="n">_unix_to_time_sql</span><span class="p">,</span> +</span><span id="Hive.Generator-565"><a href="#Hive.Generator-565"><span class="linenos">565</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">"FROM_UNIXTIME"</span><span class="p">),</span> +</span><span id="Hive.Generator-566"><a href="#Hive.Generator-566"><span class="linenos">566</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">"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">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> </span><span id="Hive.Generator-567"><a href="#Hive.Generator-567"><span class="linenos">567</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">"FORMAT_NUMBER"</span><span class="p">),</span> </span><span id="Hive.Generator-568"><a href="#Hive.Generator-568"><span class="linenos">568</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">""</span><span class="p">),</span> </span><span id="Hive.Generator-569"><a href="#Hive.Generator-569"><span class="linenos">569</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ClusteredColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> @@ -2644,99 +2687,117 @@ Default: 3</li> </span><span id="Hive.Generator-573"><a href="#Hive.Generator-573"><span class="linenos">573</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">NotForReplicationColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="Hive.Generator-574"><a href="#Hive.Generator-574"><span class="linenos">574</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnProperty</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span><span id="Hive.Generator-575"><a href="#Hive.Generator-575"><span class="linenos">575</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">PrimaryKeyColumnConstraint</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"PRIMARY KEY"</span><span class="p">,</span> -</span><span id="Hive.Generator-576"><a href="#Hive.Generator-576"><span class="linenos">576</span></a> <span class="p">}</span> -</span><span id="Hive.Generator-577"><a href="#Hive.Generator-577"><span class="linenos">577</span></a> -</span><span id="Hive.Generator-578"><a href="#Hive.Generator-578"><span class="linenos">578</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Hive.Generator-579"><a href="#Hive.Generator-579"><span class="linenos">579</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-580"><a href="#Hive.Generator-580"><span class="linenos">580</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-581"><a href="#Hive.Generator-581"><span class="linenos">581</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-582"><a href="#Hive.Generator-582"><span class="linenos">582</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-583"><a href="#Hive.Generator-583"><span class="linenos">583</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-584"><a href="#Hive.Generator-584"><span class="linenos">584</span></a> <span class="p">}</span> -</span><span id="Hive.Generator-585"><a href="#Hive.Generator-585"><span class="linenos">585</span></a> -</span><span id="Hive.Generator-586"><a href="#Hive.Generator-586"><span class="linenos">586</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-587"><a href="#Hive.Generator-587"><span class="linenos">587</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">):</span> -</span><span id="Hive.Generator-588"><a href="#Hive.Generator-588"><span class="linenos">588</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> -</span><span id="Hive.Generator-589"><a href="#Hive.Generator-589"><span class="linenos">589</span></a> <span class="k">return</span> <span class="s2">""</span> -</span><span id="Hive.Generator-590"><a href="#Hive.Generator-590"><span class="linenos">590</span></a> -</span><span id="Hive.Generator-591"><a href="#Hive.Generator-591"><span class="linenos">591</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive.Generator-592"><a href="#Hive.Generator-592"><span class="linenos">592</span></a> -</span><span id="Hive.Generator-593"><a href="#Hive.Generator-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-594"><a href="#Hive.Generator-594"><span class="linenos">594</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive.Generator-595"><a href="#Hive.Generator-595"><span class="linenos">595</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> -</span><span id="Hive.Generator-596"><a href="#Hive.Generator-596"><span class="linenos">596</span></a> -</span><span id="Hive.Generator-597"><a href="#Hive.Generator-597"><span class="linenos">597</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> -</span><span id="Hive.Generator-598"><a href="#Hive.Generator-598"><span class="linenos">598</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> -</span><span id="Hive.Generator-599"><a href="#Hive.Generator-599"><span class="linenos">599</span></a> -</span><span id="Hive.Generator-600"><a href="#Hive.Generator-600"><span class="linenos">600</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> -</span><span id="Hive.Generator-601"><a href="#Hive.Generator-601"><span class="linenos">601</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> -</span><span id="Hive.Generator-602"><a href="#Hive.Generator-602"><span class="linenos">602</span></a> <span class="k">return</span> <span class="n">this</span> -</span><span id="Hive.Generator-603"><a href="#Hive.Generator-603"><span class="linenos">603</span></a> -</span><span id="Hive.Generator-604"><a href="#Hive.Generator-604"><span class="linenos">604</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> -</span><span id="Hive.Generator-605"><a href="#Hive.Generator-605"><span class="linenos">605</span></a> -</span><span id="Hive.Generator-606"><a href="#Hive.Generator-606"><span class="linenos">606</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-607"><a href="#Hive.Generator-607"><span class="linenos">607</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> -</span><span id="Hive.Generator-608"><a href="#Hive.Generator-608"><span class="linenos">608</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> -</span><span id="Hive.Generator-609"><a href="#Hive.Generator-609"><span class="linenos">609</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> -</span><span id="Hive.Generator-610"><a href="#Hive.Generator-610"><span class="linenos">610</span></a> -</span><span id="Hive.Generator-611"><a href="#Hive.Generator-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive.Generator-612"><a href="#Hive.Generator-612"><span class="linenos">612</span></a> -</span><span id="Hive.Generator-613"><a href="#Hive.Generator-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-614"><a href="#Hive.Generator-614"><span class="linenos">614</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> -</span><span id="Hive.Generator-615"><a href="#Hive.Generator-615"><span class="linenos">615</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> -</span><span id="Hive.Generator-616"><a href="#Hive.Generator-616"><span class="linenos">616</span></a> -</span><span id="Hive.Generator-617"><a href="#Hive.Generator-617"><span class="linenos">617</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive.Generator-618"><a href="#Hive.Generator-618"><span class="linenos">618</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Hive.Generator-619"><a href="#Hive.Generator-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> -</span><span id="Hive.Generator-620"><a href="#Hive.Generator-620"><span class="linenos">620</span></a> -</span><span id="Hive.Generator-621"><a href="#Hive.Generator-621"><span class="linenos">621</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-622"><a href="#Hive.Generator-622"><span class="linenos">622</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">"serde_properties"</span><span class="p">)</span> -</span><span id="Hive.Generator-623"><a href="#Hive.Generator-623"><span class="linenos">623</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="Hive.Generator-624"><a href="#Hive.Generator-624"><span class="linenos">624</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> -</span><span id="Hive.Generator-625"><a href="#Hive.Generator-625"><span class="linenos">625</span></a> -</span><span id="Hive.Generator-626"><a href="#Hive.Generator-626"><span class="linenos">626</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-627"><a href="#Hive.Generator-627"><span class="linenos">627</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-628"><a href="#Hive.Generator-628"><span class="linenos">628</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> -</span><span id="Hive.Generator-629"><a href="#Hive.Generator-629"><span class="linenos">629</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-630"><a href="#Hive.Generator-630"><span class="linenos">630</span></a> <span class="p">)</span> -</span><span id="Hive.Generator-631"><a href="#Hive.Generator-631"><span class="linenos">631</span></a> -</span><span id="Hive.Generator-632"><a href="#Hive.Generator-632"><span class="linenos">632</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-633"><a href="#Hive.Generator-633"><span class="linenos">633</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">"TBLPROPERTIES"</span><span class="p">))</span> -</span><span id="Hive.Generator-634"><a href="#Hive.Generator-634"><span class="linenos">634</span></a> -</span><span id="Hive.Generator-635"><a href="#Hive.Generator-635"><span class="linenos">635</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-636"><a href="#Hive.Generator-636"><span class="linenos">636</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> -</span><span id="Hive.Generator-637"><a href="#Hive.Generator-637"><span class="linenos">637</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> -</span><span id="Hive.Generator-638"><a href="#Hive.Generator-638"><span class="linenos">638</span></a> <span class="p">):</span> -</span><span id="Hive.Generator-639"><a href="#Hive.Generator-639"><span class="linenos">639</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">"text"</span><span class="p">)</span> -</span><span id="Hive.Generator-640"><a href="#Hive.Generator-640"><span class="linenos">640</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> -</span><span id="Hive.Generator-641"><a href="#Hive.Generator-641"><span class="linenos">641</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> -</span><span id="Hive.Generator-642"><a href="#Hive.Generator-642"><span class="linenos">642</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-643"><a href="#Hive.Generator-643"><span class="linenos">643</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-644"><a href="#Hive.Generator-644"><span class="linenos">644</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">"float"</span><span class="p">):</span> -</span><span id="Hive.Generator-645"><a href="#Hive.Generator-645"><span class="linenos">645</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">DataTypeParam</span><span class="p">)</span> -</span><span id="Hive.Generator-646"><a href="#Hive.Generator-646"><span class="linenos">646</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> -</span><span id="Hive.Generator-647"><a href="#Hive.Generator-647"><span class="linenos">647</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-648"><a href="#Hive.Generator-648"><span class="linenos">648</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="Hive.Generator-649"><a href="#Hive.Generator-649"><span class="linenos">649</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> -</span><span id="Hive.Generator-650"><a href="#Hive.Generator-650"><span class="linenos">650</span></a> <span class="p">)</span> +</span><span id="Hive.Generator-576"><a href="#Hive.Generator-576"><span class="linenos">576</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ParseJSON</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="Hive.Generator-577"><a href="#Hive.Generator-577"><span class="linenos">577</span></a> <span class="p">}</span> +</span><span id="Hive.Generator-578"><a href="#Hive.Generator-578"><span class="linenos">578</span></a> +</span><span id="Hive.Generator-579"><a href="#Hive.Generator-579"><span class="linenos">579</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Hive.Generator-580"><a href="#Hive.Generator-580"><span class="linenos">580</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-581"><a href="#Hive.Generator-581"><span class="linenos">581</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-582"><a href="#Hive.Generator-582"><span class="linenos">582</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-583"><a href="#Hive.Generator-583"><span class="linenos">583</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-584"><a href="#Hive.Generator-584"><span class="linenos">584</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">WithDataProperty</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-585"><a href="#Hive.Generator-585"><span class="linenos">585</span></a> <span class="p">}</span> +</span><span id="Hive.Generator-586"><a href="#Hive.Generator-586"><span class="linenos">586</span></a> +</span><span id="Hive.Generator-587"><a href="#Hive.Generator-587"><span class="linenos">587</span></a> <span class="k">def</span> <span class="nf">_jsonpathkey_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">JSONPathKey</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-588"><a href="#Hive.Generator-588"><span class="linenos">588</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">this</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">JSONPathWildcard</span><span class="p">):</span> +</span><span id="Hive.Generator-589"><a href="#Hive.Generator-589"><span class="linenos">589</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Unsupported wildcard in JSONPathKey expression"</span><span class="p">)</span> +</span><span id="Hive.Generator-590"><a href="#Hive.Generator-590"><span class="linenos">590</span></a> <span class="k">return</span> <span class="s2">""</span> +</span><span id="Hive.Generator-591"><a href="#Hive.Generator-591"><span class="linenos">591</span></a> +</span><span id="Hive.Generator-592"><a href="#Hive.Generator-592"><span class="linenos">592</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_jsonpathkey_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive.Generator-593"><a href="#Hive.Generator-593"><span class="linenos">593</span></a> +</span><span id="Hive.Generator-594"><a href="#Hive.Generator-594"><span class="linenos">594</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-595"><a href="#Hive.Generator-595"><span class="linenos">595</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive.Generator-596"><a href="#Hive.Generator-596"><span class="linenos">596</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> +</span><span id="Hive.Generator-597"><a href="#Hive.Generator-597"><span class="linenos">597</span></a> +</span><span id="Hive.Generator-598"><a href="#Hive.Generator-598"><span class="linenos">598</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> +</span><span id="Hive.Generator-599"><a href="#Hive.Generator-599"><span class="linenos">599</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> +</span><span id="Hive.Generator-600"><a href="#Hive.Generator-600"><span class="linenos">600</span></a> +</span><span id="Hive.Generator-601"><a href="#Hive.Generator-601"><span class="linenos">601</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> +</span><span id="Hive.Generator-602"><a href="#Hive.Generator-602"><span class="linenos">602</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> +</span><span id="Hive.Generator-603"><a href="#Hive.Generator-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="n">this</span> +</span><span id="Hive.Generator-604"><a href="#Hive.Generator-604"><span class="linenos">604</span></a> +</span><span id="Hive.Generator-605"><a href="#Hive.Generator-605"><span class="linenos">605</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> +</span><span id="Hive.Generator-606"><a href="#Hive.Generator-606"><span class="linenos">606</span></a> +</span><span id="Hive.Generator-607"><a href="#Hive.Generator-607"><span class="linenos">607</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-608"><a href="#Hive.Generator-608"><span class="linenos">608</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> +</span><span id="Hive.Generator-609"><a href="#Hive.Generator-609"><span class="linenos">609</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> +</span><span id="Hive.Generator-610"><a href="#Hive.Generator-610"><span class="linenos">610</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> +</span><span id="Hive.Generator-611"><a href="#Hive.Generator-611"><span class="linenos">611</span></a> +</span><span id="Hive.Generator-612"><a href="#Hive.Generator-612"><span class="linenos">612</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive.Generator-613"><a href="#Hive.Generator-613"><span class="linenos">613</span></a> +</span><span id="Hive.Generator-614"><a href="#Hive.Generator-614"><span class="linenos">614</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-615"><a href="#Hive.Generator-615"><span class="linenos">615</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> +</span><span id="Hive.Generator-616"><a href="#Hive.Generator-616"><span class="linenos">616</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> +</span><span id="Hive.Generator-617"><a href="#Hive.Generator-617"><span class="linenos">617</span></a> +</span><span id="Hive.Generator-618"><a href="#Hive.Generator-618"><span class="linenos">618</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive.Generator-619"><a href="#Hive.Generator-619"><span class="linenos">619</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator-620"><a href="#Hive.Generator-620"><span class="linenos">620</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive.Generator-621"><a href="#Hive.Generator-621"><span class="linenos">621</span></a> +</span><span id="Hive.Generator-622"><a href="#Hive.Generator-622"><span class="linenos">622</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-623"><a href="#Hive.Generator-623"><span class="linenos">623</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">"serde_properties"</span><span class="p">)</span> +</span><span id="Hive.Generator-624"><a href="#Hive.Generator-624"><span class="linenos">624</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-625"><a href="#Hive.Generator-625"><span class="linenos">625</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive.Generator-626"><a href="#Hive.Generator-626"><span class="linenos">626</span></a> +</span><span id="Hive.Generator-627"><a href="#Hive.Generator-627"><span class="linenos">627</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-628"><a href="#Hive.Generator-628"><span class="linenos">628</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-629"><a href="#Hive.Generator-629"><span class="linenos">629</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> +</span><span id="Hive.Generator-630"><a href="#Hive.Generator-630"><span class="linenos">630</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-631"><a href="#Hive.Generator-631"><span class="linenos">631</span></a> <span class="p">)</span> +</span><span id="Hive.Generator-632"><a href="#Hive.Generator-632"><span class="linenos">632</span></a> +</span><span id="Hive.Generator-633"><a href="#Hive.Generator-633"><span class="linenos">633</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-634"><a href="#Hive.Generator-634"><span class="linenos">634</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> +</span><span id="Hive.Generator-635"><a href="#Hive.Generator-635"><span class="linenos">635</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> +</span><span id="Hive.Generator-636"><a href="#Hive.Generator-636"><span class="linenos">636</span></a> <span class="p">):</span> +</span><span id="Hive.Generator-637"><a href="#Hive.Generator-637"><span class="linenos">637</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">"text"</span><span class="p">)</span> +</span><span id="Hive.Generator-638"><a href="#Hive.Generator-638"><span class="linenos">638</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> +</span><span id="Hive.Generator-639"><a href="#Hive.Generator-639"><span class="linenos">639</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> +</span><span id="Hive.Generator-640"><a href="#Hive.Generator-640"><span class="linenos">640</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-641"><a href="#Hive.Generator-641"><span class="linenos">641</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-642"><a href="#Hive.Generator-642"><span class="linenos">642</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">"float"</span><span class="p">):</span> +</span><span id="Hive.Generator-643"><a href="#Hive.Generator-643"><span class="linenos">643</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">DataTypeParam</span><span class="p">)</span> +</span><span id="Hive.Generator-644"><a href="#Hive.Generator-644"><span class="linenos">644</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> +</span><span id="Hive.Generator-645"><a href="#Hive.Generator-645"><span class="linenos">645</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-646"><a href="#Hive.Generator-646"><span class="linenos">646</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="Hive.Generator-647"><a href="#Hive.Generator-647"><span class="linenos">647</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> +</span><span id="Hive.Generator-648"><a href="#Hive.Generator-648"><span class="linenos">648</span></a> <span class="p">)</span> +</span><span id="Hive.Generator-649"><a href="#Hive.Generator-649"><span class="linenos">649</span></a> +</span><span id="Hive.Generator-650"><a href="#Hive.Generator-650"><span class="linenos">650</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.Generator-651"><a href="#Hive.Generator-651"><span class="linenos">651</span></a> -</span><span id="Hive.Generator-652"><a href="#Hive.Generator-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive.Generator-653"><a href="#Hive.Generator-653"><span class="linenos">653</span></a> -</span><span id="Hive.Generator-654"><a href="#Hive.Generator-654"><span class="linenos">654</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-655"><a href="#Hive.Generator-655"><span class="linenos">655</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive.Generator-656"><a href="#Hive.Generator-656"><span class="linenos">656</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Hive.Generator-657"><a href="#Hive.Generator-657"><span class="linenos">657</span></a> -</span><span id="Hive.Generator-658"><a href="#Hive.Generator-658"><span class="linenos">658</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator-659"><a href="#Hive.Generator-659"><span class="linenos">659</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Hive.Generator-660"><a href="#Hive.Generator-660"><span class="linenos">660</span></a> -</span><span id="Hive.Generator-661"><a href="#Hive.Generator-661"><span class="linenos">661</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> -</span><span id="Hive.Generator-662"><a href="#Hive.Generator-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> -</span><span id="Hive.Generator-663"><a href="#Hive.Generator-663"><span class="linenos">663</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> -</span><span id="Hive.Generator-664"><a href="#Hive.Generator-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-665"><a href="#Hive.Generator-665"><span class="linenos">665</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Hive.Generator-666"><a href="#Hive.Generator-666"><span class="linenos">666</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="Hive.Generator-652"><a href="#Hive.Generator-652"><span class="linenos">652</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-653"><a href="#Hive.Generator-653"><span class="linenos">653</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive.Generator-654"><a href="#Hive.Generator-654"><span class="linenos">654</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Hive.Generator-655"><a href="#Hive.Generator-655"><span class="linenos">655</span></a> +</span><span id="Hive.Generator-656"><a href="#Hive.Generator-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-657"><a href="#Hive.Generator-657"><span class="linenos">657</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Hive.Generator-658"><a href="#Hive.Generator-658"><span class="linenos">658</span></a> +</span><span id="Hive.Generator-659"><a href="#Hive.Generator-659"><span class="linenos">659</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> +</span><span id="Hive.Generator-660"><a href="#Hive.Generator-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> +</span><span id="Hive.Generator-661"><a href="#Hive.Generator-661"><span class="linenos">661</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> +</span><span id="Hive.Generator-662"><a href="#Hive.Generator-662"><span class="linenos">662</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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-663"><a href="#Hive.Generator-663"><span class="linenos">663</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Hive.Generator-664"><a href="#Hive.Generator-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="Hive.Generator-665"><a href="#Hive.Generator-665"><span class="linenos">665</span></a> +</span><span id="Hive.Generator-666"><a href="#Hive.Generator-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> </span><span id="Hive.Generator-667"><a href="#Hive.Generator-667"><span class="linenos">667</span></a> -</span><span id="Hive.Generator-668"><a href="#Hive.Generator-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> +</span><span id="Hive.Generator-668"><a href="#Hive.Generator-668"><span class="linenos">668</span></a> <span class="k">def</span> <span class="nf">alterset_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">AlterSet</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-669"><a href="#Hive.Generator-669"><span class="linenos">669</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator-670"><a href="#Hive.Generator-670"><span class="linenos">670</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">exprs</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-671"><a href="#Hive.Generator-671"><span class="linenos">671</span></a> <span class="n">location</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">"location"</span><span class="p">)</span> +</span><span id="Hive.Generator-672"><a href="#Hive.Generator-672"><span class="linenos">672</span></a> <span class="n">location</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" LOCATION </span><span class="si">{</span><span class="n">location</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">location</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-673"><a href="#Hive.Generator-673"><span class="linenos">673</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"file_format"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">)</span> +</span><span id="Hive.Generator-674"><a href="#Hive.Generator-674"><span class="linenos">674</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" FILEFORMAT </span><span class="si">{</span><span class="n">file_format</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">file_format</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-675"><a href="#Hive.Generator-675"><span class="linenos">675</span></a> <span class="n">serde</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">"serde"</span><span class="p">)</span> +</span><span id="Hive.Generator-676"><a href="#Hive.Generator-676"><span class="linenos">676</span></a> <span class="n">serde</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" SERDE </span><span class="si">{</span><span class="n">serde</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-677"><a href="#Hive.Generator-677"><span class="linenos">677</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"tag"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">""</span><span class="p">)</span> +</span><span id="Hive.Generator-678"><a href="#Hive.Generator-678"><span class="linenos">678</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" TAGS </span><span class="si">{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">tags</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-679"><a href="#Hive.Generator-679"><span class="linenos">679</span></a> +</span><span id="Hive.Generator-680"><a href="#Hive.Generator-680"><span class="linenos">680</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"SET</span><span class="si">{</span><span class="n">serde</span><span class="si">}{</span><span class="n">exprs</span><span class="si">}{</span><span class="n">location</span><span class="si">}{</span><span class="n">file_format</span><span class="si">}{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Hive.Generator-681"><a href="#Hive.Generator-681"><span class="linenos">681</span></a> +</span><span id="Hive.Generator-682"><a href="#Hive.Generator-682"><span class="linenos">682</span></a> <span class="k">def</span> <span class="nf">serdeproperties_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">SerdeProperties</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator-683"><a href="#Hive.Generator-683"><span class="linenos">683</span></a> <span class="n">prefix</span> <span class="o">=</span> <span class="s2">"WITH "</span> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"with"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator-684"><a href="#Hive.Generator-684"><span class="linenos">684</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator-685"><a href="#Hive.Generator-685"><span class="linenos">685</span></a> +</span><span id="Hive.Generator-686"><a href="#Hive.Generator-686"><span class="linenos">686</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">SERDEPROPERTIES (</span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">)"</span> </span></pre></div> @@ -2913,11 +2974,23 @@ Default: True</li> </div> + <div id="Hive.Generator.WITH_PROPERTIES_PREFIX" class="classattr"> + <div class="attr variable"> + <span class="name">WITH_PROPERTIES_PREFIX</span> = +<span class="default_value">'TBLPROPERTIES'</span> + + + </div> + <a class="headerlink" href="#Hive.Generator.WITH_PROPERTIES_PREFIX"></a> + + + + </div> <div id="Hive.Generator.EXPRESSIONS_WITHOUT_NESTED_CTES" class="classattr"> <div class="attr variable"> <span class="name">EXPRESSIONS_WITHOUT_NESTED_CTES</span> = <input id="Hive.Generator.EXPRESSIONS_WITHOUT_NESTED_CTES-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> - <label class="view-value-button pdoc-button" for="Hive.Generator.EXPRESSIONS_WITHOUT_NESTED_CTES-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#Select">sqlglot.expressions.Select</a>'>, <class '<a href="../expressions.html#Union">sqlglot.expressions.Union</a>'>, <class '<a href="../expressions.html#Subquery">sqlglot.expressions.Subquery</a>'>, <class '<a href="../expressions.html#Insert">sqlglot.expressions.Insert</a>'>}</span> + <label class="view-value-button pdoc-button" for="Hive.Generator.EXPRESSIONS_WITHOUT_NESTED_CTES-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#Select">sqlglot.expressions.Select</a>'>, <class '<a href="../expressions.html#Union">sqlglot.expressions.Union</a>'>, <class '<a href="../expressions.html#Insert">sqlglot.expressions.Insert</a>'>, <class '<a href="../expressions.html#Subquery">sqlglot.expressions.Subquery</a>'>}</span> </div> @@ -2930,7 +3003,7 @@ Default: True</li> <div class="attr variable"> <span class="name">SUPPORTED_JSON_PATH_PARTS</span> = <input id="Hive.Generator.SUPPORTED_JSON_PATH_PARTS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> - <label class="view-value-button pdoc-button" for="Hive.Generator.SUPPORTED_JSON_PATH_PARTS-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>'>, <class '<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>'>, <class '<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>'>, <class '<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>'>}</span> + <label class="view-value-button pdoc-button" for="Hive.Generator.SUPPORTED_JSON_PATH_PARTS-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>'>, <class '<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>'>, <class '<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>'>, <class '<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>'>}</span> </div> @@ -2956,7 +3029,7 @@ Default: True</li> <div class="attr variable"> <span class="name">TRANSFORMS</span> = <input id="Hive.Generator.TRANSFORMS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> - <label class="view-value-button pdoc-button" for="Hive.Generator.TRANSFORMS-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>'>: <function <lambda>>, <class '<a href="../expressions.html#AllowedValuesProperty">sqlglot.expressions.AllowedValuesProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#EphemeralColumnConstraint">sqlglot.expressions.EphemeralColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExcludeColumnConstraint">sqlglot.expressions.ExcludeColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#IntervalSpan">sqlglot.expressions.IntervalSpan</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#JSONExtract">sqlglot.expressions.JSONExtract</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#JSONExtractScalar">sqlglot.expressions.JSONExtractScalar</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>'>: <function var_map_sql>, <class '<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#WithOperator">sqlglot.expressions.WithOperator</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#Group">sqlglot.expressions.Group</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Select">sqlglot.expressions.Select</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Property">sqlglot.expressions.Property</a>'>: <function _property_sql>, <class '<a href="../expressions.html#AnyValue">sqlglot.expressions.AnyValue</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>'>: <function approx_count_distinct_sql>, <class '<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class '<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class '<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ArraySort">sqlglot.expressions.ArraySort</a>'>: <function _array_sort_sql>, <class '<a href="../expressions.html#With">sqlglot.expressions.With</a>'>: <function no_recursive_cte_sql>, <class '<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#DateDiff">sqlglot.expressions.DateDiff</a>'>: <function _date_diff_sql>, <class '<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>'>: <function datestrtodate_sql>, <class '<a href="../expressions.html#DateSub">sqlglot.expressions.DateSub</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#FileFormatProperty">sqlglot.expressions.FileFormatProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#FromBase64">sqlglot.expressions.FromBase64</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#If">sqlglot.expressions.If</a>'>: <function if_sql.<locals>._if_sql>, <class '<a href="../expressions.html#ILike">sqlglot.expressions.ILike</a>'>: <function no_ilike_sql>, <class '<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>'>: <function _json_format_sql>, <class '<a href="../expressions.html#Left">sqlglot.expressions.Left</a>'>: <function left_to_substring_sql>, <class '<a href="../expressions.html#Map">sqlglot.expressions.Map</a>'>: <function var_map_sql>, <class '<a href="../expressions.html#Max">sqlglot.expressions.Max</a>'>: <function max_or_greatest>, <class '<a href="../expressions.html#MD5Digest">sqlglot.expressions.MD5Digest</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#Min">sqlglot.expressions.Min</a>'>: <function min_or_least>, <class '<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NotNullColumnConstraint">sqlglot.expressions.NotNullColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#Create">sqlglot.expressions.Create</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Quantile">sqlglot.expressions.Quantile</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ApproxQuantile">sqlglot.expressions.ApproxQuantile</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#RegexpExtract">sqlglot.expressions.RegexpExtract</a>'>: <function regexp_extract_sql>, <class '<a href="../expressions.html#RegexpReplace">sqlglot.expressions.RegexpReplace</a>'>: <function regexp_replace_sql>, <class '<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#Right">sqlglot.expressions.Right</a>'>: <function right_to_substring_sql>, <class '<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>'>: <function no_safe_divide_sql>, <class '<a href="../expressions.html#SchemaCommentProperty">sqlglot.expressions.SchemaCommentProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#ArrayUniqueAgg">sqlglot.expressions.ArrayUniqueAgg</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#Split">sqlglot.expressions.Split</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>'>: <function strposition_to_locate_sql>, <class '<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>'>: <function _str_to_date_sql>, <class '<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>'>: <function _str_to_time_sql>, <class '<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>'>: <function _str_to_unix_sql>, <class '<a href="../expressions.html#StructExtract">sqlglot.expressions.StructExtract</a>'>: <function struct_extract_sql>, <class '<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>'>: <function timestrtotime_sql>, <class '<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ToBase64">sqlglot.expressions.ToBase64</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>'>: <function _date_diff_sql>, <class '<a href="../expressions.html#TsOrDsToDate">sqlglot.expressions.TsOrDsToDate</a>'>: <function _to_date_sql>, <class '<a href="../expressions.html#TryCast">sqlglot.expressions.TryCast</a>'>: <function no_trycast_sql>, <class '<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>'>: <function _unix_to_time_sql>, <class '<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#PartitionedByProperty">sqlglot.expressions.PartitionedByProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#SerdeProperties">sqlglot.expressions.SerdeProperties</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NumberToStr">sqlglot.expressions.NumberToStr</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#National">sqlglot.expressions.National</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#PrimaryKeyColumnConstraint">sqlglot.expressions.PrimaryKeyColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>}</span> + <label class="view-value-button pdoc-button" for="Hive.Generator.TRANSFORMS-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#JSONPathKey">sqlglot.expressions.JSONPathKey</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathRoot">sqlglot.expressions.JSONPathRoot</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathSubscript">sqlglot.expressions.JSONPathSubscript</a>'>: <function <lambda>>, <class '<a href="../expressions.html#JSONPathWildcard">sqlglot.expressions.JSONPathWildcard</a>'>: <function <lambda>>, <class '<a href="../expressions.html#AllowedValuesProperty">sqlglot.expressions.AllowedValuesProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#EphemeralColumnConstraint">sqlglot.expressions.EphemeralColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExcludeColumnConstraint">sqlglot.expressions.ExcludeColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#IntervalSpan">sqlglot.expressions.IntervalSpan</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#JSONExtract">sqlglot.expressions.JSONExtract</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#JSONExtractScalar">sqlglot.expressions.JSONExtractScalar</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#StrictProperty">sqlglot.expressions.StrictProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#Timestamp">sqlglot.expressions.Timestamp</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ToMap">sqlglot.expressions.ToMap</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>'>: <function var_map_sql>, <class '<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#WithOperator">sqlglot.expressions.WithOperator</a>'>: <function Generator.<lambda>>, <class '<a href="../expressions.html#Group">sqlglot.expressions.Group</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Select">sqlglot.expressions.Select</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Property">sqlglot.expressions.Property</a>'>: <function _property_sql>, <class '<a href="../expressions.html#AnyValue">sqlglot.expressions.AnyValue</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ApproxDistinct">sqlglot.expressions.ApproxDistinct</a>'>: <function approx_count_distinct_sql>, <class '<a href="../expressions.html#ArgMax">sqlglot.expressions.ArgMax</a>'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class '<a href="../expressions.html#ArgMin">sqlglot.expressions.ArgMin</a>'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class '<a href="../expressions.html#ArrayConcat">sqlglot.expressions.ArrayConcat</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ArrayToString">sqlglot.expressions.ArrayToString</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#ArraySize">sqlglot.expressions.ArraySize</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ArraySort">sqlglot.expressions.ArraySort</a>'>: <function _array_sort_sql>, <class '<a href="../expressions.html#With">sqlglot.expressions.With</a>'>: <function no_recursive_cte_sql>, <class '<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#DateDiff">sqlglot.expressions.DateDiff</a>'>: <function _date_diff_sql>, <class '<a href="../expressions.html#DateStrToDate">sqlglot.expressions.DateStrToDate</a>'>: <function datestrtodate_sql>, <class '<a href="../expressions.html#DateSub">sqlglot.expressions.DateSub</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#DateToDi">sqlglot.expressions.DateToDi</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#DiToDate">sqlglot.expressions.DiToDate</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#FileFormatProperty">sqlglot.expressions.FileFormatProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#FromBase64">sqlglot.expressions.FromBase64</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#If">sqlglot.expressions.If</a>'>: <function if_sql.<locals>._if_sql>, <class '<a href="../expressions.html#ILike">sqlglot.expressions.ILike</a>'>: <function no_ilike_sql>, <class '<a href="../expressions.html#IsNan">sqlglot.expressions.IsNan</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#JSONFormat">sqlglot.expressions.JSONFormat</a>'>: <function _json_format_sql>, <class '<a href="../expressions.html#Left">sqlglot.expressions.Left</a>'>: <function left_to_substring_sql>, <class '<a href="../expressions.html#Map">sqlglot.expressions.Map</a>'>: <function var_map_sql>, <class '<a href="../expressions.html#Max">sqlglot.expressions.Max</a>'>: <function max_or_greatest>, <class '<a href="../expressions.html#MD5Digest">sqlglot.expressions.MD5Digest</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#Min">sqlglot.expressions.Min</a>'>: <function min_or_least>, <class '<a href="../expressions.html#MonthsBetween">sqlglot.expressions.MonthsBetween</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NotNullColumnConstraint">sqlglot.expressions.NotNullColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#Create">sqlglot.expressions.Create</a>'>: <function preprocess.<locals>._to_sql>, <class '<a href="../expressions.html#Quantile">sqlglot.expressions.Quantile</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ApproxQuantile">sqlglot.expressions.ApproxQuantile</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#RegexpExtract">sqlglot.expressions.RegexpExtract</a>'>: <function regexp_extract_sql>, <class '<a href="../expressions.html#RegexpReplace">sqlglot.expressions.RegexpReplace</a>'>: <function regexp_replace_sql>, <class '<a href="../expressions.html#RegexpLike">sqlglot.expressions.RegexpLike</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#RegexpSplit">sqlglot.expressions.RegexpSplit</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#Right">sqlglot.expressions.Right</a>'>: <function right_to_substring_sql>, <class '<a href="../expressions.html#SafeDivide">sqlglot.expressions.SafeDivide</a>'>: <function no_safe_divide_sql>, <class '<a href="../expressions.html#SchemaCommentProperty">sqlglot.expressions.SchemaCommentProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#ArrayUniqueAgg">sqlglot.expressions.ArrayUniqueAgg</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#Split">sqlglot.expressions.Split</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#StrPosition">sqlglot.expressions.StrPosition</a>'>: <function strposition_to_locate_sql>, <class '<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>'>: <function _str_to_date_sql>, <class '<a href="../expressions.html#StrToTime">sqlglot.expressions.StrToTime</a>'>: <function _str_to_time_sql>, <class '<a href="../expressions.html#StrToUnix">sqlglot.expressions.StrToUnix</a>'>: <function _str_to_unix_sql>, <class '<a href="../expressions.html#StructExtract">sqlglot.expressions.StructExtract</a>'>: <function struct_extract_sql>, <class '<a href="../expressions.html#TimeStrToDate">sqlglot.expressions.TimeStrToDate</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TimeStrToTime">sqlglot.expressions.TimeStrToTime</a>'>: <function timestrtotime_sql>, <class '<a href="../expressions.html#TimeStrToUnix">sqlglot.expressions.TimeStrToUnix</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TimeToStr">sqlglot.expressions.TimeToStr</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#TimeToUnix">sqlglot.expressions.TimeToUnix</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#ToBase64">sqlglot.expressions.ToBase64</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#TsOrDiToDi">sqlglot.expressions.TsOrDiToDi</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>'>: <function _add_date_sql>, <class '<a href="../expressions.html#TsOrDsDiff">sqlglot.expressions.TsOrDsDiff</a>'>: <function _date_diff_sql>, <class '<a href="../expressions.html#TsOrDsToDate">sqlglot.expressions.TsOrDsToDate</a>'>: <function _to_date_sql>, <class '<a href="../expressions.html#TryCast">sqlglot.expressions.TryCast</a>'>: <function no_trycast_sql>, <class '<a href="../expressions.html#UnixToStr">sqlglot.expressions.UnixToStr</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#UnixToTime">sqlglot.expressions.UnixToTime</a>'>: <function _unix_to_time_sql>, <class '<a href="../expressions.html#UnixToTimeStr">sqlglot.expressions.UnixToTimeStr</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#PartitionedByProperty">sqlglot.expressions.PartitionedByProperty</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#NumberToStr">sqlglot.expressions.NumberToStr</a>'>: <function rename_func.<locals>.<lambda>>, <class '<a href="../expressions.html#National">sqlglot.expressions.National</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#PrimaryKeyColumnConstraint">sqlglot.expressions.PrimaryKeyColumnConstraint</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>, <class '<a href="../expressions.html#ParseJSON">sqlglot.expressions.ParseJSON</a>'>: <function <a href="#Hive.Generator">Hive.Generator</a>.<lambda>>}</span> </div> @@ -2969,7 +3042,7 @@ Default: True</li> <div class="attr variable"> <span class="name">PROPERTIES_LOCATION</span> = <input id="Hive.Generator.PROPERTIES_LOCATION-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> - <label class="view-value-button pdoc-button" for="Hive.Generator.PROPERTIES_LOCATION-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#AllowedValuesProperty">sqlglot.expressions.AllowedValuesProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#AlgorithmProperty">sqlglot.expressions.AlgorithmProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#AutoIncrementProperty">sqlglot.expressions.AutoIncrementProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#BlockCompressionProperty">sqlglot.expressions.BlockCompressionProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ChecksumProperty">sqlglot.expressions.ChecksumProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#CollateProperty">sqlglot.expressions.CollateProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Cluster">sqlglot.expressions.Cluster</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ClusteredByProperty">sqlglot.expressions.ClusteredByProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DataBlocksizeProperty">sqlglot.expressions.DataBlocksizeProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#DefinerProperty">sqlglot.expressions.DefinerProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#DictRange">sqlglot.expressions.DictRange</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DictProperty">sqlglot.expressions.DictProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DistKeyProperty">sqlglot.expressions.DistKeyProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DistStyleProperty">sqlglot.expressions.DistStyleProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#EngineProperty">sqlglot.expressions.EngineProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#FallbackProperty">sqlglot.expressions.FallbackProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#FileFormatProperty">sqlglot.expressions.FileFormatProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#FreespaceProperty">sqlglot.expressions.FreespaceProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>'>: <Location.POST_WITH: 'POST_WITH'>, <class '<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#IsolatedLoadingProperty">sqlglot.expressions.IsolatedLoadingProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#JournalProperty">sqlglot.expressions.JournalProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LikeProperty">sqlglot.expressions.LikeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LockProperty">sqlglot.expressions.LockProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LockingProperty">sqlglot.expressions.LockingProperty</a>'>: <Location.POST_ALIAS: 'POST_ALIAS'>, <class '<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#MergeBlockRatioProperty">sqlglot.expressions.MergeBlockRatioProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#Order">sqlglot.expressions.Order</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PartitionedByProperty">sqlglot.expressions.PartitionedByProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PartitionedOfProperty">sqlglot.expressions.PartitionedOfProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PrimaryKey">sqlglot.expressions.PrimaryKey</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Property">sqlglot.expressions.Property</a>'>: <Location.POST_WITH: 'POST_WITH'>, <class '<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatProperty">sqlglot.expressions.RowFormatProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatDelimitedProperty">sqlglot.expressions.RowFormatDelimitedProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatSerdeProperty">sqlglot.expressions.RowFormatSerdeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SchemaCommentProperty">sqlglot.expressions.SchemaCommentProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SerdeProperties">sqlglot.expressions.SerdeProperties</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Set">sqlglot.expressions.Set</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#SequenceProperties">sqlglot.expressions.SequenceProperties</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#SortKeyProperty">sqlglot.expressions.SortKeyProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#MergeTreeTTL">sqlglot.expressions.MergeTreeTTL</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>'>: <Location.UNSUPPORTED: 'UNSUPPORTED'>, <class '<a href="../expressions.html#WithDataProperty">sqlglot.expressions.WithDataProperty</a>'>: <Location.UNSUPPORTED: 'UNSUPPORTED'>, <class '<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#WithSystemVersioningProperty">sqlglot.expressions.WithSystemVersioningProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>}</span> + <label class="view-value-button pdoc-button" for="Hive.Generator.PROPERTIES_LOCATION-view-value"></label><span class="default_value">{<class '<a href="../expressions.html#AllowedValuesProperty">sqlglot.expressions.AllowedValuesProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#AlgorithmProperty">sqlglot.expressions.AlgorithmProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#AutoIncrementProperty">sqlglot.expressions.AutoIncrementProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#AutoRefreshProperty">sqlglot.expressions.AutoRefreshProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#BackupProperty">sqlglot.expressions.BackupProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#BlockCompressionProperty">sqlglot.expressions.BlockCompressionProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ChecksumProperty">sqlglot.expressions.ChecksumProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#CollateProperty">sqlglot.expressions.CollateProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Cluster">sqlglot.expressions.Cluster</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ClusteredByProperty">sqlglot.expressions.ClusteredByProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DataBlocksizeProperty">sqlglot.expressions.DataBlocksizeProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#DataDeletionProperty">sqlglot.expressions.DataDeletionProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DefinerProperty">sqlglot.expressions.DefinerProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#DictRange">sqlglot.expressions.DictRange</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DictProperty">sqlglot.expressions.DictProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DistKeyProperty">sqlglot.expressions.DistKeyProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#DistStyleProperty">sqlglot.expressions.DistStyleProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#EngineProperty">sqlglot.expressions.EngineProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#FallbackProperty">sqlglot.expressions.FallbackProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#FileFormatProperty">sqlglot.expressions.FileFormatProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#FreespaceProperty">sqlglot.expressions.FreespaceProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#GlobalProperty">sqlglot.expressions.GlobalProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>'>: <Location.POST_WITH: 'POST_WITH'>, <class '<a href="../expressions.html#InheritsProperty">sqlglot.expressions.InheritsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#IcebergProperty">sqlglot.expressions.IcebergProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#InputModelProperty">sqlglot.expressions.InputModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#IsolatedLoadingProperty">sqlglot.expressions.IsolatedLoadingProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#JournalProperty">sqlglot.expressions.JournalProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LikeProperty">sqlglot.expressions.LikeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LockProperty">sqlglot.expressions.LockProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#LockingProperty">sqlglot.expressions.LockingProperty</a>'>: <Location.POST_ALIAS: 'POST_ALIAS'>, <class '<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#MergeBlockRatioProperty">sqlglot.expressions.MergeBlockRatioProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#Order">sqlglot.expressions.Order</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#OutputModelProperty">sqlglot.expressions.OutputModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PartitionedByProperty">sqlglot.expressions.PartitionedByProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PartitionedOfProperty">sqlglot.expressions.PartitionedOfProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#PrimaryKey">sqlglot.expressions.PrimaryKey</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Property">sqlglot.expressions.Property</a>'>: <Location.POST_WITH: 'POST_WITH'>, <class '<a href="../expressions.html#RemoteWithConnectionModelProperty">sqlglot.expressions.RemoteWithConnectionModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatProperty">sqlglot.expressions.RowFormatProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatDelimitedProperty">sqlglot.expressions.RowFormatDelimitedProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#RowFormatSerdeProperty">sqlglot.expressions.RowFormatSerdeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SampleProperty">sqlglot.expressions.SampleProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SchemaCommentProperty">sqlglot.expressions.SchemaCommentProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SerdeProperties">sqlglot.expressions.SerdeProperties</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#Set">sqlglot.expressions.Set</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#SetConfigProperty">sqlglot.expressions.SetConfigProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SharingProperty">sqlglot.expressions.SharingProperty</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#SequenceProperties">sqlglot.expressions.SequenceProperties</a>'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class '<a href="../expressions.html#SortKeyProperty">sqlglot.expressions.SortKeyProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SqlReadWriteProperty">sqlglot.expressions.SqlReadWriteProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#StrictProperty">sqlglot.expressions.StrictProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#TransformModelProperty">sqlglot.expressions.TransformModelProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#MergeTreeTTL">sqlglot.expressions.MergeTreeTTL</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#UnloggedProperty">sqlglot.expressions.UnloggedProperty</a>'>: <Location.POST_CREATE: 'POST_CREATE'>, <class '<a href="../expressions.html#ViewAttributeProperty">sqlglot.expressions.ViewAttributeProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class '<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>'>: <Location.UNSUPPORTED: 'UNSUPPORTED'>, <class '<a href="../expressions.html#WithDataProperty">sqlglot.expressions.WithDataProperty</a>'>: <Location.UNSUPPORTED: 'UNSUPPORTED'>, <class '<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>'>: <Location.POST_NAME: 'POST_NAME'>, <class '<a href="../expressions.html#WithSystemVersioningProperty">sqlglot.expressions.WithSystemVersioningProperty</a>'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>}</span> </div> @@ -2989,18 +3062,18 @@ Default: True</li> </div> <a class="headerlink" href="#Hive.Generator.parameter_sql"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.parameter_sql-593"><a href="#Hive.Generator.parameter_sql-593"><span class="linenos">593</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.parameter_sql-594"><a href="#Hive.Generator.parameter_sql-594"><span class="linenos">594</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive.Generator.parameter_sql-595"><a href="#Hive.Generator.parameter_sql-595"><span class="linenos">595</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> -</span><span id="Hive.Generator.parameter_sql-596"><a href="#Hive.Generator.parameter_sql-596"><span class="linenos">596</span></a> -</span><span id="Hive.Generator.parameter_sql-597"><a href="#Hive.Generator.parameter_sql-597"><span class="linenos">597</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> -</span><span id="Hive.Generator.parameter_sql-598"><a href="#Hive.Generator.parameter_sql-598"><span class="linenos">598</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> -</span><span id="Hive.Generator.parameter_sql-599"><a href="#Hive.Generator.parameter_sql-599"><span class="linenos">599</span></a> -</span><span id="Hive.Generator.parameter_sql-600"><a href="#Hive.Generator.parameter_sql-600"><span class="linenos">600</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> -</span><span id="Hive.Generator.parameter_sql-601"><a href="#Hive.Generator.parameter_sql-601"><span class="linenos">601</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> -</span><span id="Hive.Generator.parameter_sql-602"><a href="#Hive.Generator.parameter_sql-602"><span class="linenos">602</span></a> <span class="k">return</span> <span class="n">this</span> -</span><span id="Hive.Generator.parameter_sql-603"><a href="#Hive.Generator.parameter_sql-603"><span class="linenos">603</span></a> -</span><span id="Hive.Generator.parameter_sql-604"><a href="#Hive.Generator.parameter_sql-604"><span class="linenos">604</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.parameter_sql-594"><a href="#Hive.Generator.parameter_sql-594"><span class="linenos">594</span></a> <span class="k">def</span> <span class="nf">parameter_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">Parameter</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.parameter_sql-595"><a href="#Hive.Generator.parameter_sql-595"><span class="linenos">595</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive.Generator.parameter_sql-596"><a href="#Hive.Generator.parameter_sql-596"><span class="linenos">596</span></a> <span class="n">expression_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"expression"</span><span class="p">)</span> +</span><span id="Hive.Generator.parameter_sql-597"><a href="#Hive.Generator.parameter_sql-597"><span class="linenos">597</span></a> +</span><span id="Hive.Generator.parameter_sql-598"><a href="#Hive.Generator.parameter_sql-598"><span class="linenos">598</span></a> <span class="n">parent</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">parent</span> +</span><span id="Hive.Generator.parameter_sql-599"><a href="#Hive.Generator.parameter_sql-599"><span class="linenos">599</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">expression_sql</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">expression_sql</span> <span class="k">else</span> <span class="n">this</span> +</span><span id="Hive.Generator.parameter_sql-600"><a href="#Hive.Generator.parameter_sql-600"><span class="linenos">600</span></a> +</span><span id="Hive.Generator.parameter_sql-601"><a href="#Hive.Generator.parameter_sql-601"><span class="linenos">601</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">EQ</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parent</span><span class="o">.</span><span class="n">parent</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">SetItem</span><span class="p">):</span> +</span><span id="Hive.Generator.parameter_sql-602"><a href="#Hive.Generator.parameter_sql-602"><span class="linenos">602</span></a> <span class="c1"># We need to produce SET key = value instead of SET ${key} = value</span> +</span><span id="Hive.Generator.parameter_sql-603"><a href="#Hive.Generator.parameter_sql-603"><span class="linenos">603</span></a> <span class="k">return</span> <span class="n">this</span> +</span><span id="Hive.Generator.parameter_sql-604"><a href="#Hive.Generator.parameter_sql-604"><span class="linenos">604</span></a> +</span><span id="Hive.Generator.parameter_sql-605"><a href="#Hive.Generator.parameter_sql-605"><span class="linenos">605</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"$</span><span class="se">{{</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="se">}}</span><span class="s2">"</span> </span></pre></div> @@ -3018,12 +3091,12 @@ Default: True</li> </div> <a class="headerlink" href="#Hive.Generator.schema_sql"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.schema_sql-606"><a href="#Hive.Generator.schema_sql-606"><span class="linenos">606</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.schema_sql-607"><a href="#Hive.Generator.schema_sql-607"><span class="linenos">607</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> -</span><span id="Hive.Generator.schema_sql-608"><a href="#Hive.Generator.schema_sql-608"><span class="linenos">608</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> -</span><span id="Hive.Generator.schema_sql-609"><a href="#Hive.Generator.schema_sql-609"><span class="linenos">609</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> -</span><span id="Hive.Generator.schema_sql-610"><a href="#Hive.Generator.schema_sql-610"><span class="linenos">610</span></a> -</span><span id="Hive.Generator.schema_sql-611"><a href="#Hive.Generator.schema_sql-611"><span class="linenos">611</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_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.schema_sql-607"><a href="#Hive.Generator.schema_sql-607"><span class="linenos">607</span></a> <span class="k">def</span> <span class="nf">schema_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">Schema</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.schema_sql-608"><a href="#Hive.Generator.schema_sql-608"><span class="linenos">608</span></a> <span class="k">for</span> <span class="n">ordered</span> <span class="ow">in</span> <span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">):</span> +</span><span id="Hive.Generator.schema_sql-609"><a href="#Hive.Generator.schema_sql-609"><span class="linenos">609</span></a> <span class="k">if</span> <span class="n">ordered</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span> +</span><span id="Hive.Generator.schema_sql-610"><a href="#Hive.Generator.schema_sql-610"><span class="linenos">610</span></a> <span class="n">ordered</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"desc"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> +</span><span id="Hive.Generator.schema_sql-611"><a href="#Hive.Generator.schema_sql-611"><span class="linenos">611</span></a> +</span><span id="Hive.Generator.schema_sql-612"><a href="#Hive.Generator.schema_sql-612"><span class="linenos">612</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">schema_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> </span></pre></div> @@ -3041,13 +3114,13 @@ Default: True</li> </div> <a class="headerlink" href="#Hive.Generator.constraint_sql"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.constraint_sql-613"><a href="#Hive.Generator.constraint_sql-613"><span class="linenos">613</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.constraint_sql-614"><a href="#Hive.Generator.constraint_sql-614"><span class="linenos">614</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> -</span><span id="Hive.Generator.constraint_sql-615"><a href="#Hive.Generator.constraint_sql-615"><span class="linenos">615</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> -</span><span id="Hive.Generator.constraint_sql-616"><a href="#Hive.Generator.constraint_sql-616"><span class="linenos">616</span></a> -</span><span id="Hive.Generator.constraint_sql-617"><a href="#Hive.Generator.constraint_sql-617"><span class="linenos">617</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="Hive.Generator.constraint_sql-618"><a href="#Hive.Generator.constraint_sql-618"><span class="linenos">618</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Hive.Generator.constraint_sql-619"><a href="#Hive.Generator.constraint_sql-619"><span class="linenos">619</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.constraint_sql-614"><a href="#Hive.Generator.constraint_sql-614"><span class="linenos">614</span></a> <span class="k">def</span> <span class="nf">constraint_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">Constraint</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.constraint_sql-615"><a href="#Hive.Generator.constraint_sql-615"><span class="linenos">615</span></a> <span class="k">for</span> <span class="n">prop</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">find_all</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">)):</span> +</span><span id="Hive.Generator.constraint_sql-616"><a href="#Hive.Generator.constraint_sql-616"><span class="linenos">616</span></a> <span class="n">prop</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> +</span><span id="Hive.Generator.constraint_sql-617"><a href="#Hive.Generator.constraint_sql-617"><span class="linenos">617</span></a> +</span><span id="Hive.Generator.constraint_sql-618"><a href="#Hive.Generator.constraint_sql-618"><span class="linenos">618</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="Hive.Generator.constraint_sql-619"><a href="#Hive.Generator.constraint_sql-619"><span class="linenos">619</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator.constraint_sql-620"><a href="#Hive.Generator.constraint_sql-620"><span class="linenos">620</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"CONSTRAINT </span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">expressions</span><span class="si">}</span><span class="s2">"</span> </span></pre></div> @@ -3065,10 +3138,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-621"><a href="#Hive.Generator.rowformatserdeproperty_sql-621"><span class="linenos">621</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.rowformatserdeproperty_sql-622"><a href="#Hive.Generator.rowformatserdeproperty_sql-622"><span class="linenos">622</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">"serde_properties"</span><span class="p">)</span> -</span><span id="Hive.Generator.rowformatserdeproperty_sql-623"><a href="#Hive.Generator.rowformatserdeproperty_sql-623"><span class="linenos">623</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="Hive.Generator.rowformatserdeproperty_sql-624"><a href="#Hive.Generator.rowformatserdeproperty_sql-624"><span class="linenos">624</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.rowformatserdeproperty_sql-622"><a href="#Hive.Generator.rowformatserdeproperty_sql-622"><span class="linenos">622</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.rowformatserdeproperty_sql-623"><a href="#Hive.Generator.rowformatserdeproperty_sql-623"><span class="linenos">623</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">"serde_properties"</span><span class="p">)</span> +</span><span id="Hive.Generator.rowformatserdeproperty_sql-624"><a href="#Hive.Generator.rowformatserdeproperty_sql-624"><span class="linenos">624</span></a> <span class="n">serde_props</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde_props</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.rowformatserdeproperty_sql-625"><a href="#Hive.Generator.rowformatserdeproperty_sql-625"><span class="linenos">625</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"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">'this'</span><span class="p">)</span><span class="si">}{</span><span class="n">serde_props</span><span class="si">}</span><span class="s2">"</span> </span></pre></div> @@ -3086,30 +3159,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-626"><a href="#Hive.Generator.arrayagg_sql-626"><span class="linenos">626</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.arrayagg_sql-627"><a href="#Hive.Generator.arrayagg_sql-627"><span class="linenos">627</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-628"><a href="#Hive.Generator.arrayagg_sql-628"><span class="linenos">628</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> -</span><span id="Hive.Generator.arrayagg_sql-629"><a href="#Hive.Generator.arrayagg_sql-629"><span class="linenos">629</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-630"><a href="#Hive.Generator.arrayagg_sql-630"><span class="linenos">630</span></a> <span class="p">)</span> -</span></pre></div> - - - - - </div> - <div id="Hive.Generator.with_properties" class="classattr"> - <input id="Hive.Generator.with_properties-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> -<div class="attr function"> - - <span class="def">def</span> - <span class="name">with_properties</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">properties</span><span class="p">:</span> <span class="n"><a href="../expressions.html#Properties">sqlglot.expressions.Properties</a></span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span> - - <label class="view-source-button" for="Hive.Generator.with_properties-view-source"><span>View Source</span></label> - - </div> - <a class="headerlink" href="#Hive.Generator.with_properties"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.with_properties-632"><a href="#Hive.Generator.with_properties-632"><span class="linenos">632</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.with_properties-633"><a href="#Hive.Generator.with_properties-633"><span class="linenos">633</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">"TBLPROPERTIES"</span><span class="p">))</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.arrayagg_sql-627"><a href="#Hive.Generator.arrayagg_sql-627"><span class="linenos">627</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.arrayagg_sql-628"><a href="#Hive.Generator.arrayagg_sql-628"><span class="linenos">628</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-629"><a href="#Hive.Generator.arrayagg_sql-629"><span class="linenos">629</span></a> <span class="s2">"COLLECT_LIST"</span><span class="p">,</span> +</span><span id="Hive.Generator.arrayagg_sql-630"><a href="#Hive.Generator.arrayagg_sql-630"><span class="linenos">630</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-631"><a href="#Hive.Generator.arrayagg_sql-631"><span class="linenos">631</span></a> <span class="p">)</span> </span></pre></div> @@ -3127,24 +3181,24 @@ 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-635"><a href="#Hive.Generator.datatype_sql-635"><span class="linenos">635</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">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.datatype_sql-636"><a href="#Hive.Generator.datatype_sql-636"><span class="linenos">636</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> -</span><span id="Hive.Generator.datatype_sql-637"><a href="#Hive.Generator.datatype_sql-637"><span class="linenos">637</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> -</span><span id="Hive.Generator.datatype_sql-638"><a href="#Hive.Generator.datatype_sql-638"><span class="linenos">638</span></a> <span class="p">):</span> -</span><span id="Hive.Generator.datatype_sql-639"><a href="#Hive.Generator.datatype_sql-639"><span class="linenos">639</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">"text"</span><span class="p">)</span> -</span><span id="Hive.Generator.datatype_sql-640"><a href="#Hive.Generator.datatype_sql-640"><span class="linenos">640</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> -</span><span id="Hive.Generator.datatype_sql-641"><a href="#Hive.Generator.datatype_sql-641"><span class="linenos">641</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> -</span><span id="Hive.Generator.datatype_sql-642"><a href="#Hive.Generator.datatype_sql-642"><span class="linenos">642</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-643"><a href="#Hive.Generator.datatype_sql-643"><span class="linenos">643</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-644"><a href="#Hive.Generator.datatype_sql-644"><span class="linenos">644</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">"float"</span><span class="p">):</span> -</span><span id="Hive.Generator.datatype_sql-645"><a href="#Hive.Generator.datatype_sql-645"><span class="linenos">645</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">DataTypeParam</span><span class="p">)</span> -</span><span id="Hive.Generator.datatype_sql-646"><a href="#Hive.Generator.datatype_sql-646"><span class="linenos">646</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> -</span><span id="Hive.Generator.datatype_sql-647"><a href="#Hive.Generator.datatype_sql-647"><span class="linenos">647</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-648"><a href="#Hive.Generator.datatype_sql-648"><span class="linenos">648</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="Hive.Generator.datatype_sql-649"><a href="#Hive.Generator.datatype_sql-649"><span class="linenos">649</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> -</span><span id="Hive.Generator.datatype_sql-650"><a href="#Hive.Generator.datatype_sql-650"><span class="linenos">650</span></a> <span class="p">)</span> -</span><span id="Hive.Generator.datatype_sql-651"><a href="#Hive.Generator.datatype_sql-651"><span class="linenos">651</span></a> -</span><span id="Hive.Generator.datatype_sql-652"><a href="#Hive.Generator.datatype_sql-652"><span class="linenos">652</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">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-633"><a href="#Hive.Generator.datatype_sql-633"><span class="linenos">633</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">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.datatype_sql-634"><a href="#Hive.Generator.datatype_sql-634"><span class="linenos">634</span></a> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">this</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">PARAMETERIZABLE_TEXT_TYPES</span> <span class="ow">and</span> <span class="p">(</span> +</span><span id="Hive.Generator.datatype_sql-635"><a href="#Hive.Generator.datatype_sql-635"><span class="linenos">635</span></a> <span class="ow">not</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span> <span class="ow">or</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s2">"MAX"</span> +</span><span id="Hive.Generator.datatype_sql-636"><a href="#Hive.Generator.datatype_sql-636"><span class="linenos">636</span></a> <span class="p">):</span> +</span><span id="Hive.Generator.datatype_sql-637"><a href="#Hive.Generator.datatype_sql-637"><span class="linenos">637</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">"text"</span><span class="p">)</span> +</span><span id="Hive.Generator.datatype_sql-638"><a href="#Hive.Generator.datatype_sql-638"><span class="linenos">638</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="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="ow">and</span> <span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">:</span> +</span><span id="Hive.Generator.datatype_sql-639"><a href="#Hive.Generator.datatype_sql-639"><span class="linenos">639</span></a> <span class="n">expression</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"this"</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="o">.</span><span class="n">Type</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">)</span> +</span><span id="Hive.Generator.datatype_sql-640"><a href="#Hive.Generator.datatype_sql-640"><span class="linenos">640</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-641"><a href="#Hive.Generator.datatype_sql-641"><span class="linenos">641</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-642"><a href="#Hive.Generator.datatype_sql-642"><span class="linenos">642</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">"float"</span><span class="p">):</span> +</span><span id="Hive.Generator.datatype_sql-643"><a href="#Hive.Generator.datatype_sql-643"><span class="linenos">643</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">DataTypeParam</span><span class="p">)</span> +</span><span id="Hive.Generator.datatype_sql-644"><a href="#Hive.Generator.datatype_sql-644"><span class="linenos">644</span></a> <span class="k">if</span> <span class="n">size_expression</span><span class="p">:</span> +</span><span id="Hive.Generator.datatype_sql-645"><a href="#Hive.Generator.datatype_sql-645"><span class="linenos">645</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-646"><a href="#Hive.Generator.datatype_sql-646"><span class="linenos">646</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="Hive.Generator.datatype_sql-647"><a href="#Hive.Generator.datatype_sql-647"><span class="linenos">647</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">"float"</span><span class="p">)</span> <span class="k">if</span> <span class="n">size</span> <span class="o"><=</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">"double"</span><span class="p">)</span> +</span><span id="Hive.Generator.datatype_sql-648"><a href="#Hive.Generator.datatype_sql-648"><span class="linenos">648</span></a> <span class="p">)</span> +</span><span id="Hive.Generator.datatype_sql-649"><a href="#Hive.Generator.datatype_sql-649"><span class="linenos">649</span></a> +</span><span id="Hive.Generator.datatype_sql-650"><a href="#Hive.Generator.datatype_sql-650"><span class="linenos">650</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> @@ -3162,9 +3216,9 @@ Default: True</li> </div> <a class="headerlink" href="#Hive.Generator.version_sql"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.version_sql-654"><a href="#Hive.Generator.version_sql-654"><span class="linenos">654</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.version_sql-655"><a href="#Hive.Generator.version_sql-655"><span class="linenos">655</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> -</span><span id="Hive.Generator.version_sql-656"><a href="#Hive.Generator.version_sql-656"><span class="linenos">656</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.version_sql-652"><a href="#Hive.Generator.version_sql-652"><span class="linenos">652</span></a> <span class="k">def</span> <span class="nf">version_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">Version</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.version_sql-653"><a href="#Hive.Generator.version_sql-653"><span class="linenos">653</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">version_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="Hive.Generator.version_sql-654"><a href="#Hive.Generator.version_sql-654"><span class="linenos">654</span></a> <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"FOR "</span><span class="p">,</span> <span class="s2">""</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> </span></pre></div> @@ -3182,17 +3236,69 @@ Default: True</li> </div> <a class="headerlink" href="#Hive.Generator.struct_sql"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.struct_sql-658"><a href="#Hive.Generator.struct_sql-658"><span class="linenos">658</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Hive.Generator.struct_sql-659"><a href="#Hive.Generator.struct_sql-659"><span class="linenos">659</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Hive.Generator.struct_sql-660"><a href="#Hive.Generator.struct_sql-660"><span class="linenos">660</span></a> -</span><span id="Hive.Generator.struct_sql-661"><a href="#Hive.Generator.struct_sql-661"><span class="linenos">661</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> -</span><span id="Hive.Generator.struct_sql-662"><a href="#Hive.Generator.struct_sql-662"><span class="linenos">662</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> -</span><span id="Hive.Generator.struct_sql-663"><a href="#Hive.Generator.struct_sql-663"><span class="linenos">663</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> -</span><span id="Hive.Generator.struct_sql-664"><a href="#Hive.Generator.struct_sql-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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.struct_sql-665"><a href="#Hive.Generator.struct_sql-665"><span class="linenos">665</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Hive.Generator.struct_sql-666"><a href="#Hive.Generator.struct_sql-666"><span class="linenos">666</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> -</span><span id="Hive.Generator.struct_sql-667"><a href="#Hive.Generator.struct_sql-667"><span class="linenos">667</span></a> -</span><span id="Hive.Generator.struct_sql-668"><a href="#Hive.Generator.struct_sql-668"><span class="linenos">668</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.struct_sql-656"><a href="#Hive.Generator.struct_sql-656"><span class="linenos">656</span></a> <span class="k">def</span> <span class="nf">struct_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">Struct</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.struct_sql-657"><a href="#Hive.Generator.struct_sql-657"><span class="linenos">657</span></a> <span class="n">values</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Hive.Generator.struct_sql-658"><a href="#Hive.Generator.struct_sql-658"><span class="linenos">658</span></a> +</span><span id="Hive.Generator.struct_sql-659"><a href="#Hive.Generator.struct_sql-659"><span class="linenos">659</span></a> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">expressions</span><span class="p">):</span> +</span><span id="Hive.Generator.struct_sql-660"><a href="#Hive.Generator.struct_sql-660"><span class="linenos">660</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">PropertyEQ</span><span class="p">):</span> +</span><span id="Hive.Generator.struct_sql-661"><a href="#Hive.Generator.struct_sql-661"><span class="linenos">661</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">unsupported</span><span class="p">(</span><span class="s2">"Hive does not support named structs."</span><span class="p">)</span> +</span><span id="Hive.Generator.struct_sql-662"><a href="#Hive.Generator.struct_sql-662"><span class="linenos">662</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</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.struct_sql-663"><a href="#Hive.Generator.struct_sql-663"><span class="linenos">663</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Hive.Generator.struct_sql-664"><a href="#Hive.Generator.struct_sql-664"><span class="linenos">664</span></a> <span class="n">values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> +</span><span id="Hive.Generator.struct_sql-665"><a href="#Hive.Generator.struct_sql-665"><span class="linenos">665</span></a> +</span><span id="Hive.Generator.struct_sql-666"><a href="#Hive.Generator.struct_sql-666"><span class="linenos">666</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="s2">"STRUCT"</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> +</span></pre></div> + + + + + </div> + <div id="Hive.Generator.alterset_sql" class="classattr"> + <input id="Hive.Generator.alterset_sql-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> +<div class="attr function"> + + <span class="def">def</span> + <span class="name">alterset_sql</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">expression</span><span class="p">:</span> <span class="n"><a href="../expressions.html#AlterSet">sqlglot.expressions.AlterSet</a></span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span> + + <label class="view-source-button" for="Hive.Generator.alterset_sql-view-source"><span>View Source</span></label> + + </div> + <a class="headerlink" href="#Hive.Generator.alterset_sql"></a> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.alterset_sql-668"><a href="#Hive.Generator.alterset_sql-668"><span class="linenos">668</span></a> <span class="k">def</span> <span class="nf">alterset_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">AlterSet</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.alterset_sql-669"><a href="#Hive.Generator.alterset_sql-669"><span class="linenos">669</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator.alterset_sql-670"><a href="#Hive.Generator.alterset_sql-670"><span class="linenos">670</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" </span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">exprs</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.alterset_sql-671"><a href="#Hive.Generator.alterset_sql-671"><span class="linenos">671</span></a> <span class="n">location</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">"location"</span><span class="p">)</span> +</span><span id="Hive.Generator.alterset_sql-672"><a href="#Hive.Generator.alterset_sql-672"><span class="linenos">672</span></a> <span class="n">location</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" LOCATION </span><span class="si">{</span><span class="n">location</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">location</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.alterset_sql-673"><a href="#Hive.Generator.alterset_sql-673"><span class="linenos">673</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"file_format"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">" "</span><span class="p">)</span> +</span><span id="Hive.Generator.alterset_sql-674"><a href="#Hive.Generator.alterset_sql-674"><span class="linenos">674</span></a> <span class="n">file_format</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" FILEFORMAT </span><span class="si">{</span><span class="n">file_format</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">file_format</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.alterset_sql-675"><a href="#Hive.Generator.alterset_sql-675"><span class="linenos">675</span></a> <span class="n">serde</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">"serde"</span><span class="p">)</span> +</span><span id="Hive.Generator.alterset_sql-676"><a href="#Hive.Generator.alterset_sql-676"><span class="linenos">676</span></a> <span class="n">serde</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" SERDE </span><span class="si">{</span><span class="n">serde</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">serde</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.alterset_sql-677"><a href="#Hive.Generator.alterset_sql-677"><span class="linenos">677</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">"tag"</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s2">""</span><span class="p">)</span> +</span><span id="Hive.Generator.alterset_sql-678"><a href="#Hive.Generator.alterset_sql-678"><span class="linenos">678</span></a> <span class="n">tags</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">" TAGS </span><span class="si">{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> <span class="k">if</span> <span class="n">tags</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.alterset_sql-679"><a href="#Hive.Generator.alterset_sql-679"><span class="linenos">679</span></a> +</span><span id="Hive.Generator.alterset_sql-680"><a href="#Hive.Generator.alterset_sql-680"><span class="linenos">680</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"SET</span><span class="si">{</span><span class="n">serde</span><span class="si">}{</span><span class="n">exprs</span><span class="si">}{</span><span class="n">location</span><span class="si">}{</span><span class="n">file_format</span><span class="si">}{</span><span class="n">tags</span><span class="si">}</span><span class="s2">"</span> +</span></pre></div> + + + + + </div> + <div id="Hive.Generator.serdeproperties_sql" class="classattr"> + <input id="Hive.Generator.serdeproperties_sql-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> +<div class="attr function"> + + <span class="def">def</span> + <span class="name">serdeproperties_sql</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">expression</span><span class="p">:</span> <span class="n"><a href="../expressions.html#SerdeProperties">sqlglot.expressions.SerdeProperties</a></span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span> + + <label class="view-source-button" for="Hive.Generator.serdeproperties_sql-view-source"><span>View Source</span></label> + + </div> + <a class="headerlink" href="#Hive.Generator.serdeproperties_sql"></a> + <div class="pdoc-code codehilite"><pre><span></span><span id="Hive.Generator.serdeproperties_sql-682"><a href="#Hive.Generator.serdeproperties_sql-682"><span class="linenos">682</span></a> <span class="k">def</span> <span class="nf">serdeproperties_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">SerdeProperties</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Hive.Generator.serdeproperties_sql-683"><a href="#Hive.Generator.serdeproperties_sql-683"><span class="linenos">683</span></a> <span class="n">prefix</span> <span class="o">=</span> <span class="s2">"WITH "</span> <span class="k">if</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"with"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Hive.Generator.serdeproperties_sql-684"><a href="#Hive.Generator.serdeproperties_sql-684"><span class="linenos">684</span></a> <span class="n">exprs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Hive.Generator.serdeproperties_sql-685"><a href="#Hive.Generator.serdeproperties_sql-685"><span class="linenos">685</span></a> +</span><span id="Hive.Generator.serdeproperties_sql-686"><a href="#Hive.Generator.serdeproperties_sql-686"><span class="linenos">686</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">SERDEPROPERTIES (</span><span class="si">{</span><span class="n">exprs</span><span class="si">}</span><span class="s2">)"</span> </span></pre></div> @@ -3370,6 +3476,7 @@ Default: True</li> <dd id="Hive.Generator.properties_sql" class="function"><a href="../generator.html#Generator.properties_sql">properties_sql</a></dd> <dd id="Hive.Generator.root_properties" class="function"><a href="../generator.html#Generator.root_properties">root_properties</a></dd> <dd id="Hive.Generator.properties" class="function"><a href="../generator.html#Generator.properties">properties</a></dd> + <dd id="Hive.Generator.with_properties" class="function"><a href="../generator.html#Generator.with_properties">with_properties</a></dd> <dd id="Hive.Generator.locate_properties" class="function"><a href="../generator.html#Generator.locate_properties">locate_properties</a></dd> <dd id="Hive.Generator.property_name" class="function"><a href="../generator.html#Generator.property_name">property_name</a></dd> <dd id="Hive.Generator.property_sql" class="function"><a href="../generator.html#Generator.property_sql">property_sql</a></dd> @@ -3622,6 +3729,7 @@ Default: True</li> <dd id="Hive.Generator.credentials_sql" class="function"><a href="../generator.html#Generator.credentials_sql">credentials_sql</a></dd> <dd id="Hive.Generator.copy_sql" class="function"><a href="../generator.html#Generator.copy_sql">copy_sql</a></dd> <dd id="Hive.Generator.semicolon_sql" class="function"><a href="../generator.html#Generator.semicolon_sql">semicolon_sql</a></dd> + <dd id="Hive.Generator.datadeletionproperty_sql" class="function"><a href="../generator.html#Generator.datadeletionproperty_sql">datadeletionproperty_sql</a></dd> </div> </dl> |