ZiyaZa commented on code in PR #52922:
URL: https://github.com/apache/spark/pull/52922#discussion_r2500786259
##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/ParquetVectorUpdaterFactory.java:
##########
@@ -70,7 +71,13 @@ public class ParquetVectorUpdaterFactory {
}
public ParquetVectorUpdater getUpdater(ColumnDescriptor descriptor, DataType
sparkType) {
- PrimitiveType.PrimitiveTypeName typeName =
descriptor.getPrimitiveType().getPrimitiveTypeName();
+ PrimitiveType type = descriptor.getPrimitiveType();
+ PrimitiveType.PrimitiveTypeName typeName = type.getPrimitiveTypeName();
+ boolean isUnknownType = type.getLogicalTypeAnnotation() instanceof
UnknownLogicalTypeAnnotation;
+ if (isUnknownType && sparkType instanceof NullType) {
+ // Updater should never be used if all values are nulls, so we can
return null here.
+ return null;
Review Comment:
This fails, as `SparkException` is not a `RuntimeException` and adding
`throws SparkException` changes the method signature that we are overriding.
--
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]