Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion be/src/exec/scan/file_scanner_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ bool is_text_format(TFileFormatType::type format_type) {
return format_type == TFileFormatType::FORMAT_TEXT;
}

bool is_json_format(TFileFormatType::type format_type) {
return format_type == TFileFormatType::FORMAT_JSON;
}

bool is_partition_slot(const TFileScanSlotInfo& slot_info, const std::string& column_name) {
if (column_name.starts_with(BeConsts::GLOBAL_ROWID_COL) ||
column_name == BeConsts::ICEBERG_ROWID_COL) {
Expand Down Expand Up @@ -213,7 +217,8 @@ bool FileScannerV2::is_supported(const TFileScanRangeParams& params, const TFile
return is_supported_table_format(range);
} else if (format_type == TFileFormatType::FORMAT_JNI) {
return is_supported_jni_table_format(range);
} else if (is_csv_format(format_type) || is_text_format(format_type)) {
} else if (is_csv_format(format_type) || is_text_format(format_type) ||
is_json_format(format_type)) {
return is_supported_table_format(range);
} else {
LOG(WARNING) << "Unsupported file format type " << format_type << " for file scanner v2";
Expand Down Expand Up @@ -597,6 +602,9 @@ Status FileScannerV2::_to_file_format(TFileFormatType::type format_type,
case TFileFormatType::FORMAT_TEXT:
*file_format = format::FileFormat::TEXT;
return Status::OK();
case TFileFormatType::FORMAT_JSON:
*file_format = format::FileFormat::JSON;
return Status::OK();
default:
return Status::NotSupported("FileScannerV2 does not support file format {}",
to_string(format_type));
Expand Down
1 change: 1 addition & 0 deletions be/src/format_v2/file_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ enum class FileFormat {
PARQUET,
ORC,
CSV,
JSON,
TEXT,
JNI,
};
Expand Down
Loading
Loading