-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for V3 text reader issues fixes (#589)
Tests: DRILL_4814_table_function.sql DRILL_5487_truncated_last_row.sql DRILL_6952_enable_v3_text_reader_default_value.sql DRILL_6952_implicit_columns.sql DRILL_7034_window function.sql Also: - Changed tests extension to .sql. - Aligned the code inside textReadGroup.json.
- Loading branch information
Showing
40 changed files
with
88 additions
and
29 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
6 changes: 6 additions & 0 deletions
6
framework/resources/Datasources/text_storage/v3_text_reader/region_malformed.csvh
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,6 @@ | ||
id,region,comment | ||
0,AFRICA,lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to | ||
|
||
2,ASIA,ges. thinly even pinto beans ca | ||
3,EUROPE, | ||
4,MIDDLE EAST |
5 changes: 5 additions & 0 deletions
5
.../resources/Datasources/text_storage/v3_text_reader/region_partitioned/nested/region_2.tbl
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,5 @@ | ||
0|AFRICA|lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to | ||
1|AMERICA|hs use ironic, even requests. s | ||
2|ASIA|ges. thinly even pinto beans ca | ||
3|EUROPE|ly final courts cajole furiously final excuse | ||
4|MIDDLE EAST|uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl |
5 changes: 5 additions & 0 deletions
5
framework/resources/Datasources/text_storage/v3_text_reader/region_partitioned/region_1.tbl
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,5 @@ | ||
0|AFRICA|lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to | ||
1|AMERICA|hs use ironic, even requests. s | ||
2|ASIA|ges. thinly even pinto beans ca | ||
3|EUROPE|ly final courts cajole furiously final excuse | ||
4|MIDDLE EAST|uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
framework/resources/Functional/text_storage/testcases/DRILL_4814_table_function.e_tsv
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,5 @@ | ||
0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to | ||
|
||
2 ASIA ges. thinly even pinto beans ca | ||
3 EUROPE | ||
4 MIDDLE EAST |
3 changes: 3 additions & 0 deletions
3
framework/resources/Functional/text_storage/testcases/DRILL_4814_table_function.sql
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 @@ | ||
set `exec.storage.enable_v3_text_reader` = false; | ||
select * from table(`/drill/testdata/text_storage/v3_text_reader/region_malformed.csvh`(type=>'text',lineDelimiter=>'\n',fieldDelimiter=>',',extractHeader=>true)); | ||
reset `exec.storage.enable_v3_text_reader`; |
5 changes: 5 additions & 0 deletions
5
framework/resources/Functional/text_storage/testcases/DRILL_5487_truncated_last_row.e_tsv
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,5 @@ | ||
0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to | ||
|
||
2 ASIA ges. thinly even pinto beans ca | ||
3 EUROPE | ||
4 MIDDLE EAST |
3 changes: 3 additions & 0 deletions
3
framework/resources/Functional/text_storage/testcases/DRILL_5487_truncated_last_row.sql
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 @@ | ||
set `exec.storage.enable_v3_text_reader` = true; | ||
select * from `/drill/testdata/text_storage/v3_text_reader/region_malformed.csvh`; | ||
reset `exec.storage.enable_v3_text_reader`; |
1 change: 1 addition & 0 deletions
1
...es/Functional/text_storage/testcases/DRILL_6952_enable_v3_text_reader_default_value.e_tsv
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 @@ | ||
exec.storage.enable_v3_text_reader false |
1 change: 1 addition & 0 deletions
1
...rces/Functional/text_storage/testcases/DRILL_6952_enable_v3_text_reader_default_value.sql
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 @@ | ||
set `exec.storage.enable_v3_text_reader`; |
10 changes: 10 additions & 0 deletions
10
framework/resources/Functional/text_storage/testcases/DRILL_6952_implicit_columns.e_tsv
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,10 @@ | ||
["0","AFRICA","lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to "] null null VARCHAR VARCHAR | ||
["1","AMERICA","hs use ironic, even requests. s"] null null VARCHAR VARCHAR | ||
["2","ASIA","ges. thinly even pinto beans ca"] null null VARCHAR VARCHAR | ||
["3","EUROPE","ly final courts cajole furiously final excuse"] null null VARCHAR VARCHAR | ||
["4","MIDDLE EAST","uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl"] null null VARCHAR VARCHAR | ||
["0","AFRICA","lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to "] nested null VARCHAR VARCHAR | ||
["1","AMERICA","hs use ironic, even requests. s"] nested null VARCHAR VARCHAR | ||
["2","ASIA","ges. thinly even pinto beans ca"] nested null VARCHAR VARCHAR | ||
["3","EUROPE","ly final courts cajole furiously final excuse"] nested null VARCHAR VARCHAR | ||
["4","MIDDLE EAST","uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl"] nested null VARCHAR VARCHAR |
3 changes: 3 additions & 0 deletions
3
framework/resources/Functional/text_storage/testcases/DRILL_6952_implicit_columns.sql
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 @@ | ||
set `exec.storage.min_width` = 2; | ||
select *, drillTypeOf(dir0), drillTypeOf(dir1) from dfs.`/drill/testdata/text_storage/v3_text_reader/region_partitioned`; | ||
reset `exec.storage.min_width`; |
5 changes: 5 additions & 0 deletions
5
framework/resources/Functional/text_storage/testcases/DRILL_7034_window function.e_tsv
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,5 @@ | ||
|
||
0 | ||
2 | ||
3 | ||
4 |
1 change: 1 addition & 0 deletions
1
framework/resources/Functional/text_storage/testcases/DRILL_7034_window function.sql
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 @@ | ||
select max(id) over(order by id) from `/drill/testdata/text_storage/v3_text_reader/region_malformed.csvh`; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 29 additions & 29 deletions
58
framework/resources/Functional/text_storage/testcases/textReadGroup.json
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
{ | ||
"testId": "textRead", | ||
"type": "group", | ||
"description": "Test text read queries", | ||
"categories": [ | ||
"functional" | ||
], | ||
"matrices": [ | ||
{ | ||
"query-file": ".*.q", | ||
"schema": "dfs", | ||
"output-format": "tsv", | ||
"expected-file": ".*.e_tsv", | ||
"verification-type": [ | ||
"in-memory" | ||
] | ||
} | ||
], | ||
"datasources": [ | ||
{ | ||
"mode": "cp", | ||
"src": "Datasources/text_storage", | ||
"dest": "text_storage" | ||
}, | ||
{ | ||
"mode": "gen", | ||
"src": "Datasources/text_storage/drill-4484.sh", | ||
"dest": "" | ||
} | ||
] | ||
"testId": "textRead", | ||
"type": "group", | ||
"description": "Test text read queries", | ||
"categories": [ | ||
"functional" | ||
], | ||
"matrices": [ | ||
{ | ||
"query-file": ".*.sql", | ||
"schema": "dfs", | ||
"output-format": "tsv", | ||
"expected-file": ".*.e_tsv", | ||
"verification-type": [ | ||
"in-memory" | ||
] | ||
} | ||
], | ||
"datasources": [ | ||
{ | ||
"mode": "cp", | ||
"src": "Datasources/text_storage", | ||
"dest": "text_storage" | ||
}, | ||
{ | ||
"mode": "gen", | ||
"src": "Datasources/text_storage/drill-4484.sh", | ||
"dest": "" | ||
} | ||
] | ||
} |