[FIX](serde) fix handle serde error #23565
This commit is contained in:
@ -52,12 +52,10 @@ public:
|
||||
const FormatOptions& options) const override;
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
Status read_column_from_pb(IColumn& column, const PValues& arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("read_column_from_pb with type " + column.get_name());
|
||||
}
|
||||
|
||||
void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, Arena* mem_pool,
|
||||
|
||||
@ -46,14 +46,14 @@ public:
|
||||
}
|
||||
Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_one_cell_from_text with type " +
|
||||
column.get_name());
|
||||
}
|
||||
Status deserialize_column_from_text_vector(IColumn& column, std::vector<Slice>& slices,
|
||||
int* num_deserialized,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_column_from_text_vector with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
@ -68,12 +68,12 @@ public:
|
||||
arrow::ArrayBuilder* array_builder, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_column_to_arrow with type " + column.get_name());
|
||||
}
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
|
||||
@ -219,7 +219,8 @@ void DataTypeDate64SerDe::read_column_from_arrow(IColumn& column, const arrow::A
|
||||
const auto type = std::static_pointer_cast<arrow::TimestampType>(arrow_array->type());
|
||||
divisor = time_unit_divisor(type->unit());
|
||||
if (divisor == 0L) {
|
||||
LOG(FATAL) << "Invalid Time Type:" << type->name();
|
||||
throw doris::Exception(doris::ErrorCode::INVALID_ARGUMENT,
|
||||
"Invalid Time Type: " + type->name());
|
||||
}
|
||||
for (size_t value_i = start; value_i < end; ++value_i) {
|
||||
VecDateTimeValue v;
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
|
||||
@ -149,7 +149,8 @@ void DataTypeDecimalSerDe<T>::write_column_to_arrow(const IColumn& column, const
|
||||
array_builder->type()->name());
|
||||
}
|
||||
} else {
|
||||
LOG(FATAL) << "Not support write " << column.get_name() << " to arrow";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_arrow with type " + column.get_name());
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +191,8 @@ void DataTypeDecimalSerDe<T>::read_column_from_arrow(IColumn& column,
|
||||
column_data.emplace_back(*reinterpret_cast<const T*>(concrete_array->Value(value_i)));
|
||||
}
|
||||
} else {
|
||||
LOG(FATAL) << "Not support read " << column.get_name() << " from arrow";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -172,7 +172,8 @@ void DataTypeDecimalSerDe<T>::write_one_cell_to_jsonb(const IColumn& column, Jso
|
||||
Decimal64::NativeType val = *reinterpret_cast<const Decimal64::NativeType*>(data_ref.data);
|
||||
result.writeInt64(val);
|
||||
} else {
|
||||
LOG(FATAL) << "unknown Column " << column.get_name() << " for writing to jsonb";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_one_cell_to_jsonb with type " + column.get_name());
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,7 +190,8 @@ void DataTypeDecimalSerDe<T>::read_one_cell_from_jsonb(IColumn& column,
|
||||
} else if constexpr (std::is_same_v<T, Decimal<Int64>>) {
|
||||
col.insert_value(static_cast<const JsonbInt64Val*>(arg)->val());
|
||||
} else {
|
||||
LOG(FATAL) << "unknown jsonb " << arg->typeName() << " for writing to column";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"read_one_cell_from_jsonb with type " + column.get_name());
|
||||
}
|
||||
}
|
||||
} // namespace vectorized
|
||||
|
||||
@ -39,68 +39,64 @@ public:
|
||||
void serialize_one_cell_to_text(const IColumn& column, int row_num, BufferWritable& bw,
|
||||
FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_one_cell_to_text with type " + column.get_name());
|
||||
}
|
||||
|
||||
void serialize_column_to_text(const IColumn& column, int start_idx, int end_idx,
|
||||
BufferWritable& bw, FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_column_to_text with type " + column.get_name());
|
||||
}
|
||||
Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_one_cell_from_text with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status deserialize_column_from_text_vector(IColumn& column, std::vector<Slice>& slices,
|
||||
int* num_deserialized,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_column_from_text_vector with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
Status read_column_from_pb(IColumn& column, const PValues& arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("read_column_from_pb with type " + column.get_name());
|
||||
};
|
||||
void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, Arena* mem_pool,
|
||||
int32_t col_id, int row_num) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_one_cell_to_jsonb with type " + column.get_name());
|
||||
}
|
||||
|
||||
void read_one_cell_from_jsonb(IColumn& column, const JsonbValue* arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_one_cell_from_jsonb with type " + column.get_name());
|
||||
}
|
||||
void write_column_to_arrow(const IColumn& column, const NullMap* null_map,
|
||||
arrow::ArrayBuilder* array_builder, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_column_to_arrow with type " + column.get_name());
|
||||
}
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
int row_idx, bool col_const) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_mysql with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<false>& row_buffer,
|
||||
int row_idx, bool col_const) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
};
|
||||
} // namespace vectorized
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
|
||||
@ -51,12 +51,10 @@ public:
|
||||
const FormatOptions& options) const override;
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
Status read_column_from_pb(IColumn& column, const PValues& arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("read_column_from_pb with type " + column.get_name());
|
||||
}
|
||||
void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, Arena* mem_pool,
|
||||
int32_t col_id, int row_num) const override;
|
||||
|
||||
@ -235,7 +235,8 @@ void DataTypeNumberSerDe<T>::read_one_cell_from_jsonb(IColumn& column,
|
||||
} else if constexpr (std::is_same_v<T, double>) {
|
||||
col.insert_value(static_cast<const JsonbDoubleVal*>(arg)->val());
|
||||
} else {
|
||||
LOG(FATAL) << "unknown jsonb type " << arg->typeName() << " for writing to column";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"read_one_cell_from_jsonb with type '{}'", arg->typeName());
|
||||
}
|
||||
}
|
||||
template <typename T>
|
||||
@ -271,7 +272,8 @@ void DataTypeNumberSerDe<T>::write_one_cell_to_jsonb(const IColumn& column,
|
||||
double val = *reinterpret_cast<const double*>(data_ref.data);
|
||||
result.writeDouble(val);
|
||||
} else {
|
||||
LOG(FATAL) << "unknown column type " << column.get_name() << " for writing to jsonb";
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_one_cell_to_jsonb with type " + column.get_name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,68 +39,64 @@ public:
|
||||
void serialize_one_cell_to_text(const IColumn& column, int row_num, BufferWritable& bw,
|
||||
FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_one_cell_to_text with type " + column.get_name());
|
||||
}
|
||||
|
||||
void serialize_column_to_text(const IColumn& column, int start_idx, int end_idx,
|
||||
BufferWritable& bw, FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_column_to_text with type " + column.get_name());
|
||||
}
|
||||
Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_one_cell_from_text with type " +
|
||||
column.get_name());
|
||||
}
|
||||
Status deserialize_column_from_text_vector(IColumn& column, std::vector<Slice>& slices,
|
||||
int* num_deserialized,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_column_from_text_vector with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
Status read_column_from_pb(IColumn& column, const PValues& arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("read_column_from_pb with type " + column.get_name());
|
||||
}
|
||||
void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, Arena* mem_pool,
|
||||
int32_t col_id, int row_num) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_one_cell_to_jsonb with type " + column.get_name());
|
||||
}
|
||||
|
||||
void read_one_cell_from_jsonb(IColumn& column, const JsonbValue* arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_one_cell_from_jsonb with type " + column.get_name());
|
||||
}
|
||||
|
||||
void write_column_to_arrow(const IColumn& column, const NullMap* null_map,
|
||||
arrow::ArrayBuilder* array_builder, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_column_to_arrow with type " + column.get_name());
|
||||
}
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
int row_idx, bool col_const) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_mysql with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<false>& row_buffer,
|
||||
int row_idx, bool col_const) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_mysql with type " + column.get_name());
|
||||
}
|
||||
};
|
||||
} // namespace vectorized
|
||||
|
||||
@ -43,25 +43,25 @@ public:
|
||||
void serialize_one_cell_to_text(const IColumn& column, int row_num, BufferWritable& bw,
|
||||
FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_one_cell_to_text with type " + column.get_name());
|
||||
}
|
||||
|
||||
void serialize_column_to_text(const IColumn& column, int start_idx, int end_idx,
|
||||
BufferWritable& bw, FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"serialize_column_to_text with type " + column.get_name());
|
||||
}
|
||||
Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_one_cell_from_text with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status deserialize_column_from_text_vector(IColumn& column, std::vector<Slice>& slices,
|
||||
int* num_deserialized,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_column_from_text_vector with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
@ -76,12 +76,12 @@ public:
|
||||
arrow::ArrayBuilder* array_builder, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"write_column_to_arrow with type " + column.get_name());
|
||||
}
|
||||
void read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, int start,
|
||||
int end, const cctz::time_zone& ctz) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
"read_column_from_arrow with type " + column.get_name());
|
||||
}
|
||||
|
||||
Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& row_buffer,
|
||||
|
||||
@ -53,25 +53,22 @@ public:
|
||||
|
||||
Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"deserialize_one_cell_from_text with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_one_cell_from_text with type " +
|
||||
column.get_name());
|
||||
}
|
||||
|
||||
Status deserialize_column_from_text_vector(IColumn& column, std::vector<Slice>& slices,
|
||||
int* num_deserialized,
|
||||
const FormatOptions& options) const override {
|
||||
throw doris::Exception(
|
||||
ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"deserialize_column_from_text_vector with type " + column.get_name());
|
||||
return Status::NotSupported("deserialize_column_from_text_vector with type " +
|
||||
column.get_name());
|
||||
}
|
||||
Status write_column_to_pb(const IColumn& column, PValues& result, int start,
|
||||
int end) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"write_column_to_pb with type " + column.get_name());
|
||||
return Status::NotSupported("write_column_to_pb with type " + column.get_name());
|
||||
}
|
||||
Status read_column_from_pb(IColumn& column, const PValues& arg) const override {
|
||||
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
|
||||
"read_column_from_pb with type " + column.get_name());
|
||||
return Status::NotSupported("read_column_from_pb with type " + column.get_name());
|
||||
}
|
||||
void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, Arena* mem_pool,
|
||||
int32_t col_id, int row_num) const override;
|
||||
|
||||
Reference in New Issue
Block a user