-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Support column mismatch fill property in files() #54362
base: main
Are you sure you want to change the base?
Conversation
ca3679d
to
0de41ef
Compare
c71b3a4
to
ab74319
Compare
Signed-off-by: wyb <[email protected]>
ab74319
to
447e43a
Compare
[BE Incremental Coverage Report]✅ pass : 32 / 39 (82.05%) file detail
|
be/src/exec/csv_scanner.cpp
Outdated
@@ -459,17 +479,23 @@ Status CSVScanner::_parse_csv(Chunk* chunk) { | |||
_curr_reader->split_record(record, &fields); | |||
|
|||
if (fields.size() != _num_fields_in_csv && !_scan_range.params.flexible_column_mapping) { |
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.
How about reading 3 columns from a 4-column csv file?
How about reading 3 columns from a jagged csv file with both 2-column rows, 4-column rows?
Signed-off-by: wyb <[email protected]>
Signed-off-by: wyb <[email protected]>
Signed-off-by: wyb <[email protected]>
Signed-off-by: wyb <[email protected]>
Signed-off-by: wyb <[email protected]>
Signed-off-by: wyb <[email protected]>
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]❌ fail : 39 / 61 (63.93%) file detail
|
Why I'm doing:
What I'm doing:
select * from files("path" = "xxx", "format" = "csv", "fill_mismatch_column_with" = "null");
add
fill_mismatch_column_with
property in files() to process column mismatch, default value isnone
.query files()
none
: return errornull
: fill nullinsert from files()
none
: filter rows, return error or not, based on max filter rationull
: fill nullbehavior change:
after this pr, query
csv
files()return error
when column mismatch, but previous behavior isfill null
.Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: