@@ -214,17 +214,17 @@ TEST(TransformFunctionTransformTest, IdentityTransform) {
214214 .source = Literal::Long (1234567890 ),
215215 .expected = Literal::Long (1234567890 )},
216216 {.source_type = iceberg::timestamp (),
217- .source = Literal::Timestamp (1622547800000 ),
218- .expected = Literal::Timestamp (1622547800000 )},
217+ .source = Literal::Timestamp (1622547800000000 ),
218+ .expected = Literal::Timestamp (1622547800000000 )},
219219 {.source_type = iceberg::timestamp_tz (),
220- .source = Literal::TimestampTz (1622547800000 ),
221- .expected = Literal::TimestampTz (1622547800000 )},
220+ .source = Literal::TimestampTz (1622547800000000 ),
221+ .expected = Literal::TimestampTz (1622547800000000 )},
222222 {.source_type = iceberg::float32 (),
223223 .source = Literal::Float (3.14 ),
224224 .expected = Literal::Float (3.14 )},
225225 {.source_type = iceberg::float64 (),
226- .source = Literal::Double (2.71828 ),
227- .expected = Literal::Double (2.71828 )},
226+ .source = Literal::Double (1.23e-5 ),
227+ .expected = Literal::Double (1.23e-5 )},
228228 {.source_type = iceberg::string (),
229229 .source = Literal::String (" Hello, World!" ),
230230 .expected = Literal::String (" Hello, World!" )},
@@ -268,10 +268,10 @@ TEST(TransformFunctionTransformTest, BucketTransform) {
268268 .source = Literal::Long (1234567890 ),
269269 .expected = Literal::Int (3 )},
270270 {.source_type = iceberg::timestamp (),
271- .source = Literal::Timestamp (1622547800000 ),
271+ .source = Literal::Timestamp (1622547800000000 ),
272272 .expected = Literal::Int (1 )},
273273 {.source_type = iceberg::timestamp_tz (),
274- .source = Literal::TimestampTz (1622547800000 ),
274+ .source = Literal::TimestampTz (1622547800000000 ),
275275 .expected = Literal::Int (1 )},
276276 {.source_type = iceberg::string (),
277277 .source = Literal::String (" test" ),
@@ -335,10 +335,10 @@ TEST(TransformFunctionTransformTest, YearTransform) {
335335
336336 const std::vector<Case> cases = {
337337 {.source_type = iceberg::timestamp (),
338- .source = Literal::Timestamp (1622547800000 ),
338+ .source = Literal::Timestamp (1622547800000000 ),
339339 .expected = Literal::Int (2021 )},
340340 {.source_type = iceberg::timestamp_tz (),
341- .source = Literal::TimestampTz (1622547800000 ),
341+ .source = Literal::TimestampTz (1622547800000000 ),
342342 .expected = Literal::Int (2021 )},
343343 {.source_type = iceberg::date (),
344344 .source = Literal::Date (30000 ),
@@ -368,10 +368,10 @@ TEST(TransformFunctionTransformTest, MonthTransform) {
368368
369369 const std::vector<Case> cases = {
370370 {.source_type = iceberg::timestamp (),
371- .source = Literal::Timestamp (1622547800000 ),
371+ .source = Literal::Timestamp (1622547800000000 ),
372372 .expected = Literal::Int (617 )},
373373 {.source_type = iceberg::timestamp_tz (),
374- .source = Literal::TimestampTz (1622547800000 ),
374+ .source = Literal::TimestampTz (1622547800000000 ),
375375 .expected = Literal::Int (617 )},
376376 {.source_type = iceberg::date (),
377377 .source = Literal::Date (30000 ),
@@ -401,10 +401,10 @@ TEST(TransformFunctionTransformTest, DayTransform) {
401401
402402 const std::vector<Case> cases = {
403403 {.source_type = iceberg::timestamp (),
404- .source = Literal::Timestamp (1622547800000 ),
404+ .source = Literal::Timestamp (1622547800000000 ),
405405 .expected = Literal::Date (18779 )},
406406 {.source_type = iceberg::timestamp_tz (),
407- .source = Literal::TimestampTz (1622547800000 ),
407+ .source = Literal::TimestampTz (1622547800000000 ),
408408 .expected = Literal::Date (18779 )},
409409 {.source_type = iceberg::date (),
410410 .source = Literal::Date (30000 ),
@@ -434,10 +434,10 @@ TEST(TransformFunctionTransformTest, HourTransform) {
434434
435435 const std::vector<Case> cases = {
436436 {.source_type = iceberg::timestamp (),
437- .source = Literal::Timestamp (1622547800000 ),
437+ .source = Literal::Timestamp (1622547800000000 ),
438438 .expected = Literal::Int (450707 )},
439439 {.source_type = iceberg::timestamp_tz (),
440- .source = Literal::TimestampTz (1622547800000 ),
440+ .source = Literal::TimestampTz (1622547800000000 ),
441441 .expected = Literal::Int (450707 )},
442442 };
443443
@@ -466,11 +466,12 @@ TEST(TransformFunctionTransformTest, VoidTransform) {
466466 {.source_type = iceberg::int32 (), .source = Literal::Int (42 )},
467467 {.source_type = iceberg::int32 (), .source = Literal::Date (30000 )},
468468 {.source_type = iceberg::int64 (), .source = Literal::Long (1234567890 )},
469- {.source_type = iceberg::timestamp (), .source = Literal::Timestamp (1622547800000 )},
469+ {.source_type = iceberg::timestamp (),
470+ .source = Literal::Timestamp (1622547800000000 )},
470471 {.source_type = iceberg::timestamp_tz (),
471- .source = Literal::TimestampTz (1622547800000 )},
472+ .source = Literal::TimestampTz (1622547800000000 )},
472473 {.source_type = iceberg::float32 (), .source = Literal::Float (3.14 )},
473- {.source_type = iceberg::float64 (), .source = Literal::Double (2.71828 )},
474+ {.source_type = iceberg::float64 (), .source = Literal::Double (1.23e-5 )},
474475 {.source_type = iceberg::string (), .source = Literal::String (" Hello, World!" )},
475476 {.source_type = iceberg::binary (), .source = Literal::Binary ({0x01 , 0x02 , 0x03 })},
476477 };
@@ -479,7 +480,7 @@ TEST(TransformFunctionTransformTest, VoidTransform) {
479480 auto transformPtr = transform->Bind (c.source_type );
480481 ASSERT_TRUE (transformPtr.has_value ()) << " Failed to bind void transform" ;
481482 auto result = transformPtr.value ()->Transform (c.source );
482- ASSERT_TRUE (result == std::nullopt )
483+ ASSERT_EQ ( std::nullopt , result )
483484 << " Expected void transform to return no result for source: "
484485 << c.source .ToString ();
485486 }
0 commit comments