Adding upstream version 26.2.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d908bee480
commit
7ee28625fb
85 changed files with 57142 additions and 52288 deletions
|
@ -263,6 +263,14 @@ TBLPROPERTIES (
|
|||
self.validate_identity("TRIM(LEADING 'SL' FROM 'SSparkSQLS')")
|
||||
self.validate_identity("TRIM(TRAILING 'SL' FROM 'SSparkSQLS')")
|
||||
self.validate_identity("SPLIT(str, pattern, lim)")
|
||||
self.validate_identity(
|
||||
"SELECT 1 limit",
|
||||
"SELECT 1 AS limit",
|
||||
)
|
||||
self.validate_identity(
|
||||
"SELECT 1 offset",
|
||||
"SELECT 1 AS offset",
|
||||
)
|
||||
self.validate_identity(
|
||||
"SELECT UNIX_TIMESTAMP()",
|
||||
"SELECT UNIX_TIMESTAMP(CURRENT_TIMESTAMP())",
|
||||
|
@ -918,3 +926,15 @@ TBLPROPERTIES (
|
|||
with self.subTest(f"Testing STRING() for {dialect}"):
|
||||
query = parse_one("STRING(a)", dialect=dialect)
|
||||
self.assertEqual(query.sql(dialect), "CAST(a AS STRING)")
|
||||
|
||||
def test_analyze(self):
|
||||
self.validate_identity("ANALYZE TABLE tbl COMPUTE STATISTICS NOSCAN")
|
||||
self.validate_identity("ANALYZE TABLE tbl COMPUTE STATISTICS FOR ALL COLUMNS")
|
||||
self.validate_identity("ANALYZE TABLE tbl COMPUTE STATISTICS FOR COLUMNS foo, bar")
|
||||
self.validate_identity("ANALYZE TABLE ctlg.db.tbl COMPUTE STATISTICS NOSCAN")
|
||||
self.validate_identity("ANALYZE TABLES COMPUTE STATISTICS NOSCAN")
|
||||
self.validate_identity("ANALYZE TABLES FROM db COMPUTE STATISTICS")
|
||||
self.validate_identity("ANALYZE TABLES IN db COMPUTE STATISTICS")
|
||||
self.validate_identity(
|
||||
"ANALYZE TABLE ctlg.db.tbl PARTITION(foo = 'foo', bar = 'bar') COMPUTE STATISTICS NOSCAN"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue