This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new f7f7b2b7386 [Enhancement](multi-catalog) Add more error msgs for wrong
data types in orc and parquet reader. (#36580)
f7f7b2b7386 is described below
commit f7f7b2b7386a4d630ad2f04ec0961e6bf01378a5
Author: Qi Chen <[email protected]>
AuthorDate: Thu Jun 20 18:10:25 2024 +0800
[Enhancement](multi-catalog) Add more error msgs for wrong data types in
orc and parquet reader. (#36580)
Backport #36417
---
be/src/vec/exec/format/orc/vorc_reader.h | 9 ++++++---
be/src/vec/exec/format/parquet/vparquet_column_reader.cpp | 12 +++++++++---
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/be/src/vec/exec/format/orc/vorc_reader.h
b/be/src/vec/exec/format/orc/vorc_reader.h
index c790d78123f..77eec261b01 100644
--- a/be/src/vec/exec/format/orc/vorc_reader.h
+++ b/be/src/vec/exec/format/orc/vorc_reader.h
@@ -313,7 +313,8 @@ private:
SCOPED_RAW_TIMER(&_statistics.decode_value_time);
OrcColumnType* data = dynamic_cast<OrcColumnType*>(cvb);
if (data == nullptr) {
- return Status::InternalError("Wrong data type for colum '{}'",
col_name);
+ return Status::InternalError("Wrong data type for column '{}',
expected {}", col_name,
+ cvb->toString());
}
auto* cvb_data = data->data.data();
auto& column_data =
static_cast<ColumnVector<CppType>&>(*data_column).get_data();
@@ -355,7 +356,8 @@ private:
orc::ColumnVectorBatch* cvb, size_t
num_values) {
OrcColumnType* data = dynamic_cast<OrcColumnType*>(cvb);
if (data == nullptr) {
- return Status::InternalError("Wrong data type for colum '{}'",
col_name);
+ return Status::InternalError("Wrong data type for column '{}',
expected {}", col_name,
+ cvb->toString());
}
if (_decimal_scale_params_index >= _decimal_scale_params.size()) {
DecimalScaleParams temp_scale_params;
@@ -443,7 +445,8 @@ private:
SCOPED_RAW_TIMER(&_statistics.decode_value_time);
auto* data = dynamic_cast<OrcColumnType*>(cvb);
if (data == nullptr) {
- return Status::InternalError("Wrong data type for colum '{}'",
col_name);
+ return Status::InternalError("Wrong data type for column '{}',
expected {}", col_name,
+ cvb->toString());
}
date_day_offset_dict& date_dict = date_day_offset_dict::get();
auto& column_data =
static_cast<ColumnVector<DorisColumnType>&>(*data_column).get_data();
diff --git a/be/src/vec/exec/format/parquet/vparquet_column_reader.cpp
b/be/src/vec/exec/format/parquet/vparquet_column_reader.cpp
index 85d03daebc5..4efa6c60e47 100644
--- a/be/src/vec/exec/format/parquet/vparquet_column_reader.cpp
+++ b/be/src/vec/exec/format/parquet/vparquet_column_reader.cpp
@@ -594,7 +594,9 @@ Status ArrayColumnReader::read_column_data(ColumnPtr&
doris_column, DataTypePtr&
data_column = doris_column->assume_mutable();
}
if (remove_nullable(type)->get_type_id() != TypeIndex::Array) {
- return Status::Corruption("Wrong data type for column '{}'",
_field_schema->name);
+ return Status::Corruption(
+ "Wrong data type for column '{}', expected Array type, actual
type id {}.",
+ _field_schema->name, remove_nullable(type)->get_type_id());
}
ColumnPtr& element_column =
static_cast<ColumnArray&>(*data_column).get_data_ptr();
@@ -643,7 +645,9 @@ Status MapColumnReader::read_column_data(ColumnPtr&
doris_column, DataTypePtr& t
data_column = doris_column->assume_mutable();
}
if (remove_nullable(type)->get_type_id() != TypeIndex::Map) {
- return Status::Corruption("Wrong data type for column '{}'",
_field_schema->name);
+ return Status::Corruption(
+ "Wrong data type for column '{}', expected Map type, actual
type id {}.",
+ _field_schema->name, remove_nullable(type)->get_type_id());
}
auto& map = static_cast<ColumnMap&>(*data_column);
@@ -710,7 +714,9 @@ Status StructColumnReader::read_column_data(ColumnPtr&
doris_column, DataTypePtr
data_column = doris_column->assume_mutable();
}
if (remove_nullable(type)->get_type_id() != TypeIndex::Struct) {
- return Status::Corruption("Wrong data type for column '{}'",
_field_schema->name);
+ return Status::Corruption(
+ "Wrong data type for column '{}', expected Struct type, actual
type id {}.",
+ _field_schema->name, remove_nullable(type)->get_type_id());
}
auto& doris_struct = static_cast<ColumnStruct&>(*data_column);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]