-
Notifications
You must be signed in to change notification settings - Fork 850
Open
Description
Summary
register_tsv() in PR #19444 calls infer_schema(..., file_format => 'TSV') to detect column names before creating the view. However, infer_schema only supports Parquet, CSV, and NDJSON formats.
In src/query/service/src/table_functions/infer_schema/infer_schema_table.rs, the read_data match is:
match info.file_format_params {
FileFormatParams::Csv(_) | FileFormatParams::NdJson(_) => { /* ok */ }
FileFormatParams::Parquet(_) => { /* ok */ }
_ => {
return Err(ErrorCode::BadArguments(
"infer_schema is currently limited to format Parquet, CSV and NDJSON",
));
}
}TSV hits the _ branch and returns an error, so register_tsv() fails at registration time.
Suggested Fix
Add FileFormatParams::Tsv(_) to the CSV/NDJSON match arm. TSV is essentially CSV with a tab delimiter, so it should be able to reuse the same code path.
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels