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