divjotarora commented on code in PR #3876:
URL: https://github.com/apache/parquet-java/pull/3876#discussion_r4538935273
##########
parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java:
##########
@@ -2017,13 +2031,20 @@ private static ColumnPath getPath(ColumnMetaData
metaData) {
MessageType fromParquetSchema(List<SchemaElement> schema, List<ColumnOrder>
columnOrders) {
Iterator<SchemaElement> iterator = schema.iterator();
SchemaElement root = iterator.next();
+ if (root.isSetLogicalType() && root.logicalType.isSetFINITE_VECTOR()) {
+ throw new ParquetDecodingException("Invalid FINITE_VECTOR metadata for "
+ root.name);
+ }
Types.MessageTypeBuilder builder = Types.buildMessage();
if (root.isSetField_id()) {
builder.id(root.field_id);
}
Iterator<ColumnOrder> columnOrderIterator = columnOrders == null ? null :
columnOrders.iterator();
- buildChildren(builder, iterator, root.getNum_children(),
columnOrderIterator);
- return builder.named(root.name);
+ try {
+ buildChildren(builder, iterator, root.getNum_children(),
columnOrderIterator);
+ return builder.named(root.name);
+ } catch (InvalidSchemaException e) {
+ throw new ParquetDecodingException("Invalid FINITE_VECTOR schema in file
metadata", e);
Review Comment:
Kept original msg only
--
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]