@@ -321,27 +321,6 @@ TEST(LiteralTest, DecimalComparison) {
321321 EXPECT_EQ (decimal_neg <=> decimal1, std::partial_ordering::less);
322322}
323323
324- TEST (LiteralTest, DecimalCastTo) {
325- auto decimal_literal = Literal::Decimal (int128_t {12345 }, 10 , 2 );
326-
327- // Decimal to other types should not be supported (according to current implementation)
328- EXPECT_THAT (decimal_literal.CastTo (iceberg::int32 ()),
329- IsError (ErrorKind::kNotSupported ));
330- EXPECT_THAT (decimal_literal.CastTo (iceberg::int64 ()),
331- IsError (ErrorKind::kNotSupported ));
332- EXPECT_THAT (decimal_literal.CastTo (iceberg::float32 ()),
333- IsError (ErrorKind::kNotSupported ));
334- EXPECT_THAT (decimal_literal.CastTo (iceberg::float64 ()),
335- IsError (ErrorKind::kNotSupported ));
336- EXPECT_THAT (decimal_literal.CastTo (iceberg::string ()),
337- IsError (ErrorKind::kNotSupported ));
338-
339- // Cast to same Decimal type should succeed
340- auto same_type_result = decimal_literal.CastTo (iceberg::decimal (10 , 2 ));
341- ASSERT_THAT (same_type_result, IsOk ());
342- EXPECT_EQ (same_type_result->type ()->type_id (), TypeId::kDecimal );
343- }
344-
345324TEST (LiteralTest, DecimalMaxPrecisionAndScale) {
346325 // Test with maximum precision and scale values
347326 auto max_decimal = Literal::Decimal (int128_t {1 }, 38 , 38 );
0 commit comments