badalprasadsingh commented on code in PR #524:
URL: https://github.com/apache/iceberg-go/pull/524#discussion_r2292789400


##########
schema_conversions.go:
##########
@@ -30,33 +30,35 @@ func partitionTypeToAvroSchema(t *StructType) (avro.Schema, 
error) {
                var sc avro.Schema
                switch typ := f.Type.(type) {
                case Int32Type:
-                       sc = internal.IntSchema
+                       sc = internal.NullableSchema(internal.IntSchema)

Review Comment:
   Well, in a case where a partitioned column has `null` values, avro won't 
accept `*avro.null` for such a column. In that case, we have to `union` it with 
`null`. 
   
   This makes handling of `LogicalTypes` such as decimal or timestamp more 
difficult, as now we have to convert them into `fixed` type `(bytes)`. This 
makes the some of the integration tests fail, as they expect the partition 
value to be in its original form.
   
   If we remove `NullableSchema`, it won't be able to accept the `null` values. 
Please do provide me a solution to deal with it, or is it the right way to move 
on.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to