Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
xiedeyantu committed Mar 18, 2024
1 parent 8aee7d6 commit 7fda9f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,20 @@ suite("test_multi_partition_key", "p0") {
)

// partition columns are int & datetime
test {
sql """
CREATE TABLE err_1 (
k1 TINYINT NOT NULL,
k5 DATETIME NOT NULL,
v1 DATE REPLACE NOT NULL)
PARTITION BY RANGE(k1,k5) (
PARTITION partition_a VALUES LESS THAN ("-127","2010-01-01"),
PARTITION partition_e VALUES LESS THAN ("4","2010-01-01"),
PARTITION partition_f VALUES LESS THAN MAXVALUE )
DISTRIBUTED BY HASH(k1) BUCKETS 53
PROPERTIES("replication_allocation" = "tag.location.default: 1")
"""
exception "Invalid datetime value: 2010-01-01"
}

sql """
CREATE TABLE err_1 (
k1 TINYINT NOT NULL,
k5 DATETIME NOT NULL,
v1 DATE REPLACE NOT NULL)
PARTITION BY RANGE(k1,k5) (
PARTITION partition_a VALUES LESS THAN ("-127","2010-01-01"),
PARTITION partition_e VALUES LESS THAN ("4","2010-01-01"),
PARTITION partition_f VALUES LESS THAN MAXVALUE )
DISTRIBUTED BY HASH(k1) BUCKETS 53
PROPERTIES("replication_allocation" = "tag.location.default: 1")
"""

testPartitionTbl(
"test_multi_partition_key_2",
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ suite("test_partition_table_err_msg", "p0") {
PARTITION partition_d VALUES LESS THAN ("10000-01-01 00:00:00") )
DISTRIBUTED BY HASH(k1) BUCKETS 13
"""
exception "date literal [10000-01-01 00:00:00] is invalid"
exception "date/datetime literal [10000-01-01 00:00:00] is invalid"
}
test {
sql """
Expand Down

0 comments on commit 7fda9f6

Please sign in to comment.