summaryrefslogtreecommitdiffstats
path: root/docs/sqlglot/dialects/teradata.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sqlglot/dialects/teradata.html')
-rw-r--r--docs/sqlglot/dialects/teradata.html755
1 files changed, 384 insertions, 371 deletions
diff --git a/docs/sqlglot/dialects/teradata.html b/docs/sqlglot/dialects/teradata.html
index 91928b6..fd9bc5a 100644
--- a/docs/sqlglot/dialects/teradata.html
+++ b/docs/sqlglot/dialects/teradata.html
@@ -345,120 +345,124 @@
</span><span id="L-95"><a href="#L-95"><span class="linenos"> 95</span></a>
</span><span id="L-96"><a href="#L-96"><span class="linenos"> 96</span></a> <span class="n">STATEMENT_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="L-97"><a href="#L-97"><span class="linenos"> 97</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">STATEMENT_PARSERS</span><span class="p">,</span>
-</span><span id="L-98"><a href="#L-98"><span class="linenos"> 98</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
-</span><span id="L-99"><a href="#L-99"><span class="linenos"> 99</span></a> <span class="p">}</span>
-</span><span id="L-100"><a href="#L-100"><span class="linenos">100</span></a>
-</span><span id="L-101"><a href="#L-101"><span class="linenos">101</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
-</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
-</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a> <span class="p">}</span>
-</span><span id="L-106"><a href="#L-106"><span class="linenos">106</span></a>
-</span><span id="L-107"><a href="#L-107"><span class="linenos">107</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
-</span><span id="L-108"><a href="#L-108"><span class="linenos">108</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="L-98"><a href="#L-98"><span class="linenos"> 98</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="L-99"><a href="#L-99"><span class="linenos"> 99</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">schema</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+</span><span id="L-100"><a href="#L-100"><span class="linenos">100</span></a> <span class="p">),</span>
+</span><span id="L-101"><a href="#L-101"><span class="linenos">101</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
+</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a> <span class="p">}</span>
+</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a>
+</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="L-106"><a href="#L-106"><span class="linenos">106</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
+</span><span id="L-107"><a href="#L-107"><span class="linenos">107</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
+</span><span id="L-108"><a href="#L-108"><span class="linenos">108</span></a> <span class="p">}</span>
</span><span id="L-109"><a href="#L-109"><span class="linenos">109</span></a>
-</span><span id="L-110"><a href="#L-110"><span class="linenos">110</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
-</span><span id="L-111"><a href="#L-111"><span class="linenos">111</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="L-110"><a href="#L-110"><span class="linenos">110</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
+</span><span id="L-111"><a href="#L-111"><span class="linenos">111</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
</span><span id="L-112"><a href="#L-112"><span class="linenos">112</span></a>
-</span><span id="L-113"><a href="#L-113"><span class="linenos">113</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
-</span><span id="L-114"><a href="#L-114"><span class="linenos">114</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
-</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
-</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a> <span class="k">else</span><span class="p">:</span>
-</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
-</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a>
-</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
-</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a>
-</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
-</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
-</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
-</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
-</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
-</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
-</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
-</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
-</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a> <span class="p">},</span>
-</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a> <span class="p">)</span>
-</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a>
-</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
-</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
-</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a>
-</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
-</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="L-113"><a href="#L-113"><span class="linenos">113</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
+</span><span id="L-114"><a href="#L-114"><span class="linenos">114</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a>
+</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
+</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
+</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a> <span class="k">else</span><span class="p">:</span>
+</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a>
+</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
+</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a>
+</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
+</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
+</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
+</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
+</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
+</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
+</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
+</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a> <span class="p">},</span>
+</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a> <span class="p">)</span>
+</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a>
+</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
+</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a>
-</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
-</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a>
-</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a>
-</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-150"><a href="#L-150"><span class="linenos">150</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-151"><a href="#L-151"><span class="linenos">151</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
-</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a> <span class="p">}</span>
-</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a>
-</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-155"><a href="#L-155"><span class="linenos">155</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-156"><a href="#L-156"><span class="linenos">156</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
-</span><span id="L-157"><a href="#L-157"><span class="linenos">157</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_EXPRESSION</span><span class="p">,</span>
-</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
-</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="p">}</span>
-</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a>
-</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-162"><a href="#L-162"><span class="linenos">162</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-163"><a href="#L-163"><span class="linenos">163</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-164"><a href="#L-164"><span class="linenos">164</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-165"><a href="#L-165"><span class="linenos">165</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
-</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a> <span class="p">}</span>
-</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a>
-</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a>
-</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="n">set_sql</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-179"><a href="#L-179"><span class="linenos">179</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a>
-</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a>
-</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a> <span class="n">type_sql</span> <span class="o">=</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-188"><a href="#L-188"><span class="linenos">188</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a>
-</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="n">expressions_sql</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><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a>
-</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a>
-</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
-</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
-</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
-</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
-</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
-</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a> <span class="p">)</span>
-</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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-209"><a href="#L-209"><span class="linenos">209</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a>
-</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
+</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a>
+</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
+</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a>
+</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a>
+</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-153"><a href="#L-153"><span class="linenos">153</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-154"><a href="#L-154"><span class="linenos">154</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
+</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a> <span class="p">}</span>
+</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a>
+</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-158"><a href="#L-158"><span class="linenos">158</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-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
+</span><span id="L-160"><a href="#L-160"><span class="linenos">160</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_EXPRESSION</span><span class="p">,</span>
+</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
+</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a> <span class="p">}</span>
+</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a>
+</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-165"><a href="#L-165"><span class="linenos">165</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-166"><a href="#L-166"><span class="linenos">166</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-167"><a href="#L-167"><span class="linenos">167</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-168"><a href="#L-168"><span class="linenos">168</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
+</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;DATABASE </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
+</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a> <span class="p">}</span>
+</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a>
+</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a>
+</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a> <span class="n">set_sql</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-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a>
+</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>
+</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="n">type_sql</span> <span class="o">=</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-192"><a href="#L-192"><span class="linenos">192</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a>
+</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a> <span class="n">expressions_sql</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><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a>
+</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a>
+</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
+</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
+</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
+</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
+</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
+</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a> <span class="p">)</span>
+</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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-213"><a href="#L-213"><span class="linenos">213</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a>
+</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
</span></pre></div>
@@ -562,120 +566,124 @@
</span><span id="Teradata-96"><a href="#Teradata-96"><span class="linenos"> 96</span></a>
</span><span id="Teradata-97"><a href="#Teradata-97"><span class="linenos"> 97</span></a> <span class="n">STATEMENT_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="Teradata-98"><a href="#Teradata-98"><span class="linenos"> 98</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">STATEMENT_PARSERS</span><span class="p">,</span>
-</span><span id="Teradata-99"><a href="#Teradata-99"><span class="linenos"> 99</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
-</span><span id="Teradata-100"><a href="#Teradata-100"><span class="linenos">100</span></a> <span class="p">}</span>
-</span><span id="Teradata-101"><a href="#Teradata-101"><span class="linenos">101</span></a>
-</span><span id="Teradata-102"><a href="#Teradata-102"><span class="linenos">102</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata-103"><a href="#Teradata-103"><span class="linenos">103</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="Teradata-104"><a href="#Teradata-104"><span class="linenos">104</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
-</span><span id="Teradata-105"><a href="#Teradata-105"><span class="linenos">105</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
-</span><span id="Teradata-106"><a href="#Teradata-106"><span class="linenos">106</span></a> <span class="p">}</span>
-</span><span id="Teradata-107"><a href="#Teradata-107"><span class="linenos">107</span></a>
-</span><span id="Teradata-108"><a href="#Teradata-108"><span class="linenos">108</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
-</span><span id="Teradata-109"><a href="#Teradata-109"><span class="linenos">109</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata-99"><a href="#Teradata-99"><span class="linenos"> 99</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="Teradata-100"><a href="#Teradata-100"><span class="linenos">100</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">schema</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+</span><span id="Teradata-101"><a href="#Teradata-101"><span class="linenos">101</span></a> <span class="p">),</span>
+</span><span id="Teradata-102"><a href="#Teradata-102"><span class="linenos">102</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
+</span><span id="Teradata-103"><a href="#Teradata-103"><span class="linenos">103</span></a> <span class="p">}</span>
+</span><span id="Teradata-104"><a href="#Teradata-104"><span class="linenos">104</span></a>
+</span><span id="Teradata-105"><a href="#Teradata-105"><span class="linenos">105</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata-106"><a href="#Teradata-106"><span class="linenos">106</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="Teradata-107"><a href="#Teradata-107"><span class="linenos">107</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
+</span><span id="Teradata-108"><a href="#Teradata-108"><span class="linenos">108</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
+</span><span id="Teradata-109"><a href="#Teradata-109"><span class="linenos">109</span></a> <span class="p">}</span>
</span><span id="Teradata-110"><a href="#Teradata-110"><span class="linenos">110</span></a>
-</span><span id="Teradata-111"><a href="#Teradata-111"><span class="linenos">111</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
-</span><span id="Teradata-112"><a href="#Teradata-112"><span class="linenos">112</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata-111"><a href="#Teradata-111"><span class="linenos">111</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
+</span><span id="Teradata-112"><a href="#Teradata-112"><span class="linenos">112</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
</span><span id="Teradata-113"><a href="#Teradata-113"><span class="linenos">113</span></a>
-</span><span id="Teradata-114"><a href="#Teradata-114"><span class="linenos">114</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
-</span><span id="Teradata-115"><a href="#Teradata-115"><span class="linenos">115</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
-</span><span id="Teradata-116"><a href="#Teradata-116"><span class="linenos">116</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
-</span><span id="Teradata-117"><a href="#Teradata-117"><span class="linenos">117</span></a> <span class="k">else</span><span class="p">:</span>
-</span><span id="Teradata-118"><a href="#Teradata-118"><span class="linenos">118</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
-</span><span id="Teradata-119"><a href="#Teradata-119"><span class="linenos">119</span></a>
-</span><span id="Teradata-120"><a href="#Teradata-120"><span class="linenos">120</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
-</span><span id="Teradata-121"><a href="#Teradata-121"><span class="linenos">121</span></a>
-</span><span id="Teradata-122"><a href="#Teradata-122"><span class="linenos">122</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata-123"><a href="#Teradata-123"><span class="linenos">123</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata-124"><a href="#Teradata-124"><span class="linenos">124</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
-</span><span id="Teradata-125"><a href="#Teradata-125"><span class="linenos">125</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
-</span><span id="Teradata-126"><a href="#Teradata-126"><span class="linenos">126</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
-</span><span id="Teradata-127"><a href="#Teradata-127"><span class="linenos">127</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
-</span><span id="Teradata-128"><a href="#Teradata-128"><span class="linenos">128</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
-</span><span id="Teradata-129"><a href="#Teradata-129"><span class="linenos">129</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="Teradata-130"><a href="#Teradata-130"><span class="linenos">130</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
-</span><span id="Teradata-131"><a href="#Teradata-131"><span class="linenos">131</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
-</span><span id="Teradata-132"><a href="#Teradata-132"><span class="linenos">132</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
-</span><span id="Teradata-133"><a href="#Teradata-133"><span class="linenos">133</span></a> <span class="p">},</span>
-</span><span id="Teradata-134"><a href="#Teradata-134"><span class="linenos">134</span></a> <span class="p">)</span>
-</span><span id="Teradata-135"><a href="#Teradata-135"><span class="linenos">135</span></a>
-</span><span id="Teradata-136"><a href="#Teradata-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="Teradata-137"><a href="#Teradata-137"><span class="linenos">137</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
-</span><span id="Teradata-138"><a href="#Teradata-138"><span class="linenos">138</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
-</span><span id="Teradata-139"><a href="#Teradata-139"><span class="linenos">139</span></a>
-</span><span id="Teradata-140"><a href="#Teradata-140"><span class="linenos">140</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
-</span><span id="Teradata-141"><a href="#Teradata-141"><span class="linenos">141</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata-114"><a href="#Teradata-114"><span class="linenos">114</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
+</span><span id="Teradata-115"><a href="#Teradata-115"><span class="linenos">115</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata-116"><a href="#Teradata-116"><span class="linenos">116</span></a>
+</span><span id="Teradata-117"><a href="#Teradata-117"><span class="linenos">117</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
+</span><span id="Teradata-118"><a href="#Teradata-118"><span class="linenos">118</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
+</span><span id="Teradata-119"><a href="#Teradata-119"><span class="linenos">119</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+</span><span id="Teradata-120"><a href="#Teradata-120"><span class="linenos">120</span></a> <span class="k">else</span><span class="p">:</span>
+</span><span id="Teradata-121"><a href="#Teradata-121"><span class="linenos">121</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata-122"><a href="#Teradata-122"><span class="linenos">122</span></a>
+</span><span id="Teradata-123"><a href="#Teradata-123"><span class="linenos">123</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
+</span><span id="Teradata-124"><a href="#Teradata-124"><span class="linenos">124</span></a>
+</span><span id="Teradata-125"><a href="#Teradata-125"><span class="linenos">125</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata-126"><a href="#Teradata-126"><span class="linenos">126</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata-127"><a href="#Teradata-127"><span class="linenos">127</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
+</span><span id="Teradata-128"><a href="#Teradata-128"><span class="linenos">128</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="Teradata-129"><a href="#Teradata-129"><span class="linenos">129</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
+</span><span id="Teradata-130"><a href="#Teradata-130"><span class="linenos">130</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
+</span><span id="Teradata-131"><a href="#Teradata-131"><span class="linenos">131</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
+</span><span id="Teradata-132"><a href="#Teradata-132"><span class="linenos">132</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="Teradata-133"><a href="#Teradata-133"><span class="linenos">133</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
+</span><span id="Teradata-134"><a href="#Teradata-134"><span class="linenos">134</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
+</span><span id="Teradata-135"><a href="#Teradata-135"><span class="linenos">135</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
+</span><span id="Teradata-136"><a href="#Teradata-136"><span class="linenos">136</span></a> <span class="p">},</span>
+</span><span id="Teradata-137"><a href="#Teradata-137"><span class="linenos">137</span></a> <span class="p">)</span>
+</span><span id="Teradata-138"><a href="#Teradata-138"><span class="linenos">138</span></a>
+</span><span id="Teradata-139"><a href="#Teradata-139"><span class="linenos">139</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="Teradata-140"><a href="#Teradata-140"><span class="linenos">140</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
+</span><span id="Teradata-141"><a href="#Teradata-141"><span class="linenos">141</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
</span><span id="Teradata-142"><a href="#Teradata-142"><span class="linenos">142</span></a>
-</span><span id="Teradata-143"><a href="#Teradata-143"><span class="linenos">143</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
-</span><span id="Teradata-144"><a href="#Teradata-144"><span class="linenos">144</span></a>
-</span><span id="Teradata-145"><a href="#Teradata-145"><span class="linenos">145</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="Teradata-146"><a href="#Teradata-146"><span class="linenos">146</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata-147"><a href="#Teradata-147"><span class="linenos">147</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata-148"><a href="#Teradata-148"><span class="linenos">148</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata-149"><a href="#Teradata-149"><span class="linenos">149</span></a>
-</span><span id="Teradata-150"><a href="#Teradata-150"><span class="linenos">150</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata-151"><a href="#Teradata-151"><span class="linenos">151</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="Teradata-152"><a href="#Teradata-152"><span class="linenos">152</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
-</span><span id="Teradata-153"><a href="#Teradata-153"><span class="linenos">153</span></a> <span class="p">}</span>
-</span><span id="Teradata-154"><a href="#Teradata-154"><span class="linenos">154</span></a>
-</span><span id="Teradata-155"><a href="#Teradata-155"><span class="linenos">155</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata-156"><a href="#Teradata-156"><span class="linenos">156</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="Teradata-157"><a href="#Teradata-157"><span class="linenos">157</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
-</span><span id="Teradata-158"><a href="#Teradata-158"><span class="linenos">158</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_EXPRESSION</span><span class="p">,</span>
-</span><span id="Teradata-159"><a href="#Teradata-159"><span class="linenos">159</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
-</span><span id="Teradata-160"><a href="#Teradata-160"><span class="linenos">160</span></a> <span class="p">}</span>
-</span><span id="Teradata-161"><a href="#Teradata-161"><span class="linenos">161</span></a>
-</span><span id="Teradata-162"><a href="#Teradata-162"><span class="linenos">162</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata-163"><a href="#Teradata-163"><span class="linenos">163</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="Teradata-164"><a href="#Teradata-164"><span class="linenos">164</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="Teradata-165"><a href="#Teradata-165"><span class="linenos">165</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="Teradata-166"><a href="#Teradata-166"><span class="linenos">166</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
-</span><span id="Teradata-167"><a href="#Teradata-167"><span class="linenos">167</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Teradata-168"><a href="#Teradata-168"><span class="linenos">168</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Teradata-169"><a href="#Teradata-169"><span class="linenos">169</span></a> <span class="p">}</span>
-</span><span id="Teradata-170"><a href="#Teradata-170"><span class="linenos">170</span></a>
-</span><span id="Teradata-171"><a href="#Teradata-171"><span class="linenos">171</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-172"><a href="#Teradata-172"><span class="linenos">172</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata-173"><a href="#Teradata-173"><span class="linenos">173</span></a>
-</span><span id="Teradata-174"><a href="#Teradata-174"><span class="linenos">174</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata-175"><a href="#Teradata-175"><span class="linenos">175</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata-176"><a href="#Teradata-176"><span class="linenos">176</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-177"><a href="#Teradata-177"><span class="linenos">177</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata-178"><a href="#Teradata-178"><span class="linenos">178</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata-179"><a href="#Teradata-179"><span class="linenos">179</span></a> <span class="n">set_sql</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="Teradata-180"><a href="#Teradata-180"><span class="linenos">180</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata-181"><a href="#Teradata-181"><span class="linenos">181</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata-182"><a href="#Teradata-182"><span class="linenos">182</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="Teradata-183"><a href="#Teradata-183"><span class="linenos">183</span></a>
-</span><span id="Teradata-184"><a href="#Teradata-184"><span class="linenos">184</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-185"><a href="#Teradata-185"><span class="linenos">185</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="Teradata-186"><a href="#Teradata-186"><span class="linenos">186</span></a>
-</span><span id="Teradata-187"><a href="#Teradata-187"><span class="linenos">187</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-188"><a href="#Teradata-188"><span class="linenos">188</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata-189"><a href="#Teradata-189"><span class="linenos">189</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata-190"><a href="#Teradata-190"><span class="linenos">190</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="Teradata-191"><a href="#Teradata-191"><span class="linenos">191</span></a>
-</span><span id="Teradata-192"><a href="#Teradata-192"><span class="linenos">192</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-193"><a href="#Teradata-193"><span class="linenos">193</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata-194"><a href="#Teradata-194"><span class="linenos">194</span></a> <span class="n">expressions_sql</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><span id="Teradata-195"><a href="#Teradata-195"><span class="linenos">195</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata-196"><a href="#Teradata-196"><span class="linenos">196</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata-197"><a href="#Teradata-197"><span class="linenos">197</span></a>
-</span><span id="Teradata-198"><a href="#Teradata-198"><span class="linenos">198</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="Teradata-199"><a href="#Teradata-199"><span class="linenos">199</span></a>
-</span><span id="Teradata-200"><a href="#Teradata-200"><span class="linenos">200</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-201"><a href="#Teradata-201"><span class="linenos">201</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
-</span><span id="Teradata-202"><a href="#Teradata-202"><span class="linenos">202</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
-</span><span id="Teradata-203"><a href="#Teradata-203"><span class="linenos">203</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata-204"><a href="#Teradata-204"><span class="linenos">204</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
-</span><span id="Teradata-205"><a href="#Teradata-205"><span class="linenos">205</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
-</span><span id="Teradata-206"><a href="#Teradata-206"><span class="linenos">206</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="Teradata-207"><a href="#Teradata-207"><span class="linenos">207</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
-</span><span id="Teradata-208"><a href="#Teradata-208"><span class="linenos">208</span></a> <span class="p">)</span>
-</span><span id="Teradata-209"><a href="#Teradata-209"><span class="linenos">209</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata-210"><a href="#Teradata-210"><span class="linenos">210</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata-211"><a href="#Teradata-211"><span class="linenos">211</span></a>
-</span><span id="Teradata-212"><a href="#Teradata-212"><span class="linenos">212</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
+</span><span id="Teradata-143"><a href="#Teradata-143"><span class="linenos">143</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="Teradata-144"><a href="#Teradata-144"><span class="linenos">144</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata-145"><a href="#Teradata-145"><span class="linenos">145</span></a>
+</span><span id="Teradata-146"><a href="#Teradata-146"><span class="linenos">146</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
+</span><span id="Teradata-147"><a href="#Teradata-147"><span class="linenos">147</span></a>
+</span><span id="Teradata-148"><a href="#Teradata-148"><span class="linenos">148</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="Teradata-149"><a href="#Teradata-149"><span class="linenos">149</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata-150"><a href="#Teradata-150"><span class="linenos">150</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata-151"><a href="#Teradata-151"><span class="linenos">151</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata-152"><a href="#Teradata-152"><span class="linenos">152</span></a>
+</span><span id="Teradata-153"><a href="#Teradata-153"><span class="linenos">153</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata-154"><a href="#Teradata-154"><span class="linenos">154</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="Teradata-155"><a href="#Teradata-155"><span class="linenos">155</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
+</span><span id="Teradata-156"><a href="#Teradata-156"><span class="linenos">156</span></a> <span class="p">}</span>
+</span><span id="Teradata-157"><a href="#Teradata-157"><span class="linenos">157</span></a>
+</span><span id="Teradata-158"><a href="#Teradata-158"><span class="linenos">158</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata-159"><a href="#Teradata-159"><span class="linenos">159</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="Teradata-160"><a href="#Teradata-160"><span class="linenos">160</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
+</span><span id="Teradata-161"><a href="#Teradata-161"><span class="linenos">161</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_EXPRESSION</span><span class="p">,</span>
+</span><span id="Teradata-162"><a href="#Teradata-162"><span class="linenos">162</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
+</span><span id="Teradata-163"><a href="#Teradata-163"><span class="linenos">163</span></a> <span class="p">}</span>
+</span><span id="Teradata-164"><a href="#Teradata-164"><span class="linenos">164</span></a>
+</span><span id="Teradata-165"><a href="#Teradata-165"><span class="linenos">165</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata-166"><a href="#Teradata-166"><span class="linenos">166</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="Teradata-167"><a href="#Teradata-167"><span class="linenos">167</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="Teradata-168"><a href="#Teradata-168"><span class="linenos">168</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="Teradata-169"><a href="#Teradata-169"><span class="linenos">169</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
+</span><span id="Teradata-170"><a href="#Teradata-170"><span class="linenos">170</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Teradata-171"><a href="#Teradata-171"><span class="linenos">171</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Teradata-172"><a href="#Teradata-172"><span class="linenos">172</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;DATABASE </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
+</span><span id="Teradata-173"><a href="#Teradata-173"><span class="linenos">173</span></a> <span class="p">}</span>
+</span><span id="Teradata-174"><a href="#Teradata-174"><span class="linenos">174</span></a>
+</span><span id="Teradata-175"><a href="#Teradata-175"><span class="linenos">175</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-176"><a href="#Teradata-176"><span class="linenos">176</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata-177"><a href="#Teradata-177"><span class="linenos">177</span></a>
+</span><span id="Teradata-178"><a href="#Teradata-178"><span class="linenos">178</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata-179"><a href="#Teradata-179"><span class="linenos">179</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata-180"><a href="#Teradata-180"><span class="linenos">180</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-181"><a href="#Teradata-181"><span class="linenos">181</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata-182"><a href="#Teradata-182"><span class="linenos">182</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata-183"><a href="#Teradata-183"><span class="linenos">183</span></a> <span class="n">set_sql</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="Teradata-184"><a href="#Teradata-184"><span class="linenos">184</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata-185"><a href="#Teradata-185"><span class="linenos">185</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata-186"><a href="#Teradata-186"><span class="linenos">186</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="Teradata-187"><a href="#Teradata-187"><span class="linenos">187</span></a>
+</span><span id="Teradata-188"><a href="#Teradata-188"><span class="linenos">188</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-189"><a href="#Teradata-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="Teradata-190"><a href="#Teradata-190"><span class="linenos">190</span></a>
+</span><span id="Teradata-191"><a href="#Teradata-191"><span class="linenos">191</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-192"><a href="#Teradata-192"><span class="linenos">192</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata-193"><a href="#Teradata-193"><span class="linenos">193</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata-194"><a href="#Teradata-194"><span class="linenos">194</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="Teradata-195"><a href="#Teradata-195"><span class="linenos">195</span></a>
+</span><span id="Teradata-196"><a href="#Teradata-196"><span class="linenos">196</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-197"><a href="#Teradata-197"><span class="linenos">197</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata-198"><a href="#Teradata-198"><span class="linenos">198</span></a> <span class="n">expressions_sql</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><span id="Teradata-199"><a href="#Teradata-199"><span class="linenos">199</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata-200"><a href="#Teradata-200"><span class="linenos">200</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata-201"><a href="#Teradata-201"><span class="linenos">201</span></a>
+</span><span id="Teradata-202"><a href="#Teradata-202"><span class="linenos">202</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="Teradata-203"><a href="#Teradata-203"><span class="linenos">203</span></a>
+</span><span id="Teradata-204"><a href="#Teradata-204"><span class="linenos">204</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-205"><a href="#Teradata-205"><span class="linenos">205</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
+</span><span id="Teradata-206"><a href="#Teradata-206"><span class="linenos">206</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
+</span><span id="Teradata-207"><a href="#Teradata-207"><span class="linenos">207</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata-208"><a href="#Teradata-208"><span class="linenos">208</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
+</span><span id="Teradata-209"><a href="#Teradata-209"><span class="linenos">209</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
+</span><span id="Teradata-210"><a href="#Teradata-210"><span class="linenos">210</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="Teradata-211"><a href="#Teradata-211"><span class="linenos">211</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
+</span><span id="Teradata-212"><a href="#Teradata-212"><span class="linenos">212</span></a> <span class="p">)</span>
+</span><span id="Teradata-213"><a href="#Teradata-213"><span class="linenos">213</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata-214"><a href="#Teradata-214"><span class="linenos">214</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata-215"><a href="#Teradata-215"><span class="linenos">215</span></a>
+</span><span id="Teradata-216"><a href="#Teradata-216"><span class="linenos">216</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
</span></pre></div>
@@ -1088,51 +1096,54 @@
</span><span id="Teradata.Parser-96"><a href="#Teradata.Parser-96"><span class="linenos"> 96</span></a>
</span><span id="Teradata.Parser-97"><a href="#Teradata.Parser-97"><span class="linenos"> 97</span></a> <span class="n">STATEMENT_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="Teradata.Parser-98"><a href="#Teradata.Parser-98"><span class="linenos"> 98</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">STATEMENT_PARSERS</span><span class="p">,</span>
-</span><span id="Teradata.Parser-99"><a href="#Teradata.Parser-99"><span class="linenos"> 99</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
-</span><span id="Teradata.Parser-100"><a href="#Teradata.Parser-100"><span class="linenos">100</span></a> <span class="p">}</span>
-</span><span id="Teradata.Parser-101"><a href="#Teradata.Parser-101"><span class="linenos">101</span></a>
-</span><span id="Teradata.Parser-102"><a href="#Teradata.Parser-102"><span class="linenos">102</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata.Parser-103"><a href="#Teradata.Parser-103"><span class="linenos">103</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
-</span><span id="Teradata.Parser-104"><a href="#Teradata.Parser-104"><span class="linenos">104</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
-</span><span id="Teradata.Parser-105"><a href="#Teradata.Parser-105"><span class="linenos">105</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
-</span><span id="Teradata.Parser-106"><a href="#Teradata.Parser-106"><span class="linenos">106</span></a> <span class="p">}</span>
-</span><span id="Teradata.Parser-107"><a href="#Teradata.Parser-107"><span class="linenos">107</span></a>
-</span><span id="Teradata.Parser-108"><a href="#Teradata.Parser-108"><span class="linenos">108</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
-</span><span id="Teradata.Parser-109"><a href="#Teradata.Parser-109"><span class="linenos">109</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata.Parser-99"><a href="#Teradata.Parser-99"><span class="linenos"> 99</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="Teradata.Parser-100"><a href="#Teradata.Parser-100"><span class="linenos">100</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">schema</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+</span><span id="Teradata.Parser-101"><a href="#Teradata.Parser-101"><span class="linenos">101</span></a> <span class="p">),</span>
+</span><span id="Teradata.Parser-102"><a href="#Teradata.Parser-102"><span class="linenos">102</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_create</span><span class="p">(),</span>
+</span><span id="Teradata.Parser-103"><a href="#Teradata.Parser-103"><span class="linenos">103</span></a> <span class="p">}</span>
+</span><span id="Teradata.Parser-104"><a href="#Teradata.Parser-104"><span class="linenos">104</span></a>
+</span><span id="Teradata.Parser-105"><a href="#Teradata.Parser-105"><span class="linenos">105</span></a> <span class="n">FUNCTION_PARSERS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata.Parser-106"><a href="#Teradata.Parser-106"><span class="linenos">106</span></a> <span class="o">**</span><span class="n">parser</span><span class="o">.</span><span class="n">Parser</span><span class="o">.</span><span class="n">FUNCTION_PARSERS</span><span class="p">,</span>
+</span><span id="Teradata.Parser-107"><a href="#Teradata.Parser-107"><span class="linenos">107</span></a> <span class="s2">&quot;RANGE_N&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_rangen</span><span class="p">(),</span>
+</span><span id="Teradata.Parser-108"><a href="#Teradata.Parser-108"><span class="linenos">108</span></a> <span class="s2">&quot;TRANSLATE&quot;</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">STRICT_CAST</span><span class="p">),</span>
+</span><span id="Teradata.Parser-109"><a href="#Teradata.Parser-109"><span class="linenos">109</span></a> <span class="p">}</span>
</span><span id="Teradata.Parser-110"><a href="#Teradata.Parser-110"><span class="linenos">110</span></a>
-</span><span id="Teradata.Parser-111"><a href="#Teradata.Parser-111"><span class="linenos">111</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
-</span><span id="Teradata.Parser-112"><a href="#Teradata.Parser-112"><span class="linenos">112</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Parser-111"><a href="#Teradata.Parser-111"><span class="linenos">111</span></a> <span class="k">def</span> <span class="nf">_parse_translate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span>
+</span><span id="Teradata.Parser-112"><a href="#Teradata.Parser-112"><span class="linenos">112</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
</span><span id="Teradata.Parser-113"><a href="#Teradata.Parser-113"><span class="linenos">113</span></a>
-</span><span id="Teradata.Parser-114"><a href="#Teradata.Parser-114"><span class="linenos">114</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
-</span><span id="Teradata.Parser-115"><a href="#Teradata.Parser-115"><span class="linenos">115</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Parser-116"><a href="#Teradata.Parser-116"><span class="linenos">116</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
-</span><span id="Teradata.Parser-117"><a href="#Teradata.Parser-117"><span class="linenos">117</span></a> <span class="k">else</span><span class="p">:</span>
-</span><span id="Teradata.Parser-118"><a href="#Teradata.Parser-118"><span class="linenos">118</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Parser-119"><a href="#Teradata.Parser-119"><span class="linenos">119</span></a>
-</span><span id="Teradata.Parser-120"><a href="#Teradata.Parser-120"><span class="linenos">120</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
-</span><span id="Teradata.Parser-121"><a href="#Teradata.Parser-121"><span class="linenos">121</span></a>
-</span><span id="Teradata.Parser-122"><a href="#Teradata.Parser-122"><span class="linenos">122</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata.Parser-123"><a href="#Teradata.Parser-123"><span class="linenos">123</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata.Parser-124"><a href="#Teradata.Parser-124"><span class="linenos">124</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
-</span><span id="Teradata.Parser-125"><a href="#Teradata.Parser-125"><span class="linenos">125</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
-</span><span id="Teradata.Parser-126"><a href="#Teradata.Parser-126"><span class="linenos">126</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
-</span><span id="Teradata.Parser-127"><a href="#Teradata.Parser-127"><span class="linenos">127</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
-</span><span id="Teradata.Parser-128"><a href="#Teradata.Parser-128"><span class="linenos">128</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
-</span><span id="Teradata.Parser-129"><a href="#Teradata.Parser-129"><span class="linenos">129</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
-</span><span id="Teradata.Parser-130"><a href="#Teradata.Parser-130"><span class="linenos">130</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
-</span><span id="Teradata.Parser-131"><a href="#Teradata.Parser-131"><span class="linenos">131</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
-</span><span id="Teradata.Parser-132"><a href="#Teradata.Parser-132"><span class="linenos">132</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
-</span><span id="Teradata.Parser-133"><a href="#Teradata.Parser-133"><span class="linenos">133</span></a> <span class="p">},</span>
-</span><span id="Teradata.Parser-134"><a href="#Teradata.Parser-134"><span class="linenos">134</span></a> <span class="p">)</span>
-</span><span id="Teradata.Parser-135"><a href="#Teradata.Parser-135"><span class="linenos">135</span></a>
-</span><span id="Teradata.Parser-136"><a href="#Teradata.Parser-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="Teradata.Parser-137"><a href="#Teradata.Parser-137"><span class="linenos">137</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
-</span><span id="Teradata.Parser-138"><a href="#Teradata.Parser-138"><span class="linenos">138</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
-</span><span id="Teradata.Parser-139"><a href="#Teradata.Parser-139"><span class="linenos">139</span></a>
-</span><span id="Teradata.Parser-140"><a href="#Teradata.Parser-140"><span class="linenos">140</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
-</span><span id="Teradata.Parser-141"><a href="#Teradata.Parser-141"><span class="linenos">141</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata.Parser-114"><a href="#Teradata.Parser-114"><span class="linenos">114</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">):</span>
+</span><span id="Teradata.Parser-115"><a href="#Teradata.Parser-115"><span class="linenos">115</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Parser-116"><a href="#Teradata.Parser-116"><span class="linenos">116</span></a>
+</span><span id="Teradata.Parser-117"><a href="#Teradata.Parser-117"><span class="linenos">117</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_texts</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">CHARSET_TRANSLATORS</span><span class="p">):</span>
+</span><span id="Teradata.Parser-118"><a href="#Teradata.Parser-118"><span class="linenos">118</span></a> <span class="n">charset_split</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;_TO_&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Parser-119"><a href="#Teradata.Parser-119"><span class="linenos">119</span></a> <span class="n">to</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">CharacterSet</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">charset_split</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+</span><span id="Teradata.Parser-120"><a href="#Teradata.Parser-120"><span class="linenos">120</span></a> <span class="k">else</span><span class="p">:</span>
+</span><span id="Teradata.Parser-121"><a href="#Teradata.Parser-121"><span class="linenos">121</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">raise_error</span><span class="p">(</span><span class="s2">&quot;Expected a character set translator after USING in TRANSLATE&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Parser-122"><a href="#Teradata.Parser-122"><span class="linenos">122</span></a>
+</span><span id="Teradata.Parser-123"><a href="#Teradata.Parser-123"><span class="linenos">123</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">Cast</span> <span class="k">if</span> <span class="n">strict</span> <span class="k">else</span> <span class="n">exp</span><span class="o">.</span><span class="n">TryCast</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">to</span><span class="o">=</span><span class="n">to</span><span class="p">)</span>
+</span><span id="Teradata.Parser-124"><a href="#Teradata.Parser-124"><span class="linenos">124</span></a>
+</span><span id="Teradata.Parser-125"><a href="#Teradata.Parser-125"><span class="linenos">125</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata.Parser-126"><a href="#Teradata.Parser-126"><span class="linenos">126</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata.Parser-127"><a href="#Teradata.Parser-127"><span class="linenos">127</span></a> <span class="k">def</span> <span class="nf">_parse_update</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">:</span>
+</span><span id="Teradata.Parser-128"><a href="#Teradata.Parser-128"><span class="linenos">128</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span>
+</span><span id="Teradata.Parser-129"><a href="#Teradata.Parser-129"><span class="linenos">129</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">,</span>
+</span><span id="Teradata.Parser-130"><a href="#Teradata.Parser-130"><span class="linenos">130</span></a> <span class="o">**</span><span class="p">{</span> <span class="c1"># type: ignore</span>
+</span><span id="Teradata.Parser-131"><a href="#Teradata.Parser-131"><span class="linenos">131</span></a> <span class="s2">&quot;this&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_table</span><span class="p">(</span><span class="n">alias_tokens</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">UPDATE_ALIAS_TOKENS</span><span class="p">),</span>
+</span><span id="Teradata.Parser-132"><a href="#Teradata.Parser-132"><span class="linenos">132</span></a> <span class="s2">&quot;from&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_from</span><span class="p">(</span><span class="n">joins</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
+</span><span id="Teradata.Parser-133"><a href="#Teradata.Parser-133"><span class="linenos">133</span></a> <span class="s2">&quot;expressions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">)</span>
+</span><span id="Teradata.Parser-134"><a href="#Teradata.Parser-134"><span class="linenos">134</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_equality</span><span class="p">),</span>
+</span><span id="Teradata.Parser-135"><a href="#Teradata.Parser-135"><span class="linenos">135</span></a> <span class="s2">&quot;where&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_where</span><span class="p">(),</span>
+</span><span id="Teradata.Parser-136"><a href="#Teradata.Parser-136"><span class="linenos">136</span></a> <span class="p">},</span>
+</span><span id="Teradata.Parser-137"><a href="#Teradata.Parser-137"><span class="linenos">137</span></a> <span class="p">)</span>
+</span><span id="Teradata.Parser-138"><a href="#Teradata.Parser-138"><span class="linenos">138</span></a>
+</span><span id="Teradata.Parser-139"><a href="#Teradata.Parser-139"><span class="linenos">139</span></a> <span class="k">def</span> <span class="nf">_parse_rangen</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="Teradata.Parser-140"><a href="#Teradata.Parser-140"><span class="linenos">140</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_id_var</span><span class="p">()</span>
+</span><span id="Teradata.Parser-141"><a href="#Teradata.Parser-141"><span class="linenos">141</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_match</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">)</span>
</span><span id="Teradata.Parser-142"><a href="#Teradata.Parser-142"><span class="linenos">142</span></a>
-</span><span id="Teradata.Parser-143"><a href="#Teradata.Parser-143"><span class="linenos">143</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
+</span><span id="Teradata.Parser-143"><a href="#Teradata.Parser-143"><span class="linenos">143</span></a> <span class="n">expressions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">)</span>
+</span><span id="Teradata.Parser-144"><a href="#Teradata.Parser-144"><span class="linenos">144</span></a> <span class="n">each</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_match_text_seq</span><span class="p">(</span><span class="s2">&quot;EACH&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parse_conjunction</span><span class="p">()</span>
+</span><span id="Teradata.Parser-145"><a href="#Teradata.Parser-145"><span class="linenos">145</span></a>
+</span><span id="Teradata.Parser-146"><a href="#Teradata.Parser-146"><span class="linenos">146</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">expression</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">this</span><span class="p">,</span> <span class="n">expressions</span><span class="o">=</span><span class="n">expressions</span><span class="p">,</span> <span class="n">each</span><span class="o">=</span><span class="n">each</span><span class="p">)</span>
</span></pre></div>
@@ -1157,7 +1168,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">CHARSET_TRANSLATORS</span> =
<input id="Teradata.Parser.CHARSET_TRANSLATORS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Teradata.Parser.CHARSET_TRANSLATORS-view-value"></label><span class="default_value">{&#39;KANJISJIS_TO_UNICODE&#39;, &#39;LATIN_TO_GRAPHIC&#39;, &#39;GRAPHIC_TO_KANJISJIS&#39;, &#39;UNICODE_TO_LATIN&#39;, &#39;LOCALE_TO_UNICODE&#39;, &#39;UNICODE_TO_UNICODE_Fullwidth&#39;, &#39;LATIN_TO_KANJISJIS&#39;, &#39;UNICODE_TO_KANJI1_SBC&#39;, &#39;UNICODE_TO_UNICODE_FoldSpace&#39;, &#39;UNICODE_TO_UNICODE_NFKD&#39;, &#39;UNICODE_TO_UNICODE_Halfwidth&#39;, &#39;UNICODE_TO_KANJI1_KanjiEBCDIC&#39;, &#39;KANJISJIS_TO_LATIN&#39;, &#39;KANJI1_SBC_TO_UNICODE&#39;, &#39;UNICODE_TO_GRAPHIC_PadGraphic&#39;, &#39;UNICODE_TO_GRAPHIC&#39;, &#39;UNICODE_TO_UNICODE_NFC&#39;, &#39;UNICODE_TO_UNICODE_NFKC&#39;, &#39;UNICODE_TO_LOCALE&#39;, &#39;GRAPHIC_TO_UNICODE_PadSpace&#39;, &#39;KANJI1_KanjiEBCDIC_TO_UNICODE&#39;, &#39;KANJI1_KanjiEUC_TO_UNICODE&#39;, &#39;UNICODE_TO_GRAPHIC_VarGraphic&#39;, &#39;GRAPHIC_TO_UNICODE&#39;, &#39;LATIN_TO_UNICODE&#39;, &#39;GRAPHIC_TO_LATIN&#39;, &#39;KANJI1_KANJISJIS_TO_UNICODE&#39;, &#39;KANJISJIS_TO_GRAPHIC&#39;, &#39;UNICODE_TO_KANJI1_KANJISJIS&#39;, &#39;UNICODE_TO_KANJISJIS&#39;, &#39;UNICODE_TO_KANJI1_KanjiEUC&#39;, &#39;UNICODE_TO_UNICODE_NFD&#39;}</span>
+ <label class="view-value-button pdoc-button" for="Teradata.Parser.CHARSET_TRANSLATORS-view-value"></label><span class="default_value">{&#39;UNICODE_TO_GRAPHIC&#39;, &#39;UNICODE_TO_KANJI1_KANJISJIS&#39;, &#39;UNICODE_TO_UNICODE_NFC&#39;, &#39;KANJI1_KANJISJIS_TO_UNICODE&#39;, &#39;UNICODE_TO_GRAPHIC_VarGraphic&#39;, &#39;GRAPHIC_TO_KANJISJIS&#39;, &#39;LATIN_TO_UNICODE&#39;, &#39;UNICODE_TO_KANJI1_KanjiEBCDIC&#39;, &#39;UNICODE_TO_KANJISJIS&#39;, &#39;UNICODE_TO_LOCALE&#39;, &#39;KANJISJIS_TO_UNICODE&#39;, &#39;UNICODE_TO_UNICODE_NFD&#39;, &#39;UNICODE_TO_UNICODE_NFKD&#39;, &#39;KANJISJIS_TO_LATIN&#39;, &#39;KANJI1_KanjiEBCDIC_TO_UNICODE&#39;, &#39;UNICODE_TO_GRAPHIC_PadGraphic&#39;, &#39;UNICODE_TO_UNICODE_Fullwidth&#39;, &#39;LOCALE_TO_UNICODE&#39;, &#39;LATIN_TO_KANJISJIS&#39;, &#39;KANJI1_SBC_TO_UNICODE&#39;, &#39;UNICODE_TO_LATIN&#39;, &#39;UNICODE_TO_UNICODE_FoldSpace&#39;, &#39;GRAPHIC_TO_UNICODE_PadSpace&#39;, &#39;LATIN_TO_GRAPHIC&#39;, &#39;KANJISJIS_TO_GRAPHIC&#39;, &#39;UNICODE_TO_KANJI1_SBC&#39;, &#39;GRAPHIC_TO_UNICODE&#39;, &#39;GRAPHIC_TO_LATIN&#39;, &#39;UNICODE_TO_KANJI1_KanjiEUC&#39;, &#39;UNICODE_TO_UNICODE_Halfwidth&#39;, &#39;UNICODE_TO_UNICODE_NFKC&#39;, &#39;KANJI1_KanjiEUC_TO_UNICODE&#39;}</span>
</div>
@@ -1170,7 +1181,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">FUNC_TOKENS</span> =
<input id="Teradata.Parser.FUNC_TOKENS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Teradata.Parser.FUNC_TOKENS-view-value"></label><span class="default_value">{&lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.RIGHT: &#39;RIGHT&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.LIKE: &#39;LIKE&#39;&gt;, &lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.WINDOW: &#39;WINDOW&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.GLOB: &#39;GLOB&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &lt;TokenType.PRIMARY_KEY: &#39;PRIMARY_KEY&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.ILIKE: &#39;ILIKE&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.XOR: &#39;XOR&#39;&gt;, &lt;TokenType.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.LEFT: &#39;LEFT&#39;&gt;, &lt;TokenType.OFFSET: &#39;OFFSET&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="Teradata.Parser.FUNC_TOKENS-view-value"></label><span class="default_value">{&lt;TokenType.NUMMULTIRANGE: &#39;NUMMULTIRANGE&#39;&gt;, &lt;TokenType.UBIGINT: &#39;UBIGINT&#39;&gt;, &lt;TokenType.BOOLEAN: &#39;BOOLEAN&#39;&gt;, &lt;TokenType.NULLABLE: &#39;NULLABLE&#39;&gt;, &lt;TokenType.UINT128: &#39;UINT128&#39;&gt;, &lt;TokenType.OBJECT_IDENTIFIER: &#39;OBJECT_IDENTIFIER&#39;&gt;, &lt;TokenType.IDENTIFIER: &#39;IDENTIFIER&#39;&gt;, &lt;TokenType.ROW: &#39;ROW&#39;&gt;, &lt;TokenType.STRUCT: &#39;STRUCT&#39;&gt;, &lt;TokenType.DATE: &#39;DATE&#39;&gt;, &lt;TokenType.TIMESTAMPTZ: &#39;TIMESTAMPTZ&#39;&gt;, &lt;TokenType.ENUM: &#39;ENUM&#39;&gt;, &lt;TokenType.HLLSKETCH: &#39;HLLSKETCH&#39;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;, &lt;TokenType.INDEX: &#39;INDEX&#39;&gt;, &lt;TokenType.UINT256: &#39;UINT256&#39;&gt;, &lt;TokenType.SERIAL: &#39;SERIAL&#39;&gt;, &lt;TokenType.RLIKE: &#39;RLIKE&#39;&gt;, &lt;TokenType.XML: &#39;XML&#39;&gt;, &lt;TokenType.SMALLMONEY: &#39;SMALLMONEY&#39;&gt;, &lt;TokenType.DOUBLE: &#39;DOUBLE&#39;&gt;, &lt;TokenType.IPPREFIX: &#39;IPPREFIX&#39;&gt;, &lt;TokenType.GEOMETRY: &#39;GEOMETRY&#39;&gt;, &lt;TokenType.SMALLSERIAL: &#39;SMALLSERIAL&#39;&gt;, &lt;TokenType.TEXT: &#39;TEXT&#39;&gt;, &lt;TokenType.NESTED: &#39;NESTED&#39;&gt;, &lt;TokenType.TIMETZ: &#39;TIMETZ&#39;&gt;, &lt;TokenType.ANY: &#39;ANY&#39;&gt;, &lt;TokenType.VAR: &#39;VAR&#39;&gt;, &lt;TokenType.OFFSET: &#39;OFFSET&#39;&gt;, &lt;TokenType.RIGHT: &#39;RIGHT&#39;&gt;, &lt;TokenType.FIXEDSTRING: &#39;FIXEDSTRING&#39;&gt;, &lt;TokenType.TIME: &#39;TIME&#39;&gt;, &lt;TokenType.LONGBLOB: &#39;LONGBLOB&#39;&gt;, &lt;TokenType.TSTZMULTIRANGE: &#39;TSTZMULTIRANGE&#39;&gt;, &lt;TokenType.CURRENT_DATE: &#39;CURRENT_DATE&#39;&gt;, &lt;TokenType.UNKNOWN: &#39;UNKNOWN&#39;&gt;, &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;, &lt;TokenType.INT: &#39;INT&#39;&gt;, &lt;TokenType.VARIANT: &#39;VARIANT&#39;&gt;, &lt;TokenType.SUPER: &#39;SUPER&#39;&gt;, &lt;TokenType.INT4MULTIRANGE: &#39;INT4MULTIRANGE&#39;&gt;, &lt;TokenType.HSTORE: &#39;HSTORE&#39;&gt;, &lt;TokenType.CURRENT_TIME: &#39;CURRENT_TIME&#39;&gt;, &lt;TokenType.GLOB: &#39;GLOB&#39;&gt;, &lt;TokenType.FLOAT: &#39;FLOAT&#39;&gt;, &lt;TokenType.TIMESTAMPLTZ: &#39;TIMESTAMPLTZ&#39;&gt;, &lt;TokenType.VARCHAR: &#39;VARCHAR&#39;&gt;, &lt;TokenType.PRIMARY_KEY: &#39;PRIMARY_KEY&#39;&gt;, &lt;TokenType.BINARY: &#39;BINARY&#39;&gt;, &lt;TokenType.PSEUDO_TYPE: &#39;PSEUDO_TYPE&#39;&gt;, &lt;TokenType.NUMRANGE: &#39;NUMRANGE&#39;&gt;, &lt;TokenType.SMALLINT: &#39;SMALLINT&#39;&gt;, &lt;TokenType.BIT: &#39;BIT&#39;&gt;, &lt;TokenType.CURRENT_USER: &#39;CURRENT_USER&#39;&gt;, &lt;TokenType.INT256: &#39;INT256&#39;&gt;, &lt;TokenType.UNNEST: &#39;UNNEST&#39;&gt;, &lt;TokenType.ROWVERSION: &#39;ROWVERSION&#39;&gt;, &lt;TokenType.INET: &#39;INET&#39;&gt;, &lt;TokenType.FORMAT: &#39;FORMAT&#39;&gt;, &lt;TokenType.BIGSERIAL: &#39;BIGSERIAL&#39;&gt;, &lt;TokenType.DATEMULTIRANGE: &#39;DATEMULTIRANGE&#39;&gt;, &lt;TokenType.BIGINT: &#39;BIGINT&#39;&gt;, &lt;TokenType.LIKE: &#39;LIKE&#39;&gt;, &lt;TokenType.LOWCARDINALITY: &#39;LOWCARDINALITY&#39;&gt;, &lt;TokenType.INT128: &#39;INT128&#39;&gt;, &lt;TokenType.USERDEFINED: &#39;USERDEFINED&#39;&gt;, &lt;TokenType.MEDIUMINT: &#39;MEDIUMINT&#39;&gt;, &lt;TokenType.TINYINT: &#39;TINYINT&#39;&gt;, &lt;TokenType.INTERVAL: &#39;INTERVAL&#39;&gt;, &lt;TokenType.UUID: &#39;UUID&#39;&gt;, &lt;TokenType.LEFT: &#39;LEFT&#39;&gt;, &lt;TokenType.UINT: &#39;UINT&#39;&gt;, &lt;TokenType.UNIQUEIDENTIFIER: &#39;UNIQUEIDENTIFIER&#39;&gt;, &lt;TokenType.FIRST: &#39;FIRST&#39;&gt;, &lt;TokenType.MEDIUMTEXT: &#39;MEDIUMTEXT&#39;&gt;, &lt;TokenType.ARRAY: &#39;ARRAY&#39;&gt;, &lt;TokenType.DECIMAL: &#39;DECIMAL&#39;&gt;, &lt;TokenType.LONGTEXT: &#39;LONGTEXT&#39;&gt;, &lt;TokenType.WINDOW: &#39;WINDOW&#39;&gt;, &lt;TokenType.SOME: &#39;SOME&#39;&gt;, &lt;TokenType.UTINYINT: &#39;UTINYINT&#39;&gt;, &lt;TokenType.TSMULTIRANGE: &#39;TSMULTIRANGE&#39;&gt;, &lt;TokenType.IMAGE: &#39;IMAGE&#39;&gt;, &lt;TokenType.NULL: &#39;NULL&#39;&gt;, &lt;TokenType.IPADDRESS: &#39;IPADDRESS&#39;&gt;, &lt;TokenType.FILTER: &#39;FILTER&#39;&gt;, &lt;TokenType.COMMAND: &#39;COMMAND&#39;&gt;, &lt;TokenType.GEOGRAPHY: &#39;GEOGRAPHY&#39;&gt;, &lt;TokenType.ALL: &#39;ALL&#39;&gt;, &lt;TokenType.DATETIME: &#39;DATETIME&#39;&gt;, &lt;TokenType.CURRENT_DATETIME: &#39;CURRENT_DATETIME&#39;&gt;, &lt;TokenType.YEAR: &#39;YEAR&#39;&gt;, &lt;TokenType.CHAR: &#39;CHAR&#39;&gt;, &lt;TokenType.VARBINARY: &#39;VARBINARY&#39;&gt;, &lt;TokenType.MONEY: &#39;MONEY&#39;&gt;, &lt;TokenType.EXISTS: &#39;EXISTS&#39;&gt;, &lt;TokenType.INT4RANGE: &#39;INT4RANGE&#39;&gt;, &lt;TokenType.JSONB: &#39;JSONB&#39;&gt;, &lt;TokenType.INT8MULTIRANGE: &#39;INT8MULTIRANGE&#39;&gt;, &lt;TokenType.NVARCHAR: &#39;NVARCHAR&#39;&gt;, &lt;TokenType.TABLE: &#39;TABLE&#39;&gt;, &lt;TokenType.ENUM16: &#39;ENUM16&#39;&gt;, &lt;TokenType.TSRANGE: &#39;TSRANGE&#39;&gt;, &lt;TokenType.ISNULL: &#39;ISNULL&#39;&gt;, &lt;TokenType.BIGDECIMAL: &#39;BIGDECIMAL&#39;&gt;, &lt;TokenType.CURRENT_TIMESTAMP: &#39;CURRENT_TIMESTAMP&#39;&gt;, &lt;TokenType.INT8RANGE: &#39;INT8RANGE&#39;&gt;, &lt;TokenType.TIMESTAMP: &#39;TIMESTAMP&#39;&gt;, &lt;TokenType.MAP: &#39;MAP&#39;&gt;, &lt;TokenType.ILIKE: &#39;ILIKE&#39;&gt;, &lt;TokenType.JSON: &#39;JSON&#39;&gt;, &lt;TokenType.NCHAR: &#39;NCHAR&#39;&gt;, &lt;TokenType.XOR: &#39;XOR&#39;&gt;, &lt;TokenType.RANGE: &#39;RANGE&#39;&gt;, &lt;TokenType.TSTZRANGE: &#39;TSTZRANGE&#39;&gt;, &lt;TokenType.DATETIME64: &#39;DATETIME64&#39;&gt;, &lt;TokenType.MEDIUMBLOB: &#39;MEDIUMBLOB&#39;&gt;, &lt;TokenType.USMALLINT: &#39;USMALLINT&#39;&gt;, &lt;TokenType.OBJECT: &#39;OBJECT&#39;&gt;, &lt;TokenType.DATERANGE: &#39;DATERANGE&#39;&gt;, &lt;TokenType.ENUM8: &#39;ENUM8&#39;&gt;}</span>
</div>
@@ -1183,7 +1194,7 @@ Default: 3</li>
<div class="attr variable">
<span class="name">STATEMENT_PARSERS</span> =
<input id="Teradata.Parser.STATEMENT_PARSERS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Teradata.Parser.STATEMENT_PARSERS-view-value"></label><span class="default_value">{&lt;TokenType.ALTER: &#39;ALTER&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.CREATE: &#39;CREATE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DROP: &#39;DROP&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.ROLLBACK: &#39;ROLLBACK&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.UNCACHE: &#39;UNCACHE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;: &lt;function <a href="#Teradata.Parser">Teradata.Parser</a>.&lt;lambda&gt;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="Teradata.Parser.STATEMENT_PARSERS-view-value"></label><span class="default_value">{&lt;TokenType.ALTER: &#39;ALTER&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.BEGIN: &#39;BEGIN&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.CACHE: &#39;CACHE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.COMMIT: &#39;COMMIT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.COMMENT: &#39;COMMENT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.CREATE: &#39;CREATE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DELETE: &#39;DELETE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DESC: &#39;DESC&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DESCRIBE: &#39;DESCRIBE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DROP: &#39;DROP&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.INSERT: &#39;INSERT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.LOAD: &#39;LOAD&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.MERGE: &#39;MERGE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.PIVOT: &#39;PIVOT&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.PRAGMA: &#39;PRAGMA&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.ROLLBACK: &#39;ROLLBACK&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.SET: &#39;SET&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.UNCACHE: &#39;UNCACHE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.UPDATE: &#39;UPDATE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.USE: &#39;USE&#39;&gt;: &lt;function Parser.&lt;lambda&gt;&gt;, &lt;TokenType.DATABASE: &#39;DATABASE&#39;&gt;: &lt;function <a href="#Teradata.Parser">Teradata.Parser</a>.&lt;lambda&gt;&gt;, &lt;TokenType.REPLACE: &#39;REPLACE&#39;&gt;: &lt;function <a href="#Teradata.Parser">Teradata.Parser</a>.&lt;lambda&gt;&gt;}</span>
</div>
@@ -1388,74 +1399,75 @@ Default: 3</li>
</div>
<a class="headerlink" href="#Teradata.Generator"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator-145"><a href="#Teradata.Generator-145"><span class="linenos">145</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
-</span><span id="Teradata.Generator-146"><a href="#Teradata.Generator-146"><span class="linenos">146</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata.Generator-147"><a href="#Teradata.Generator-147"><span class="linenos">147</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata.Generator-148"><a href="#Teradata.Generator-148"><span class="linenos">148</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
-</span><span id="Teradata.Generator-149"><a href="#Teradata.Generator-149"><span class="linenos">149</span></a>
-</span><span id="Teradata.Generator-150"><a href="#Teradata.Generator-150"><span class="linenos">150</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata.Generator-151"><a href="#Teradata.Generator-151"><span class="linenos">151</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="Teradata.Generator-152"><a href="#Teradata.Generator-152"><span class="linenos">152</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
-</span><span id="Teradata.Generator-153"><a href="#Teradata.Generator-153"><span class="linenos">153</span></a> <span class="p">}</span>
-</span><span id="Teradata.Generator-154"><a href="#Teradata.Generator-154"><span class="linenos">154</span></a>
-</span><span id="Teradata.Generator-155"><a href="#Teradata.Generator-155"><span class="linenos">155</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata.Generator-156"><a href="#Teradata.Generator-156"><span class="linenos">156</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="Teradata.Generator-157"><a href="#Teradata.Generator-157"><span class="linenos">157</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
-</span><span id="Teradata.Generator-158"><a href="#Teradata.Generator-158"><span class="linenos">158</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_EXPRESSION</span><span class="p">,</span>
-</span><span id="Teradata.Generator-159"><a href="#Teradata.Generator-159"><span class="linenos">159</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
-</span><span id="Teradata.Generator-160"><a href="#Teradata.Generator-160"><span class="linenos">160</span></a> <span class="p">}</span>
-</span><span id="Teradata.Generator-161"><a href="#Teradata.Generator-161"><span class="linenos">161</span></a>
-</span><span id="Teradata.Generator-162"><a href="#Teradata.Generator-162"><span class="linenos">162</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="Teradata.Generator-163"><a href="#Teradata.Generator-163"><span class="linenos">163</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="Teradata.Generator-164"><a href="#Teradata.Generator-164"><span class="linenos">164</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="Teradata.Generator-165"><a href="#Teradata.Generator-165"><span class="linenos">165</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="Teradata.Generator-166"><a href="#Teradata.Generator-166"><span class="linenos">166</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
-</span><span id="Teradata.Generator-167"><a href="#Teradata.Generator-167"><span class="linenos">167</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
-</span><span id="Teradata.Generator-168"><a href="#Teradata.Generator-168"><span class="linenos">168</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Teradata.Generator-169"><a href="#Teradata.Generator-169"><span class="linenos">169</span></a> <span class="p">}</span>
-</span><span id="Teradata.Generator-170"><a href="#Teradata.Generator-170"><span class="linenos">170</span></a>
-</span><span id="Teradata.Generator-171"><a href="#Teradata.Generator-171"><span class="linenos">171</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-172"><a href="#Teradata.Generator-172"><span class="linenos">172</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator-173"><a href="#Teradata.Generator-173"><span class="linenos">173</span></a>
-</span><span id="Teradata.Generator-174"><a href="#Teradata.Generator-174"><span class="linenos">174</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata.Generator-175"><a href="#Teradata.Generator-175"><span class="linenos">175</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata.Generator-176"><a href="#Teradata.Generator-176"><span class="linenos">176</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-177"><a href="#Teradata.Generator-177"><span class="linenos">177</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-178"><a href="#Teradata.Generator-178"><span class="linenos">178</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-179"><a href="#Teradata.Generator-179"><span class="linenos">179</span></a> <span class="n">set_sql</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="Teradata.Generator-180"><a href="#Teradata.Generator-180"><span class="linenos">180</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-181"><a href="#Teradata.Generator-181"><span class="linenos">181</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator-182"><a href="#Teradata.Generator-182"><span class="linenos">182</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="Teradata.Generator-183"><a href="#Teradata.Generator-183"><span class="linenos">183</span></a>
-</span><span id="Teradata.Generator-184"><a href="#Teradata.Generator-184"><span class="linenos">184</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-185"><a href="#Teradata.Generator-185"><span class="linenos">185</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-186"><a href="#Teradata.Generator-186"><span class="linenos">186</span></a>
-</span><span id="Teradata.Generator-187"><a href="#Teradata.Generator-187"><span class="linenos">187</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-188"><a href="#Teradata.Generator-188"><span class="linenos">188</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata.Generator-189"><a href="#Teradata.Generator-189"><span class="linenos">189</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-190"><a href="#Teradata.Generator-190"><span class="linenos">190</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="Teradata.Generator-191"><a href="#Teradata.Generator-191"><span class="linenos">191</span></a>
-</span><span id="Teradata.Generator-192"><a href="#Teradata.Generator-192"><span class="linenos">192</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-193"><a href="#Teradata.Generator-193"><span class="linenos">193</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-194"><a href="#Teradata.Generator-194"><span class="linenos">194</span></a> <span class="n">expressions_sql</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><span id="Teradata.Generator-195"><a href="#Teradata.Generator-195"><span class="linenos">195</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-196"><a href="#Teradata.Generator-196"><span class="linenos">196</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata.Generator-197"><a href="#Teradata.Generator-197"><span class="linenos">197</span></a>
-</span><span id="Teradata.Generator-198"><a href="#Teradata.Generator-198"><span class="linenos">198</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
-</span><span id="Teradata.Generator-199"><a href="#Teradata.Generator-199"><span class="linenos">199</span></a>
-</span><span id="Teradata.Generator-200"><a href="#Teradata.Generator-200"><span class="linenos">200</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-201"><a href="#Teradata.Generator-201"><span class="linenos">201</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
-</span><span id="Teradata.Generator-202"><a href="#Teradata.Generator-202"><span class="linenos">202</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
-</span><span id="Teradata.Generator-203"><a href="#Teradata.Generator-203"><span class="linenos">203</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-204"><a href="#Teradata.Generator-204"><span class="linenos">204</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
-</span><span id="Teradata.Generator-205"><a href="#Teradata.Generator-205"><span class="linenos">205</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
-</span><span id="Teradata.Generator-206"><a href="#Teradata.Generator-206"><span class="linenos">206</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="Teradata.Generator-207"><a href="#Teradata.Generator-207"><span class="linenos">207</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
-</span><span id="Teradata.Generator-208"><a href="#Teradata.Generator-208"><span class="linenos">208</span></a> <span class="p">)</span>
-</span><span id="Teradata.Generator-209"><a href="#Teradata.Generator-209"><span class="linenos">209</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata.Generator-210"><a href="#Teradata.Generator-210"><span class="linenos">210</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator-211"><a href="#Teradata.Generator-211"><span class="linenos">211</span></a>
-</span><span id="Teradata.Generator-212"><a href="#Teradata.Generator-212"><span class="linenos">212</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator-148"><a href="#Teradata.Generator-148"><span class="linenos">148</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span>
+</span><span id="Teradata.Generator-149"><a href="#Teradata.Generator-149"><span class="linenos">149</span></a> <span class="n">JOIN_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata.Generator-150"><a href="#Teradata.Generator-150"><span class="linenos">150</span></a> <span class="n">TABLE_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata.Generator-151"><a href="#Teradata.Generator-151"><span class="linenos">151</span></a> <span class="n">QUERY_HINTS</span> <span class="o">=</span> <span class="kc">False</span>
+</span><span id="Teradata.Generator-152"><a href="#Teradata.Generator-152"><span class="linenos">152</span></a>
+</span><span id="Teradata.Generator-153"><a href="#Teradata.Generator-153"><span class="linenos">153</span></a> <span class="n">TYPE_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata.Generator-154"><a href="#Teradata.Generator-154"><span class="linenos">154</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="Teradata.Generator-155"><a href="#Teradata.Generator-155"><span class="linenos">155</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">GEOMETRY</span><span class="p">:</span> <span class="s2">&quot;ST_GEOMETRY&quot;</span><span class="p">,</span>
+</span><span id="Teradata.Generator-156"><a href="#Teradata.Generator-156"><span class="linenos">156</span></a> <span class="p">}</span>
+</span><span id="Teradata.Generator-157"><a href="#Teradata.Generator-157"><span class="linenos">157</span></a>
+</span><span id="Teradata.Generator-158"><a href="#Teradata.Generator-158"><span class="linenos">158</span></a> <span class="n">PROPERTIES_LOCATION</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata.Generator-159"><a href="#Teradata.Generator-159"><span class="linenos">159</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="Teradata.Generator-160"><a href="#Teradata.Generator-160"><span class="linenos">160</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">OnCommitProperty</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_INDEX</span><span class="p">,</span>
+</span><span id="Teradata.Generator-161"><a href="#Teradata.Generator-161"><span class="linenos">161</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_EXPRESSION</span><span class="p">,</span>
+</span><span id="Teradata.Generator-162"><a href="#Teradata.Generator-162"><span class="linenos">162</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StabilityProperty</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_CREATE</span><span class="p">,</span>
+</span><span id="Teradata.Generator-163"><a href="#Teradata.Generator-163"><span class="linenos">163</span></a> <span class="p">}</span>
+</span><span id="Teradata.Generator-164"><a href="#Teradata.Generator-164"><span class="linenos">164</span></a>
+</span><span id="Teradata.Generator-165"><a href="#Teradata.Generator-165"><span class="linenos">165</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="Teradata.Generator-166"><a href="#Teradata.Generator-166"><span class="linenos">166</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="Teradata.Generator-167"><a href="#Teradata.Generator-167"><span class="linenos">167</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="Teradata.Generator-168"><a href="#Teradata.Generator-168"><span class="linenos">168</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="Teradata.Generator-169"><a href="#Teradata.Generator-169"><span class="linenos">169</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 class="n">transforms</span><span class="o">.</span><span class="n">eliminate_distinct_on</span><span class="p">]),</span>
+</span><span id="Teradata.Generator-170"><a href="#Teradata.Generator-170"><span class="linenos">170</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">StrToDate</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;CAST(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2"> AS DATE FORMAT </span><span class="si">{</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 class="si">}</span><span class="s2">)&quot;</span><span class="p">,</span>
+</span><span id="Teradata.Generator-171"><a href="#Teradata.Generator-171"><span class="linenos">171</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</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">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Teradata.Generator-172"><a href="#Teradata.Generator-172"><span class="linenos">172</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Use</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;DATABASE </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
+</span><span id="Teradata.Generator-173"><a href="#Teradata.Generator-173"><span class="linenos">173</span></a> <span class="p">}</span>
+</span><span id="Teradata.Generator-174"><a href="#Teradata.Generator-174"><span class="linenos">174</span></a>
+</span><span id="Teradata.Generator-175"><a href="#Teradata.Generator-175"><span class="linenos">175</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-176"><a href="#Teradata.Generator-176"><span class="linenos">176</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator-177"><a href="#Teradata.Generator-177"><span class="linenos">177</span></a>
+</span><span id="Teradata.Generator-178"><a href="#Teradata.Generator-178"><span class="linenos">178</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata.Generator-179"><a href="#Teradata.Generator-179"><span class="linenos">179</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata.Generator-180"><a href="#Teradata.Generator-180"><span class="linenos">180</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-181"><a href="#Teradata.Generator-181"><span class="linenos">181</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-182"><a href="#Teradata.Generator-182"><span class="linenos">182</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-183"><a href="#Teradata.Generator-183"><span class="linenos">183</span></a> <span class="n">set_sql</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="Teradata.Generator-184"><a href="#Teradata.Generator-184"><span class="linenos">184</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-185"><a href="#Teradata.Generator-185"><span class="linenos">185</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator-186"><a href="#Teradata.Generator-186"><span class="linenos">186</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="Teradata.Generator-187"><a href="#Teradata.Generator-187"><span class="linenos">187</span></a>
+</span><span id="Teradata.Generator-188"><a href="#Teradata.Generator-188"><span class="linenos">188</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-189"><a href="#Teradata.Generator-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-190"><a href="#Teradata.Generator-190"><span class="linenos">190</span></a>
+</span><span id="Teradata.Generator-191"><a href="#Teradata.Generator-191"><span class="linenos">191</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-192"><a href="#Teradata.Generator-192"><span class="linenos">192</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata.Generator-193"><a href="#Teradata.Generator-193"><span class="linenos">193</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-194"><a href="#Teradata.Generator-194"><span class="linenos">194</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="Teradata.Generator-195"><a href="#Teradata.Generator-195"><span class="linenos">195</span></a>
+</span><span id="Teradata.Generator-196"><a href="#Teradata.Generator-196"><span class="linenos">196</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-197"><a href="#Teradata.Generator-197"><span class="linenos">197</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-198"><a href="#Teradata.Generator-198"><span class="linenos">198</span></a> <span class="n">expressions_sql</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><span id="Teradata.Generator-199"><a href="#Teradata.Generator-199"><span class="linenos">199</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-200"><a href="#Teradata.Generator-200"><span class="linenos">200</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata.Generator-201"><a href="#Teradata.Generator-201"><span class="linenos">201</span></a>
+</span><span id="Teradata.Generator-202"><a href="#Teradata.Generator-202"><span class="linenos">202</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="Teradata.Generator-203"><a href="#Teradata.Generator-203"><span class="linenos">203</span></a>
+</span><span id="Teradata.Generator-204"><a href="#Teradata.Generator-204"><span class="linenos">204</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-205"><a href="#Teradata.Generator-205"><span class="linenos">205</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
+</span><span id="Teradata.Generator-206"><a href="#Teradata.Generator-206"><span class="linenos">206</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
+</span><span id="Teradata.Generator-207"><a href="#Teradata.Generator-207"><span class="linenos">207</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-208"><a href="#Teradata.Generator-208"><span class="linenos">208</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
+</span><span id="Teradata.Generator-209"><a href="#Teradata.Generator-209"><span class="linenos">209</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
+</span><span id="Teradata.Generator-210"><a href="#Teradata.Generator-210"><span class="linenos">210</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="Teradata.Generator-211"><a href="#Teradata.Generator-211"><span class="linenos">211</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
+</span><span id="Teradata.Generator-212"><a href="#Teradata.Generator-212"><span class="linenos">212</span></a> <span class="p">)</span>
+</span><span id="Teradata.Generator-213"><a href="#Teradata.Generator-213"><span class="linenos">213</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata.Generator-214"><a href="#Teradata.Generator-214"><span class="linenos">214</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator-215"><a href="#Teradata.Generator-215"><span class="linenos">215</span></a>
+</span><span id="Teradata.Generator-216"><a href="#Teradata.Generator-216"><span class="linenos">216</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
</span></pre></div>
@@ -1564,7 +1576,7 @@ Default: True</li>
<div class="attr variable">
<span class="name">TRANSFORMS</span> =
<input id="Teradata.Generator.TRANSFORMS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
- <label class="view-value-button pdoc-button" for="Teradata.Generator.TRANSFORMS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CheckColumnConstraint">sqlglot.expressions.CheckColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntervalDayToSecondSpan">sqlglot.expressions.IntervalDayToSecondSpan</a>&#39;&gt;: &#39;DAY TO SECOND&#39;, &lt;class &#39;<a href="../expressions.html#IntervalYearToMonthSpan">sqlglot.expressions.IntervalYearToMonthSpan</a>&#39;&gt;: &#39;YEAR TO MONTH&#39;, &lt;class &#39;<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Max">sqlglot.expressions.Max</a>&#39;&gt;: &lt;function max_or_greatest&gt;, &lt;class &#39;<a href="../expressions.html#Min">sqlglot.expressions.Min</a>&#39;&gt;: &lt;function min_or_least&gt;, &lt;class &#39;<a href="../expressions.html#Select">sqlglot.expressions.Select</a>&#39;&gt;: &lt;function preprocess.&lt;locals&gt;._to_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;: &lt;function <a href="#Teradata.Generator">Teradata.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToChar">sqlglot.expressions.ToChar</a>&#39;&gt;: &lt;function <a href="#Teradata.Generator">Teradata.Generator</a>.&lt;lambda&gt;&gt;}</span>
+ <label class="view-value-button pdoc-button" for="Teradata.Generator.TRANSFORMS-view-value"></label><span class="default_value">{&lt;class &#39;<a href="../expressions.html#DateAdd">sqlglot.expressions.DateAdd</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TsOrDsAdd">sqlglot.expressions.TsOrDsAdd</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CaseSpecificColumnConstraint">sqlglot.expressions.CaseSpecificColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetColumnConstraint">sqlglot.expressions.CharacterSetColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CharacterSetProperty">sqlglot.expressions.CharacterSetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CheckColumnConstraint">sqlglot.expressions.CheckColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ClusteredColumnConstraint">sqlglot.expressions.ClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CollateColumnConstraint">sqlglot.expressions.CollateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CopyGrantsProperty">sqlglot.expressions.CopyGrantsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#CommentColumnConstraint">sqlglot.expressions.CommentColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DateFormatColumnConstraint">sqlglot.expressions.DateFormatColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#DefaultColumnConstraint">sqlglot.expressions.DefaultColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#EncodeColumnConstraint">sqlglot.expressions.EncodeColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExecuteAsProperty">sqlglot.expressions.ExecuteAsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ExternalProperty">sqlglot.expressions.ExternalProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#HeapProperty">sqlglot.expressions.HeapProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#InlineLengthColumnConstraint">sqlglot.expressions.InlineLengthColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#IntervalDayToSecondSpan">sqlglot.expressions.IntervalDayToSecondSpan</a>&#39;&gt;: &#39;DAY TO SECOND&#39;, &lt;class &#39;<a href="../expressions.html#IntervalYearToMonthSpan">sqlglot.expressions.IntervalYearToMonthSpan</a>&#39;&gt;: &#39;YEAR TO MONTH&#39;, &lt;class &#39;<a href="../expressions.html#LanguageProperty">sqlglot.expressions.LanguageProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LocationProperty">sqlglot.expressions.LocationProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#LogProperty">sqlglot.expressions.LogProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#MaterializedProperty">sqlglot.expressions.MaterializedProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NoPrimaryIndexProperty">sqlglot.expressions.NoPrimaryIndexProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NonClusteredColumnConstraint">sqlglot.expressions.NonClusteredColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#NotForReplicationColumnConstraint">sqlglot.expressions.NotForReplicationColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnCommitProperty">sqlglot.expressions.OnCommitProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnProperty">sqlglot.expressions.OnProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#OnUpdateColumnConstraint">sqlglot.expressions.OnUpdateColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#PathColumnConstraint">sqlglot.expressions.PathColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ReturnsProperty">sqlglot.expressions.ReturnsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SetProperty">sqlglot.expressions.SetProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SettingsProperty">sqlglot.expressions.SettingsProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#SqlSecurityProperty">sqlglot.expressions.SqlSecurityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#StabilityProperty">sqlglot.expressions.StabilityProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TemporaryProperty">sqlglot.expressions.TemporaryProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToTableProperty">sqlglot.expressions.ToTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TransientProperty">sqlglot.expressions.TransientProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#TitleColumnConstraint">sqlglot.expressions.TitleColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#UppercaseColumnConstraint">sqlglot.expressions.UppercaseColumnConstraint</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VarMap">sqlglot.expressions.VarMap</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#VolatileProperty">sqlglot.expressions.VolatileProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#WithJournalTableProperty">sqlglot.expressions.WithJournalTableProperty</a>&#39;&gt;: &lt;function Generator.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Max">sqlglot.expressions.Max</a>&#39;&gt;: &lt;function max_or_greatest&gt;, &lt;class &#39;<a href="../expressions.html#Min">sqlglot.expressions.Min</a>&#39;&gt;: &lt;function min_or_least&gt;, &lt;class &#39;<a href="../expressions.html#Select">sqlglot.expressions.Select</a>&#39;&gt;: &lt;function preprocess.&lt;locals&gt;._to_sql&gt;, &lt;class &#39;<a href="../expressions.html#StrToDate">sqlglot.expressions.StrToDate</a>&#39;&gt;: &lt;function <a href="#Teradata.Generator">Teradata.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#ToChar">sqlglot.expressions.ToChar</a>&#39;&gt;: &lt;function <a href="#Teradata.Generator">Teradata.Generator</a>.&lt;lambda&gt;&gt;, &lt;class &#39;<a href="../expressions.html#Use">sqlglot.expressions.Use</a>&#39;&gt;: &lt;function <a href="#Teradata.Generator">Teradata.Generator</a>.&lt;lambda&gt;&gt;}</span>
</div>
@@ -1584,8 +1596,8 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.partitionedbyproperty_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.partitionedbyproperty_sql-171"><a href="#Teradata.Generator.partitionedbyproperty_sql-171"><span class="linenos">171</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.partitionedbyproperty_sql-172"><a href="#Teradata.Generator.partitionedbyproperty_sql-172"><span class="linenos">172</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.partitionedbyproperty_sql-175"><a href="#Teradata.Generator.partitionedbyproperty_sql-175"><span class="linenos">175</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_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">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.partitionedbyproperty_sql-176"><a href="#Teradata.Generator.partitionedbyproperty_sql-176"><span class="linenos">176</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION 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">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
</span></pre></div>
@@ -1603,13 +1615,13 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.update_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.update_sql-176"><a href="#Teradata.Generator.update_sql-176"><span class="linenos">176</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.update_sql-177"><a href="#Teradata.Generator.update_sql-177"><span class="linenos">177</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-178"><a href="#Teradata.Generator.update_sql-178"><span class="linenos">178</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-179"><a href="#Teradata.Generator.update_sql-179"><span class="linenos">179</span></a> <span class="n">set_sql</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="Teradata.Generator.update_sql-180"><a href="#Teradata.Generator.update_sql-180"><span class="linenos">180</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-181"><a href="#Teradata.Generator.update_sql-181"><span class="linenos">181</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator.update_sql-182"><a href="#Teradata.Generator.update_sql-182"><span class="linenos">182</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.update_sql-180"><a href="#Teradata.Generator.update_sql-180"><span class="linenos">180</span></a> <span class="k">def</span> <span class="nf">update_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">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.update_sql-181"><a href="#Teradata.Generator.update_sql-181"><span class="linenos">181</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-182"><a href="#Teradata.Generator.update_sql-182"><span class="linenos">182</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-183"><a href="#Teradata.Generator.update_sql-183"><span class="linenos">183</span></a> <span class="n">set_sql</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="Teradata.Generator.update_sql-184"><a href="#Teradata.Generator.update_sql-184"><span class="linenos">184</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-185"><a href="#Teradata.Generator.update_sql-185"><span class="linenos">185</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator.update_sql-186"><a href="#Teradata.Generator.update_sql-186"><span class="linenos">186</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
</span></pre></div>
@@ -1627,8 +1639,8 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.mod_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.mod_sql-184"><a href="#Teradata.Generator.mod_sql-184"><span class="linenos">184</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.mod_sql-185"><a href="#Teradata.Generator.mod_sql-185"><span class="linenos">185</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.mod_sql-188"><a href="#Teradata.Generator.mod_sql-188"><span class="linenos">188</span></a> <span class="k">def</span> <span class="nf">mod_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">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.mod_sql-189"><a href="#Teradata.Generator.mod_sql-189"><span class="linenos">189</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
</span></pre></div>
@@ -1646,10 +1658,10 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.datatype_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.datatype_sql-187"><a href="#Teradata.Generator.datatype_sql-187"><span class="linenos">187</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.datatype_sql-188"><a href="#Teradata.Generator.datatype_sql-188"><span class="linenos">188</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata.Generator.datatype_sql-189"><a href="#Teradata.Generator.datatype_sql-189"><span class="linenos">189</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.datatype_sql-190"><a href="#Teradata.Generator.datatype_sql-190"><span class="linenos">190</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.datatype_sql-191"><a href="#Teradata.Generator.datatype_sql-191"><span class="linenos">191</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.datatype_sql-192"><a href="#Teradata.Generator.datatype_sql-192"><span class="linenos">192</span></a> <span class="n">type_sql</span> <span class="o">=</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="Teradata.Generator.datatype_sql-193"><a href="#Teradata.Generator.datatype_sql-193"><span class="linenos">193</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.datatype_sql-194"><a href="#Teradata.Generator.datatype_sql-194"><span class="linenos">194</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
</span></pre></div>
@@ -1667,13 +1679,13 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.rangen_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.rangen_sql-192"><a href="#Teradata.Generator.rangen_sql-192"><span class="linenos">192</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.rangen_sql-193"><a href="#Teradata.Generator.rangen_sql-193"><span class="linenos">193</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.rangen_sql-194"><a href="#Teradata.Generator.rangen_sql-194"><span class="linenos">194</span></a> <span class="n">expressions_sql</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><span id="Teradata.Generator.rangen_sql-195"><a href="#Teradata.Generator.rangen_sql-195"><span class="linenos">195</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.rangen_sql-196"><a href="#Teradata.Generator.rangen_sql-196"><span class="linenos">196</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata.Generator.rangen_sql-197"><a href="#Teradata.Generator.rangen_sql-197"><span class="linenos">197</span></a>
-</span><span id="Teradata.Generator.rangen_sql-198"><a href="#Teradata.Generator.rangen_sql-198"><span class="linenos">198</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.rangen_sql-196"><a href="#Teradata.Generator.rangen_sql-196"><span class="linenos">196</span></a> <span class="k">def</span> <span class="nf">rangen_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">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.rangen_sql-197"><a href="#Teradata.Generator.rangen_sql-197"><span class="linenos">197</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.rangen_sql-198"><a href="#Teradata.Generator.rangen_sql-198"><span class="linenos">198</span></a> <span class="n">expressions_sql</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><span id="Teradata.Generator.rangen_sql-199"><a href="#Teradata.Generator.rangen_sql-199"><span class="linenos">199</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.rangen_sql-200"><a href="#Teradata.Generator.rangen_sql-200"><span class="linenos">200</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata.Generator.rangen_sql-201"><a href="#Teradata.Generator.rangen_sql-201"><span class="linenos">201</span></a>
+</span><span id="Teradata.Generator.rangen_sql-202"><a href="#Teradata.Generator.rangen_sql-202"><span class="linenos">202</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -1691,19 +1703,19 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.createable_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.createable_sql-200"><a href="#Teradata.Generator.createable_sql-200"><span class="linenos">200</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.createable_sql-201"><a href="#Teradata.Generator.createable_sql-201"><span class="linenos">201</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
-</span><span id="Teradata.Generator.createable_sql-202"><a href="#Teradata.Generator.createable_sql-202"><span class="linenos">202</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
-</span><span id="Teradata.Generator.createable_sql-203"><a href="#Teradata.Generator.createable_sql-203"><span class="linenos">203</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.createable_sql-204"><a href="#Teradata.Generator.createable_sql-204"><span class="linenos">204</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
-</span><span id="Teradata.Generator.createable_sql-205"><a href="#Teradata.Generator.createable_sql-205"><span class="linenos">205</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
-</span><span id="Teradata.Generator.createable_sql-206"><a href="#Teradata.Generator.createable_sql-206"><span class="linenos">206</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
-</span><span id="Teradata.Generator.createable_sql-207"><a href="#Teradata.Generator.createable_sql-207"><span class="linenos">207</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
-</span><span id="Teradata.Generator.createable_sql-208"><a href="#Teradata.Generator.createable_sql-208"><span class="linenos">208</span></a> <span class="p">)</span>
-</span><span id="Teradata.Generator.createable_sql-209"><a href="#Teradata.Generator.createable_sql-209"><span class="linenos">209</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata.Generator.createable_sql-210"><a href="#Teradata.Generator.createable_sql-210"><span class="linenos">210</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator.createable_sql-211"><a href="#Teradata.Generator.createable_sql-211"><span class="linenos">211</span></a>
-</span><span id="Teradata.Generator.createable_sql-212"><a href="#Teradata.Generator.createable_sql-212"><span class="linenos">212</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.createable_sql-204"><a href="#Teradata.Generator.createable_sql-204"><span class="linenos">204</span></a> <span class="k">def</span> <span class="nf">createable_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">Create</span><span class="p">,</span> <span class="n">locations</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">DefaultDict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.createable_sql-205"><a href="#Teradata.Generator.createable_sql-205"><span class="linenos">205</span></a> <span class="n">kind</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;kind&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
+</span><span id="Teradata.Generator.createable_sql-206"><a href="#Teradata.Generator.createable_sql-206"><span class="linenos">206</span></a> <span class="k">if</span> <span class="n">kind</span> <span class="o">==</span> <span class="s2">&quot;TABLE&quot;</span> <span class="ow">and</span> <span class="n">locations</span><span class="o">.</span><span class="n">get</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_NAME</span><span class="p">):</span>
+</span><span id="Teradata.Generator.createable_sql-207"><a href="#Teradata.Generator.createable_sql-207"><span class="linenos">207</span></a> <span class="n">this_name</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="o">.</span><span class="n">this</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.createable_sql-208"><a href="#Teradata.Generator.createable_sql-208"><span class="linenos">208</span></a> <span class="n">this_properties</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">properties</span><span class="p">(</span>
+</span><span id="Teradata.Generator.createable_sql-209"><a href="#Teradata.Generator.createable_sql-209"><span class="linenos">209</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Properties</span><span class="p">(</span><span class="n">expressions</span><span class="o">=</span><span class="n">locations</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_NAME</span><span class="p">]),</span>
+</span><span id="Teradata.Generator.createable_sql-210"><a href="#Teradata.Generator.createable_sql-210"><span class="linenos">210</span></a> <span class="n">wrapped</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+</span><span id="Teradata.Generator.createable_sql-211"><a href="#Teradata.Generator.createable_sql-211"><span class="linenos">211</span></a> <span class="n">prefix</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">,</span>
+</span><span id="Teradata.Generator.createable_sql-212"><a href="#Teradata.Generator.createable_sql-212"><span class="linenos">212</span></a> <span class="p">)</span>
+</span><span id="Teradata.Generator.createable_sql-213"><a href="#Teradata.Generator.createable_sql-213"><span class="linenos">213</span></a> <span class="n">this_schema</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">schema_columns_sql</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="Teradata.Generator.createable_sql-214"><a href="#Teradata.Generator.createable_sql-214"><span class="linenos">214</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">this_name</span><span class="si">}{</span><span class="n">this_properties</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">sep</span><span class="p">()</span><span class="si">}{</span><span class="n">this_schema</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator.createable_sql-215"><a href="#Teradata.Generator.createable_sql-215"><span class="linenos">215</span></a>
+</span><span id="Teradata.Generator.createable_sql-216"><a href="#Teradata.Generator.createable_sql-216"><span class="linenos">216</span></a> <span class="k">return</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">createable_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">locations</span><span class="p">)</span>
</span></pre></div>
@@ -2064,6 +2076,7 @@ Default: True</li>
<dd id="Teradata.Generator.intersect_op" class="function"><a href="../generator.html#Generator.intersect_op">intersect_op</a></dd>
<dd id="Teradata.Generator.introducer_sql" class="function"><a href="../generator.html#Generator.introducer_sql">introducer_sql</a></dd>
<dd id="Teradata.Generator.pseudotype_sql" class="function"><a href="../generator.html#Generator.pseudotype_sql">pseudotype_sql</a></dd>
+ <dd id="Teradata.Generator.objectidentifier_sql" class="function"><a href="../generator.html#Generator.objectidentifier_sql">objectidentifier_sql</a></dd>
<dd id="Teradata.Generator.onconflict_sql" class="function"><a href="../generator.html#Generator.onconflict_sql">onconflict_sql</a></dd>
<dd id="Teradata.Generator.returning_sql" class="function"><a href="../generator.html#Generator.returning_sql">returning_sql</a></dd>
<dd id="Teradata.Generator.rowformatdelimitedproperty_sql" class="function"><a href="../generator.html#Generator.rowformatdelimitedproperty_sql">rowformatdelimitedproperty_sql</a></dd>