@@ -103,29 +103,28 @@ class ManifestReaderV1Test : public ManifestReaderTestBase {
103103 " 00000-2-d5ae78b7-4449-45ec-adb7-c0e9c0bdb714-0-00004.parquet" };
104104 std::vector<int64_t > partitions = {447696 , 473976 , 465192 , 447672 };
105105
106- // TODO(Li Feiyang): The Decimal type and its serialization logic are not yet fully
107- // implemented to support variable-length encoding as required by the Iceberg
108- // specification. Using Literal::Binary as a temporary substitute to represent the raw
109- // bytes for the decimal values.
106+ // Note: The precision and scale for decimal literals are chosen arbitrarily here,
107+ // since the lower and upper bounds for decimal values are stored as unscaled int128_t
108+ // values in manifest files.
110109 std::vector<std::map<int32_t , std::vector<uint8_t >>> bounds = {
111110 {{1 , Literal::Long (1234 ).Serialize ().value ()},
112111 {2 , Literal::Long (5678 ).Serialize ().value ()},
113- {3 , Literal::Binary ({0x12 , 0xe2 }).Serialize ().value ()},
114-
112+ {3 , Literal::Decimal (4834 , 10 , 2 ).Serialize ().value ()},
115113 {4 , Literal::Timestamp (1611706223000000LL ).Serialize ().value ()}},
114+
116115 {{1 , Literal::Long (1234 ).Serialize ().value ()},
117116 {2 , Literal::Long (5678 ).Serialize ().value ()},
118- {3 , Literal::Binary ({0x12 , 0xe3 }).Serialize ().value ()},
119-
117+ {3 , Literal::Decimal (4835 , 10 , 2 ).Serialize ().value ()},
120118 {4 , Literal::Timestamp (1706314223000000LL ).Serialize ().value ()}},
119+
121120 {{1 , Literal::Long (123 ).Serialize ().value ()},
122121 {2 , Literal::Long (456 ).Serialize ().value ()},
123- {3 , Literal::Binary ({0x0e , 0x22 }).Serialize ().value ()},
124-
122+ {3 , Literal::Decimal (3618 , 10 , 2 ).Serialize ().value ()},
125123 {4 , Literal::Timestamp (1674691823000000LL ).Serialize ().value ()}},
124+
126125 {{1 , Literal::Long (123 ).Serialize ().value ()},
127126 {2 , Literal::Long (456 ).Serialize ().value ()},
128- {3 , Literal::Binary ({ 0x0e , 0x21 } ).Serialize ().value ()},
127+ {3 , Literal::Decimal ( 3617 , 10 , 2 ).Serialize ().value ()},
129128 {4 , Literal::Timestamp (1611619823000000LL ).Serialize ().value ()}},
130129 };
131130
0 commit comments