-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query): NDJSON copy into allow cast bool and number to string (#1โฆ
- Loading branch information
Showing
3 changed files
with
36 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"name":"data1","tags":{"env":"test1","length":"ok"}} | ||
{"name":"data2","tags":{"env":"test2","length":true}} | ||
{"name":"data3","tags":{"env":"test3","length":10}} |
17 changes: 17 additions & 0 deletions
17
tests/sqllogictests/suites/stage/formats/ndjson/ndjson_cast.test
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,17 @@ | ||
statement ok | ||
drop table if exists cast_ndjson | ||
|
||
statement ok | ||
CREATE TABLE cast_ndjson (name String, tags Map(String, String)) | ||
|
||
query | ||
copy into cast_ndjson from @data/ndjson/cast_sample.ndjson file_format = (type = NDJSON) ON_ERROR=continue | ||
---- | ||
ndjson/cast_sample.ndjson 3 0 NULL NULL | ||
|
||
query | ||
select * from cast_ndjson | ||
---- | ||
data1 {'env':'test1','length':'ok'} | ||
data2 {'env':'test2','length':'true'} | ||
data3 {'env':'test3','length':'10'} |