JosephLenton commented on code in PR #2916:
URL: https://github.com/apache/iceberg-rust/pull/2916#discussion_r3747949275


##########
crates/integrations/datafusion/tests/integration_datafusion_test.rs:
##########
@@ -946,3 +947,98 @@ async fn test_insert_into_partitioned() -> Result<()> {
 
     Ok(())
 }
+
+#[tokio::test]
+async fn test_insert_into_partitioned_by_uuid() -> Result<()> {

Review Comment:
   This I have added on my local branch and will push up.



##########
crates/iceberg/src/spec/values/serde.rs:
##########
@@ -238,7 +239,11 @@ pub(crate) mod _serde {
                     PrimitiveLiteral::Double(v) => RawLiteralEnum::Double(v.0),
                     PrimitiveLiteral::String(v) => RawLiteralEnum::String(v),
                     PrimitiveLiteral::UInt128(v) => {

Review Comment:
   Avro 0.21 seems to have a bug in it's Schema reading code handling `{"type": 
"fixed", "size": 16, "logicalType": "uuid"}`, specifically the `logicalType: 
uuid` part. It reads the type as `Schema::UUID` and transforms that to 
`Schema::Bytes`, which is wrong and mismatches in other parts causing a panic.
   
   I'm pretty certain this is fixed in version 0.22, however that is not yet 
released. The release process is ongoing now.
   
   Options are:
    - to go with `{"type": "fixed", "size": 16}` for now, which passes the 
DataFusion integration tests and seems to work fine. This is affecting a 
project where I work so this might be something I will use there.
    - wait until Avro 0.22 and update.
    - add a patch to work around the schema reading right now.



-- 
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