Skip to content

Commit 30a00d3

Browse files
authored
Merge branch 'main' into codex/fix-paimon-package-config
2 parents c529f30 + 666c2c7 commit 30a00d3

12 files changed

Lines changed: 21 additions & 20 deletions

src/paimon/common/data/binary_row_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Result<BinaryRowWriter::FieldSetterFunc> BinaryRowWriter::CreateFieldSetter(
140140
};
141141
return field_setter;
142142
}
143-
case arrow::Type::type::DECIMAL: {
143+
case arrow::Type::type::DECIMAL128: {
144144
auto* decimal_type =
145145
arrow::internal::checked_cast<arrow::Decimal128Type*>(field_type.get());
146146
assert(decimal_type);

src/paimon/common/data/internal_row.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Result<InternalRow::FieldGetterFunc> InternalRow::CreateFieldGetter(
110110
};
111111
break;
112112
}
113-
case arrow::Type::type::DECIMAL: {
113+
case arrow::Type::type::DECIMAL128: {
114114
auto* decimal_type =
115115
arrow::internal::checked_cast<arrow::Decimal128Type*>(field_type.get());
116116
assert(decimal_type);

src/paimon/common/data/serializer/binary_serializer_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Status BinarySerializerUtils::WriteBinaryData(const std::shared_ptr<arrow::DataT
103103
if (array_writer) {
104104
array_writer->SetNullAt(pos, type_id);
105105
return Status::OK();
106-
} else if (type_id != arrow::Type::type::DECIMAL &&
106+
} else if (type_id != arrow::Type::type::DECIMAL128 &&
107107
type_id != arrow::Type::type::TIMESTAMP) {
108108
// if row writer, exclude decimal and timestamp when set null
109109
writer->SetNullAt(pos);
@@ -167,7 +167,7 @@ Status BinarySerializerUtils::WriteBinaryData(const std::shared_ptr<arrow::DataT
167167
}
168168
break;
169169
}
170-
case arrow::Type::type::DECIMAL: {
170+
case arrow::Type::type::DECIMAL128: {
171171
auto* decimal_type = arrow::internal::checked_cast<arrow::Decimal128Type*>(type.get());
172172
assert(decimal_type);
173173
auto precision = decimal_type->precision();

src/paimon/common/data/serializer/row_compacted_serializer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Result<int32_t> RowCompactedSerializer::CompareField(const FieldInfo& field_info
9494
PAIMON_ASSIGN_OR_RAISE(Timestamp val2, reader2->ReadTimestamp(field_info.precision));
9595
return val1 == val2 ? 0 : (val1 < val2 ? -1 : 1);
9696
}
97-
case arrow::Type::type::DECIMAL: {
97+
case arrow::Type::type::DECIMAL128: {
9898
PAIMON_ASSIGN_OR_RAISE(Decimal val1,
9999
reader1->ReadDecimal(field_info.precision, field_info.scale));
100100
PAIMON_ASSIGN_OR_RAISE(Decimal val2,
@@ -124,7 +124,7 @@ Result<MemorySlice::SliceComparator> RowCompactedSerializer::CreateSliceComparat
124124
arrow::internal::checked_pointer_cast<arrow::TimestampType>(field_type);
125125
assert(timestamp_type);
126126
field_infos[i].precision = DateTimeUtils::GetPrecisionFromType(timestamp_type);
127-
} else if (field_type->id() == arrow::Type::type::DECIMAL) {
127+
} else if (field_type->id() == arrow::Type::type::DECIMAL128) {
128128
auto decimal_type =
129129
arrow::internal::checked_pointer_cast<arrow::Decimal128Type>(field_type);
130130
assert(decimal_type);
@@ -275,7 +275,7 @@ Result<RowCompactedSerializer::FieldReader> RowCompactedSerializer::CreateFieldR
275275
};
276276
break;
277277
}
278-
case arrow::Type::type::DECIMAL: {
278+
case arrow::Type::type::DECIMAL128: {
279279
auto* decimal_type =
280280
arrow::internal::checked_cast<arrow::Decimal128Type*>(field_type.get());
281281
assert(decimal_type);
@@ -410,7 +410,7 @@ Result<RowCompactedSerializer::FieldWriter> RowCompactedSerializer::CreateFieldW
410410
};
411411
break;
412412
}
413-
case arrow::Type::type::DECIMAL: {
413+
case arrow::Type::type::DECIMAL128: {
414414
auto* decimal_type =
415415
arrow::internal::checked_cast<arrow::Decimal128Type*>(field_type.get());
416416
assert(decimal_type);

src/paimon/common/utils/fields_comparator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Result<FieldsComparator::FieldComparatorFunc> FieldsComparator::CompareField(
163163
return lvalue == rvalue ? 0 : (lvalue < rvalue ? -1 : 1);
164164
});
165165
}
166-
case arrow::Type::type::DECIMAL: {
166+
case arrow::Type::type::DECIMAL128: {
167167
auto* decimal_type =
168168
arrow::internal::checked_cast<arrow::Decimal128Type*>(input_type.get());
169169
assert(decimal_type);

src/paimon/core/bucket/bucket_id_calculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static Result<WriteFunction> WriteBucketRow(int32_t col_id,
206206
};
207207
return writer_func;
208208
}
209-
case arrow::Type::type::DECIMAL: {
209+
case arrow::Type::type::DECIMAL128: {
210210
const auto* decimal_type =
211211
arrow::internal::checked_cast<const arrow::Decimal128Type*>(field->type().get());
212212
assert(decimal_type);

src/paimon/core/io/row_to_arrow_array_converter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Status RowToArrowArrayConverter<T, R>::Reserve(arrow::ArrayBuilder* array_builde
129129
case arrow::Type::type::FLOAT:
130130
case arrow::Type::type::DOUBLE:
131131
case arrow::Type::type::TIMESTAMP:
132-
case arrow::Type::type::DECIMAL:
132+
case arrow::Type::type::DECIMAL128:
133133
break;
134134
case arrow::Type::type::STRING: {
135135
// reserve string data buffer
@@ -201,7 +201,7 @@ Status RowToArrowArrayConverter<T, R>::Accumulate(const arrow::Array* array, int
201201
case arrow::Type::type::FLOAT:
202202
case arrow::Type::type::DOUBLE:
203203
case arrow::Type::type::TIMESTAMP:
204-
case arrow::Type::type::DECIMAL:
204+
case arrow::Type::type::DECIMAL128:
205205
break;
206206
case arrow::Type::type::STRING: {
207207
auto string_array = arrow::internal::checked_cast<const arrow::StringArray*>(array);
@@ -403,7 +403,7 @@ RowToArrowArrayConverter<T, R>::AppendField(bool use_view, arrow::ArrayBuilder*
403403
DateTimeUtils::TimestampToInteger(timestamp, time_type));
404404
});
405405
}
406-
case arrow::Type::type::DECIMAL: {
406+
case arrow::Type::type::DECIMAL128: {
407407
PAIMON_ASSIGN_OR_RAISE(auto* field_builder,
408408
CastToTypedBuilder<arrow::Decimal128Builder>(array_builder));
409409
auto decimal_type =

src/paimon/core/mergetree/compact/aggregate/field_max_agg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class FieldMaxAgg : public FieldAggregator {
6161
case arrow::Type::type::FLOAT:
6262
case arrow::Type::type::DOUBLE:
6363
case arrow::Type::type::TIMESTAMP:
64-
case arrow::Type::type::DECIMAL:
64+
case arrow::Type::type::DECIMAL128:
6565
case arrow::Type::type::STRING:
6666
case arrow::Type::type::BINARY:
6767
return FieldMaxFunc([](const VariantType& accumulator,

src/paimon/core/mergetree/compact/aggregate/field_min_agg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class FieldMinAgg : public FieldAggregator {
6161
case arrow::Type::type::FLOAT:
6262
case arrow::Type::type::DOUBLE:
6363
case arrow::Type::type::TIMESTAMP:
64-
case arrow::Type::type::DECIMAL:
64+
case arrow::Type::type::DECIMAL128:
6565
case arrow::Type::type::STRING:
6666
case arrow::Type::type::BINARY:
6767
return FieldMinFunc([](const VariantType& accumulator,

src/paimon/core/mergetree/compact/aggregate/field_sum_agg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Result<FieldSumAgg::FieldSumFunc> FieldSumAgg::CreateSumFunc(
7171
DataDefine::GetVariantValue<double>(input_field);
7272
return sum;
7373
});
74-
case arrow::Type::type::DECIMAL: {
74+
case arrow::Type::type::DECIMAL128: {
7575
return FieldSumFunc(
7676
[](const VariantType& accumulator, const VariantType& input_field) -> VariantType {
7777
auto v1 = DataDefine::GetVariantValue<Decimal>(accumulator);
@@ -120,7 +120,7 @@ Result<FieldSumAgg::FieldNegFunc> FieldSumAgg::CreateNegFunc(
120120
auto value = DataDefine::GetVariantValue<double>(input_field);
121121
return (-value);
122122
});
123-
case arrow::Type::type::DECIMAL: {
123+
case arrow::Type::type::DECIMAL128: {
124124
return FieldNegFunc([](const VariantType& input_field) -> VariantType {
125125
auto value = DataDefine::GetVariantValue<Decimal>(input_field);
126126
return Decimal(value.Precision(), value.Scale(), -value.Value());

0 commit comments

Comments
 (0)