Merging upstream version 18.3.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
668bf19880
commit
74296cdad7
56 changed files with 29963 additions and 29170 deletions
|
@ -45,6 +45,7 @@ class Teradata(Dialect):
|
|||
"MOD": TokenType.MOD,
|
||||
"NE": TokenType.NEQ,
|
||||
"NOT=": TokenType.NEQ,
|
||||
"SAMPLE": TokenType.TABLE_SAMPLE,
|
||||
"SEL": TokenType.SELECT,
|
||||
"ST_GEOMETRY": TokenType.GEOMETRY,
|
||||
"TOP": TokenType.TOP,
|
||||
|
@ -55,6 +56,8 @@ class Teradata(Dialect):
|
|||
SINGLE_TOKENS.pop("%")
|
||||
|
||||
class Parser(parser.Parser):
|
||||
TABLESAMPLE_CSV = True
|
||||
|
||||
CHARSET_TRANSLATORS = {
|
||||
"GRAPHIC_TO_KANJISJIS",
|
||||
"GRAPHIC_TO_LATIN",
|
||||
|
@ -171,6 +174,11 @@ class Teradata(Dialect):
|
|||
exp.Use: lambda self, e: f"DATABASE {self.sql(e, 'this')}",
|
||||
}
|
||||
|
||||
def tablesample_sql(
|
||||
self, expression: exp.TableSample, seed_prefix: str = "SEED", sep=" AS "
|
||||
) -> str:
|
||||
return f"{self.sql(expression, 'this')} SAMPLE {self.expressions(expression)}"
|
||||
|
||||
def partitionedbyproperty_sql(self, expression: exp.PartitionedByProperty) -> str:
|
||||
return f"PARTITION BY {self.sql(expression, 'this')}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue