You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "clairemcginty (via GitHub)" <gi...@apache.org> on 2025/01/06 14:31:08 UTC

[I] Built-in conversions for nested logical types fail on Avro <= 1.8 [parquet-java]

clairemcginty opened a new issue, #3114:
URL: https://github.com/apache/parquet-java/issues/3114

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   When an Avro record contains nested logical types but no top-level logical types, i.e. 
   
   ```json
   {
     "type": "record",
     "name": "NestedLogicalTypes",
     "fields": [
       {
         "name": "innerType",
         "type": {
           "type": "record",
           "name": "InnerType",
           "fields": [
             {
               "name": "ts",
               "type": {
                 "type": "long",
                 "logicalType": "timestamp-millis"
               }
             }
           ]
         }
       }
     ]
   }
   ```
   
   Writes fails to convert the logical types from in-memory representation to underlying primitive:
   
   ```
   Cause: java.lang.ClassCastException: class org.joda.time.DateTime cannot be cast to class java.lang.Number (org.joda.time.DateTime is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')
   at org.apache.parquet.avro.AvroWriteSupport.writeValueWithoutConversion(AvroWriteSupport.java:345)
   at org.apache.parquet.avro.AvroWriteSupport.writeValue(AvroWriteSupport.java:282)
   at org.apache.parquet.avro.AvroWriteSupport.writeRecordFields(AvroWriteSupport.java:202)
   at org.apache.parquet.avro.AvroWriteSupport.writeRecord(AvroWriteSupport.java:185)
   at org.apache.parquet.avro.AvroWriteSupport.writeValueWithoutConversion(AvroWriteSupport.java:371)
   at org.apache.parquet.avro.AvroWriteSupport.writeValue(AvroWriteSupport.java:285)
   at org.apache.parquet.avro.AvroWriteSupport.writeRecordFields(AvroWriteSupport.java:202)
   at org.apache.parquet.avro.AvroWriteSupport.write(AvroWriteSupport.java:178)
   at org.apache.parquet.hadoop.InternalParquetRecordWriter.write(InternalParquetRecordWriter.java:152)
   at org.apache.parquet.hadoop.ParquetWriter.write(ParquetWriter.java:428)
   ```
   
   ### Component(s)
   
   Avro


-- 
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-unsubscribe@parquet.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org


Re: [I] Built-in conversions for nested logical types fail on Avro <= 1.8 [parquet-java]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed issue #3114: Built-in conversions for nested logical types fail on Avro <= 1.8
URL: https://github.com/apache/parquet-java/issues/3114


-- 
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-unsubscribe@parquet.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org