@@ -59,24 +59,34 @@ class ManifestReaderV1Test : public TempFileTestBase {
5959 " order_ts_hour=2021-01-26-00/"
6060 " 00000-2-d5ae78b7-4449-45ec-adb7-c0e9c0bdb714-0-00004.parquet" };
6161 std::vector<int64_t > partitions = {447696 , 473976 , 465192 , 447672 };
62+
63+ // TODO(Li Feiyang): The Decimal type and its serialization logic are not yet fully
64+ // implemented
65+ // to support variable-length encoding as required by the Iceberg specification.
66+ // Using Literal::Binary as a temporary substitute to represent the raw bytes
67+ // for the decimal values.
6268 std::vector<std::map<int32_t , std::vector<uint8_t >>> bounds = {
63- {{1 , {0xd2 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
64- {2 , {' .' , 0x16 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
65- {3 , {0x12 , 0xe2 }},
66- {4 , {0xc0 , ' y' , 0xe7 , 0x98 , 0xd6 , 0xb9 , 0x05 , 0x00 }}},
67- {{1 , {0xd2 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
68- {2 , {' .' , 0x16 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
69- {3 , {0x12 , 0xe3 }},
70- {4 , {0xc0 , 0x19 , ' #' , ' =' , 0xe2 , 0x0f , 0x06 , 0x00 }}},
71- {{1 , {' {' , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
72- {2 , {0xc8 , 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
73- {3 , {0x0e , ' "' }},
74- {4 , {0xc0 , 0xd9 , ' 7' , 0x93 , 0x1f , 0xf3 , 0x05 , 0x00 }}},
75- {{1 , {' {' , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
76- {2 , {0xc8 , 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }},
77- {3 , {0x0e , ' !' }},
78- {4 , {0xc0 , 0x19 , 0x10 , ' {' , 0xc2 , 0xb9 , 0x05 , 0x00 }}},
69+ {{1 , iceberg::Literal::Long (1234 ).Serialize ().value ()},
70+ {2 , iceberg::Literal::Long (5678 ).Serialize ().value ()},
71+ {3 , iceberg::Literal::Binary ({0x12 , 0xe2 }).Serialize ().value ()},
72+
73+ {4 , iceberg::Literal::Timestamp (1611706223000000LL ).Serialize ().value ()}},
74+ {{1 , iceberg::Literal::Long (1234 ).Serialize ().value ()},
75+ {2 , iceberg::Literal::Long (5678 ).Serialize ().value ()},
76+ {3 , iceberg::Literal::Binary ({0x12 , 0xe3 }).Serialize ().value ()},
77+
78+ {4 , iceberg::Literal::Timestamp (1706314223000000LL ).Serialize ().value ()}},
79+ {{1 , iceberg::Literal::Long (123 ).Serialize ().value ()},
80+ {2 , iceberg::Literal::Long (456 ).Serialize ().value ()},
81+ {3 , iceberg::Literal::Binary ({0x0e , 0x22 }).Serialize ().value ()},
82+
83+ {4 , iceberg::Literal::Timestamp (1674691823000000LL ).Serialize ().value ()}},
84+ {{1 , iceberg::Literal::Long (123 ).Serialize ().value ()},
85+ {2 , iceberg::Literal::Long (456 ).Serialize ().value ()},
86+ {3 , iceberg::Literal::Binary ({0x0e , 0x21 }).Serialize ().value ()},
87+ {4 , iceberg::Literal::Timestamp (1611619823000000LL ).Serialize ().value ()}},
7988 };
89+
8090 for (int i = 0 ; i < 4 ; ++i) {
8191 ManifestEntry entry;
8292 entry.status = ManifestStatus::kAdded ;
@@ -143,16 +153,16 @@ class ManifestReaderV2Test : public TempFileTestBase {
143153 std::vector<int64_t > record_counts = {4 };
144154
145155 std::vector<std::map<int32_t , std::vector<uint8_t >>> lower_bounds = {
146- {{1 , { 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } },
147- {2 , { ' r ' , ' e ' , ' c ' , ' o ' , ' r ' , ' d ' , ' _ ' , ' f ' , ' o ' , ' u ' , ' r ' } },
148- {3 , { ' d ' , ' a ' , ' t ' , ' a ' , ' _ ' , ' c ' , ' o ' , ' n ' , ' t ' , ' e ' , ' n ' , ' t ' , ' _ ' , ' 1 ' } },
149- {4 , { 0xcd , 0xcc , 0xcc , 0xcc , 0xcc , 0xdc , 0x5e , 0x40 } }}};
156+ {{1 , iceberg::Literal::Long ( 1 ). Serialize (). value () },
157+ {2 , iceberg::Literal::String ( " record_four " ). Serialize (). value () },
158+ {3 , iceberg::Literal::String ( " data_content_1 " ). Serialize (). value () },
159+ {4 , iceberg::Literal::Double ( 123.45 ). Serialize (). value () }}};
150160
151161 std::vector<std::map<int32_t , std::vector<uint8_t >>> upper_bounds = {
152- {{1 , { 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } },
153- {2 , { ' r ' , ' e ' , ' c ' , ' o ' , ' r ' , ' d ' , ' _ ' , ' t ' , ' w ' , ' o ' } },
154- {3 , { ' d ' , ' a ' , ' t ' , ' a ' , ' _ ' , ' c ' , ' o ' , ' n ' , ' t ' , ' e ' , ' n ' , ' t ' , ' _ ' , ' 4 ' } },
155- {4 , { 0x14 , 0xae , 0x47 , 0xe1 , 0x7a , 0x8c , 0x7c , 0x40 } }}};
162+ {{1 , iceberg::Literal::Long ( 4 ). Serialize (). value () },
163+ {2 , iceberg::Literal::String ( " record_two " ). Serialize (). value () },
164+ {3 , iceberg::Literal::String ( " data_content_4 " ). Serialize (). value () },
165+ {4 , iceberg::Literal::Double ( 456.78 ). Serialize (). value () }}};
156166
157167 manifest_entries.emplace_back (
158168 ManifestEntry{.status = ManifestStatus::kAdded ,
0 commit comments