Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
gdliu3 committed Jul 24, 2024
1 parent 5eebb81 commit 0875698
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions regression-test/data/arrow_flight_sql_p0/test_select.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
-- !arrow_flight_sql --
777 4

-- !arrow_flight_sql_datetime --
111 plsql111 2024-07-19 12:00:00.123456 2024-07-19 12:00:00
111 plsql111 2024-07-20 12:00:00.123456 2024-07-20 12:00:00
111 plsql111 2024-07-21 12:00:00.123456 2024-07-21 12:00:00
111 plsql111 2024-07-20 12:00:00.123456 2024-07-20 12:00:00
111 plsql111 2024-07-21 12:00:00.123456 2024-07-21 12:00:00
16 changes: 15 additions & 1 deletion regression-test/suites/arrow_flight_sql_p0/test_select.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ suite("test_select", "arrow_flight_sql") {
sql """INSERT INTO ${tableName} VALUES(222, "plsql222")"""
sql """INSERT INTO ${tableName} VALUES(333, "plsql333")"""
sql """INSERT INTO ${tableName} VALUES(111, "plsql333")"""

qt_arrow_flight_sql "select sum(id) as a, count(1) as b from ${tableName}"

tableName = "test_select_datetime"
sql "DROP TABLE IF EXISTS ${tableName}"
sql """
create table ${tableName} (id int, name varchar(20), f_datetime_p datetime(6), f_datetime datetime) DUPLICATE key(`id`) distributed by hash (`id`) buckets 4
properties ("replication_num"="1");
"""
sql """INSERT INTO ${tableName} VALUES(111, "plsql111","2024-07-19 12:00:00.123456","2024-07-19 12:00:00")"""
sql """INSERT INTO ${tableName} VALUES(222, "plsql222","2024-07-20 12:00:00.123456","2024-07-20 12:00:00")"""
sql """INSERT INTO ${tableName} VALUES(333, "plsql333","2024-07-21 12:00:00.123456","2024-07-21 12:00:00")"""
sql """INSERT INTO ${tableName} VALUES(111, "plsql333","2024-07-22 12:00:00.123456","2024-07-22 12:00:00")"""

qt_arrow_flight_sql_datetime "select * from ${tableName}"

}

0 comments on commit 0875698

Please sign in to comment.