zeroshade commented on code in PR #915:
URL: https://github.com/apache/iceberg-go/pull/915#discussion_r3275537967


##########
schema_conversions_test.go:
##########
@@ -196,3 +197,73 @@ func TestPartitionTypeToAvroSchemaDuplicateNamedTypes(t 
*testing.T) {
                })
        }
 }
+
+// TestDayTransformPartitionAvroDateEncoding verifies that a day(ts) partition
+// field is encoded with the Avro "date" logical type, not as a plain integer.
+// This is required for interoperability with Trino, Spark, and other Iceberg
+// engines that reject manifests where day-partition columns lack the date 
type.
+//
+// The fix lives in PartitionSpec.PartitionType: it overrides DayTransform's
+// ResultType (Int32) to DateType so the existing DateType branch in
+// partitionTypeToAvroSchema emits DateNode automatically.

Review Comment:
   @artbcf can you ensure that we can read both int and date, but only write 
date?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to