-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: EMPTY as default for TSV and NDJSON. (#13321)
- Loading branch information
1 parent
fc80217
commit c22249d
Showing
4 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/sqllogictests/suites/stage/formats/ndjson/ndjson_default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
statement ok | ||
drop table if exists t | ||
|
||
statement ok | ||
create table t(b int, b1 int, b2 int default 1) | ||
|
||
query TIITI | ||
copy into t from @data/ndjson/json_sample.ndjson file_format = (type = NDJSON) | ||
---- | ||
ndjson/json_sample.ndjson 4 0 NULL NULL | ||
|
||
query | ||
select * from t order by b; | ||
---- | ||
1 NULL 1 | ||
2 NULL 1 | ||
3 NULL 1 | ||
4 NULL 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
statement ok | ||
drop table if exists it | ||
|
||
statement ok | ||
create table it(c1 int default 1, c2 int, c3 int null, c4 int not null, c5 int not null default 5) | ||
|
||
query TIITI | ||
copy into it from @data/csv/empty.csv file_format = (type = TSV, field_delimiter=',') | ||
---- | ||
csv/empty.csv 1 0 NULL NULL | ||
|
||
query | ||
select * from it; | ||
---- | ||
1 2 NULL 0 5 |
c22249d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
databend – ./
databend-git-main-databend.vercel.app
databend-databend.vercel.app
databend.org
databend.vercel.app
databend.rs