Skip to content

Commit e83598e

Browse files
committed
fix ci
1 parent a9f13bb commit e83598e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/iceberg/expression/literal.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ Result<Literal> LiteralCaster::CastFromInt(
105105
return Literal::Date(int_val);
106106
case TypeId::kDecimal: {
107107
auto decimal_type = std::static_pointer_cast<DecimalType>(target_type);
108-
return Literal::Decimal(int_val, decimal_type->precision(), decimal_type->scale());
108+
return Literal::Decimal(static_cast<int128_t>(int_val), decimal_type->precision(),
109+
decimal_type->scale());
109110
}
110111
default:
111112
return NotSupported("Cast from Int to {} is not implemented",
@@ -149,7 +150,8 @@ Result<Literal> LiteralCaster::CastFromLong(
149150
return Literal::TimestampTz(long_val);
150151
case TypeId::kDecimal: {
151152
auto decimal_type = std::static_pointer_cast<DecimalType>(target_type);
152-
return Literal::Decimal(long_val, decimal_type->precision(), decimal_type->scale());
153+
return Literal::Decimal(static_cast<int128_t>(long_val), decimal_type->precision(),
154+
decimal_type->scale());
153155
}
154156
default:
155157
return NotSupported("Cast from Long to {} is not supported",

0 commit comments

Comments
 (0)