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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Can be reproduced through the following code - 
   ```
     public void testIsElementTypeInt96Element(){
       Configuration configuration = new Configuration();
       configuration.setBoolean(READ_INT96_AS_FIXED, true);
       MessageType parquetSchema = MessageTypeParser.parseMessageType( "message 
SchemaWithInt96 {\n"
           + "  optional group list (LIST) {\n"
           + "    repeated group list {\n"
           + "      optional int96 a_timestamp;\n"
           + "    }\n"
           + "  }\n"
           + "}");
       Schema avroSchema = new 
AvroSchemaConverter(configuration).convert(parquetSchema);
       Assert.assertFalse(AvroRecordConverter.isElementType(
           parquetSchema.getType("list").asGroupType().getType("list"),
           
AvroSchemaConverter.getNonNull(avroSchema.getFields().get(0).schema()).getElementType()
       ));
     }
   ```
   When trying to read a List<INT96>, it gives the following error-  
   `Exception in thread "main" java.lang.IllegalArgumentException: INT96 is 
deprecated. As interim enable READ_INT96_AS_FIXED flag to read as byte array.`
   
   The issue is because in the 
[AvroRecordConverter.java](https://github.com/apache/parquet-java/blob/master/parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java#L942)
 class, AvroSchemaConverter is instantiated without the `ParquetConfiguration`.
   `private static final AvroSchemaConverter CONVERTER = new 
AvroSchemaConverter(true); `
   
   ### 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