Skip to content

Commit

Permalink
fix: test cases
Browse files Browse the repository at this point in the history
1. ttl_type=absolute
2. ttl_type=absandlat
  • Loading branch information
jingchen2222 committed May 18, 2021
1 parent 9ad190a commit 724fd35
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions zetasql/parser/testdata/create_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -3259,7 +3259,7 @@ CREATE TABLE t

# create table with index definition
# multiple keys, ttl_type = latest, ttl = 0
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, latest=absolute, ttl=0));
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, ttl_type=latest, ttl=0));
--
CreateTableStatement [0-97]
PathExpression [13-14]
Expand Down Expand Up @@ -3294,9 +3294,9 @@ CreateTableStatement [0-97]
PathExpression [69-71]
Identifier(c3) [69-71]
OptionsEntry [73-88]
Identifier(latest) [73-79]
PathExpression [80-88]
Identifier(absolute) [80-88]
Identifier(ttl_type) [73-81]
PathExpression [82-88]
Identifier(latest) [82-88]
OptionsEntry [90-95]
Identifier(ttl) [90-93]
IntLiteral(0) [94-95]
Expand All @@ -3306,18 +3306,18 @@ CREATE TABLE t
c1 int32,
c2 string,
c3 int64,
INDEX(key = (c1, c2), ts = c3, latest = absolute, ttl = 0)
INDEX(key = (c1, c2), ts = c3, ttl_type = latest, ttl = 0)
)
==

# create table with index definition
# multiple keys, ttl_type = absandlat, ttl = (10d,100)
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, latest=absandlat, ttl=(10d, 100)));
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, ttl_type=absandlat, ttl=(10d, 100)));
--
CreateTableStatement [0-107]
CreateTableStatement [0-109]
PathExpression [13-14]
Identifier(t) [13-14]
TableElementList [15-107]
TableElementList [15-109]
ColumnDefinition [16-24]
Identifier(c1) [16-18]
SimpleColumnSchema [19-24]
Expand All @@ -3333,8 +3333,8 @@ CreateTableStatement [0-107]
SimpleColumnSchema [40-45]
PathExpression [40-45]
Identifier(int64) [40-45]
IndexDefinition [46-106]
OptionsList [52-106]
IndexDefinition [46-108]
OptionsList [52-108]
OptionsEntry [53-64]
Identifier(key) [53-56]
StructConstructorWithParens [57-64]
Expand All @@ -3346,33 +3346,33 @@ CreateTableStatement [0-107]
Identifier(ts) [66-68]
PathExpression [69-71]
Identifier(c3) [69-71]
OptionsEntry [73-89]
Identifier(latest) [73-79]
PathExpression [80-89]
Identifier(absandlat) [80-89]
OptionsEntry [91-105]
Identifier(ttl) [91-94]
StructConstructorWithParens [95-105]
IntervalLiteral(10d) [96-99]
IntLiteral(100) [101-104]
OptionsEntry [73-91]
Identifier(ttl_type) [73-81]
PathExpression [82-91]
Identifier(absandlat) [82-91]
OptionsEntry [93-107]
Identifier(ttl) [93-96]
StructConstructorWithParens [97-107]
IntervalLiteral(10d) [98-101]
IntLiteral(100) [103-106]
--
CREATE TABLE t
(
c1 int32,
c2 string,
c3 int64,
INDEX(key = (c1, c2), ts = c3, latest = absandlat, ttl = (10d, 100))
INDEX(key = (c1, c2), ts = c3, ttl_type = absandlat, ttl = (10d, 100))
)
==

# create table with index definition
# multiple keys, ttl_type = absorlat, ttl = (10d,100)
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, latest=absorlat, ttl=(10d, 100)));
create table t (c1 int32, c2 string, c3 int64, index(key=(c1,c2), ts=c3, ttl_type=absorlat, ttl=(10d, 100)));
--
CreateTableStatement [0-106]
CreateTableStatement [0-108]
PathExpression [13-14]
Identifier(t) [13-14]
TableElementList [15-106]
TableElementList [15-108]
ColumnDefinition [16-24]
Identifier(c1) [16-18]
SimpleColumnSchema [19-24]
Expand All @@ -3388,8 +3388,8 @@ CreateTableStatement [0-106]
SimpleColumnSchema [40-45]
PathExpression [40-45]
Identifier(int64) [40-45]
IndexDefinition [46-105]
OptionsList [52-105]
IndexDefinition [46-107]
OptionsList [52-107]
OptionsEntry [53-64]
Identifier(key) [53-56]
StructConstructorWithParens [57-64]
Expand All @@ -3401,22 +3401,22 @@ CreateTableStatement [0-106]
Identifier(ts) [66-68]
PathExpression [69-71]
Identifier(c3) [69-71]
OptionsEntry [73-88]
Identifier(latest) [73-79]
PathExpression [80-88]
Identifier(absorlat) [80-88]
OptionsEntry [90-104]
Identifier(ttl) [90-93]
StructConstructorWithParens [94-104]
IntervalLiteral(10d) [95-98]
IntLiteral(100) [100-103]
OptionsEntry [73-90]
Identifier(ttl_type) [73-81]
PathExpression [82-90]
Identifier(absorlat) [82-90]
OptionsEntry [92-106]
Identifier(ttl) [92-95]
StructConstructorWithParens [96-106]
IntervalLiteral(10d) [97-100]
IntLiteral(100) [102-105]
--
CREATE TABLE t
(
c1 int32,
c2 string,
c3 int64,
INDEX(key = (c1, c2), ts = c3, latest = absorlat, ttl = (10d, 100))
INDEX(key = (c1, c2), ts = c3, ttl_type = absorlat, ttl = (10d, 100))
)
==

Expand Down

0 comments on commit 724fd35

Please sign in to comment.