Skip to content

Commit

Permalink
fix case.
Browse files Browse the repository at this point in the history
  • Loading branch information
hubgeter committed Jan 30, 2025
1 parent ab18b64 commit 99ccfa2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions be/src/vec/exec/format/column_type_convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ std::unique_ptr<ColumnTypeConverter> ColumnTypeConverter::get_converter(
PrimitiveType src_primitive_type = src_type.type;
PrimitiveType dst_primitive_type =
remove_nullable(dst_type)->get_type_as_type_descriptor().type;
if (is_string_type(src_primitive_type) && is_string_type(dst_primitive_type)) {
return std::make_unique<ConsistentConverter>();
}

if (_is_decimal_type(src_primitive_type) && _is_decimal_type(dst_primitive_type)) {
return _decimal_converter(src_type, dst_type);
}
Expand Down
1 change: 0 additions & 1 deletion be/src/vec/exec/format/orc/vorc_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ std::tuple<bool, orc::Literal> convert_to_orc_literal(const orc::Type* type,
}
return std::make_tuple(false, orc::Literal(false));
}
return std::make_tuple(true, orc::Literal(*((int64_t*)value)));
case orc::TypeKind::FLOAT: {
if constexpr (primitive_type == TYPE_FLOAT) {
return std::make_tuple(true, orc::Literal(double(*((float*)value))));
Expand Down
6 changes: 3 additions & 3 deletions be/test/vec/exec/parquet/parquet_thrift_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ static doris::TupleDescriptor* create_tuple_desc(

for (int i = 0; i < column_descs.size(); ++i) {
TSlotDescriptor t_slot_desc;
if (column_descs[i].type == TYPE_DECIMALV2) {
t_slot_desc.__set_slotType(TypeDescriptor::create_decimalv2_type(27, 9).to_thrift());
if (column_descs[i].type == TYPE_DECIMAL128I) {
t_slot_desc.__set_slotType(TypeDescriptor::create_decimalv3_type(27, 9).to_thrift());
} else {
TypeDescriptor descriptor(column_descs[i].type);
if (column_descs[i].precision >= 0 && column_descs[i].scale >= 0) {
Expand Down Expand Up @@ -356,7 +356,7 @@ static void create_block(std::unique_ptr<vectorized::Block>& block) {
{"binary_col", TYPE_STRING, sizeof(StringRef), true},
// 64-bit-length, see doris::get_slot_size in primitive_type.cpp
{"timestamp_col", TYPE_DATETIMEV2, sizeof(int128_t), true},
{"decimal_col", TYPE_DECIMALV2, sizeof(DecimalV2Value), true},
{"decimal_col", TYPE_DECIMAL128I, sizeof(Decimal128V3), true},
{"char_col", TYPE_CHAR, sizeof(StringRef), true},
{"varchar_col", TYPE_VARCHAR, sizeof(StringRef), true},
{"date_col", TYPE_DATEV2, sizeof(uint32_t), true},
Expand Down

0 comments on commit 99ccfa2

Please sign in to comment.