Skip to content

Commit

Permalink
add user case
Browse files Browse the repository at this point in the history
  • Loading branch information
TangSiyang2001 committed Aug 24, 2023
1 parent 60db4e2 commit 04d87cb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@
-- !select_sql --
2

-- !select --
2

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1,2010-11-30 23:59:59.281000
2,2011-11-30 23:59:59.281000
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,35 @@ suite("test_current_timestamp") {
"""
exception "errCode = 2, detailMessage = Internal Error, maybe syntax error or this is a bug: column's default value current_timestamp precision must be between 0 and 6"
}

// user case
def tableName6 = "test_current_timestamp_4"
sql """ DROP TABLE IF EXISTS ${tableName6} """
sql """
CREATE TABLE IF NOT EXISTS ${tableName6}
(
`id` int,
`date_time` datetime(3),
`data_entry_time` datetime(3) NULL DEFAULT CURRENT_TIMESTAMP(3)
) DUPLICATE KEY(`id`)
DISTRIBUTED BY HASH(id)
PROPERTIES
(
"replication_num" = "1"
);
"""

streamLoad {
table "${tableName6}"
set 'columns', 'id,date_time'
set 'format', 'csv'
set 'column_separator', ','

file "test_current_timestamp_dft.csv"

time 10000
}

sql "sync"
qt_select """ select count(*) from ${tableName6} """
}

0 comments on commit 04d87cb

Please sign in to comment.