Skip to content

Commit 92e321c

Browse files
committed
add stateful test
1 parent 35d540b commit 92e321c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/suites/1_stateful/01_load_v2/01_0000_streaming_load.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
199 2020.0 769
1111
--ndjson
1212
198 2020.0 767
13+
--csv using file_format
14+
199 2020.0 769
1315
--parquet less
1416
199 2020.0 769
1517
--parquet mismatch schema

tests/suites/1_stateful/01_load_v2/01_0000_streaming_load.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ curl -H "insert_sql:insert into ontime_streaming_load format NdJson" -H "format_
7272
echo "select count(1), avg(Year), sum(DayOfWeek) from ontime_streaming_load;" | $MYSQL_CLIENT_CONNECT
7373
echo "truncate table ontime_streaming_load" | $MYSQL_CLIENT_CONNECT
7474

75+
# load csv using file_format syntax
76+
echo "--csv"
77+
curl -H "insert_sql:insert into ontime_streaming_load file_format = (type = 'CSV', skip_header = 1)" -F "upload=@/tmp/ontime_200.csv" -u root: -XPUT "http://localhost:${QUERY_HTTP_HANDLER_PORT}/v1/streaming_load" > /dev/null 2>&1
78+
echo "select count(1), avg(Year), sum(DayOfWeek) from ontime_streaming_load;" | $MYSQL_CLIENT_CONNECT
79+
echo "truncate table ontime_streaming_load" | $MYSQL_CLIENT_CONNECT
7580

7681
# load parquet with less schema
7782
echo 'CREATE TABLE ontime_less

0 commit comments

Comments
 (0)