Skip to content

Commit

Permalink
fix test, add error case
Browse files Browse the repository at this point in the history
  • Loading branch information
irenjj committed May 13, 2024
1 parent 5f1cac2 commit 3f7198d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CREATE TABLE with_limit_rows_segment(host string, cpu double, memory double, ts

Affected Rows: 0

Copy with_limit_rows FROM '/tmp/demo/export/parquet_files/' LIMIT 2;
Copy with_limit_rows_segment FROM '/tmp/demo/export/parquet_files/' LIMIT 2;

Affected Rows: 2

Expand All @@ -122,9 +122,13 @@ select count(*) from with_limit_rows_segment;
+----------+
| COUNT(*) |
+----------+
| 0 |
| 2 |
+----------+

Copy with_limit_rows_segment FROM '/tmp/demo/export/parquet_files/' LIMIT -1;

Error: 2000(InvalidSyntax), Unexpected token while parsing SQL statement: Copy with_limit_rows_segment FROM '/tmp/demo/export/parquet_files/' LIMIT -1;, expected: 'maximum rows', found: 1: sql parser error: Expected literal int, found: - at Line: 1, Column 75

drop table demo;

Affected Rows: 0
Expand Down
4 changes: 3 additions & 1 deletion tests/cases/standalone/common/copy/copy_from_fs_parquet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ select count(*) from with_limit_rows;

CREATE TABLE with_limit_rows_segment(host string, cpu double, memory double, ts timestamp time index);

Copy with_limit_rows FROM '/tmp/demo/export/parquet_files/' LIMIT 2;
Copy with_limit_rows_segment FROM '/tmp/demo/export/parquet_files/' LIMIT 2;

select count(*) from with_limit_rows_segment;

Copy with_limit_rows_segment FROM '/tmp/demo/export/parquet_files/' LIMIT -1;

drop table demo;

drop table demo_2;
Expand Down

0 comments on commit 3f7198d

Please sign in to comment.