From 0bafe881fc8cec97fbfc43be7b432aebbaa517c3 Mon Sep 17 00:00:00 2001 From: Kexiang Wang Date: Wed, 3 Jan 2024 18:38:44 -0500 Subject: [PATCH] add more test --- ci/scripts/e2e-source-test.sh | 3 +++ e2e_test/source/opendal/data/data1.csv | 6 +++++ e2e_test/source/opendal/data/data2.csv | 6 +++++ e2e_test/source/opendal/posix_fs.slt | 33 ++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 e2e_test/source/opendal/data/data1.csv create mode 100644 e2e_test/source/opendal/data/data2.csv create mode 100644 e2e_test/source/opendal/posix_fs.slt diff --git a/ci/scripts/e2e-source-test.sh b/ci/scripts/e2e-source-test.sh index c1624230abc7..64144d051ad5 100755 --- a/ci/scripts/e2e-source-test.sh +++ b/ci/scripts/e2e-source-test.sh @@ -56,6 +56,9 @@ echo "--- inline cdc test" export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456 sqllogictest -p 4566 -d dev './e2e_test/source/cdc_inline/**/*.slt' +echo "--- opendal source test" +sqllogictest -p 4566 -d dev './e2e_test/source/opendal/**/*.slt' + echo "--- mysql & postgres cdc validate test" sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.mysql.slt' sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.postgres.slt' diff --git a/e2e_test/source/opendal/data/data1.csv b/e2e_test/source/opendal/data/data1.csv new file mode 100644 index 000000000000..9279ffa24aa2 --- /dev/null +++ b/e2e_test/source/opendal/data/data1.csv @@ -0,0 +1,6 @@ +carat,cut,color,depth +0.25,Ideal,E,61.4 +0.22,Premium,I,62.0 +0.28,Good,J,63.1 +0.23,Very Good,H,57.5 +0.30,Fair,E,64.7 diff --git a/e2e_test/source/opendal/data/data2.csv b/e2e_test/source/opendal/data/data2.csv new file mode 100644 index 000000000000..b5e39f73f2d5 --- /dev/null +++ b/e2e_test/source/opendal/data/data2.csv @@ -0,0 +1,6 @@ +carat,cut,color,depth +1.25,Ideal,E,61.4 +1.22,Premium,I,62.0 +1.28,Good,J,63.1 +1.23,Very Good,H,57.5 +1.30,Fair,E,64.7 diff --git a/e2e_test/source/opendal/posix_fs.slt b/e2e_test/source/opendal/posix_fs.slt new file mode 100644 index 000000000000..e3bf4a271dd9 --- /dev/null +++ b/e2e_test/source/opendal/posix_fs.slt @@ -0,0 +1,33 @@ +statement ok +SET RW_IMPLICIT_FLUSH TO true; + +statement ok +CREATE TABLE diamonds ( + carat FLOAT, + cut TEXT, + color TEXT, + depth FLOAT, +) WITH ( + connector = 'posix_fs', + match_pattern = 'data*.csv', + posix_fs.root = 'e2e_test/source/opendal/data', +) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ','); + +sleep 10s + +query TTTT rowsort +select * from diamonds; +---- +0.22 Premium I 62 +0.23 Very Good H 57.5 +0.25 Ideal E 61.4 +0.28 Good J 63.1 +0.3 Fair E 64.7 +1.22 Premium I 62 +1.23 Very Good H 57.5 +1.25 Ideal E 61.4 +1.28 Good J 63.1 +1.3 Fair E 64.7 + +statement ok +DROP TABLE diamonds; \ No newline at end of file