okumin commented on code in PR #6094:
URL: https://github.com/apache/hive/pull/6094#discussion_r2371153301
##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/MetastoreUtil.java:
##########
@@ -157,6 +159,8 @@ private static StorageDescriptor
getHiveStorageDescriptor(org.apache.iceberg.Tab
result.setSerdeInfo(getHiveSerdeInfo());
result.setLocation(table.location());
result.setParameters(Maps.newHashMap());
+ result.setSkewedInfo(new SkewedInfo(new SkewedInfo(Collections.emptyList(),
+ Collections.emptyList(), Collections.emptyMap())));
Review Comment:
Taking a glance, we don't need to wrap SkewedInfo with SkewedInfo
P.S. I verified the SkewedInfo is likely necessary. NPE would happen without
this change.
```
java.lang.NullPointerException: Cannot invoke
"org.apache.hadoop.hive.metastore.api.SkewedInfo.getSkewedColNames()" because
the return value of
"org.apache.hadoop.hive.metastore.api.StorageDescriptor.getSkewedInfo()" is null
at
org.apache.hadoop.hive.ql.metadata.Partition.getSkewedColNames(Partition.java:581)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFileSinkPlan(SemanticAnalyzer.java:7769)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:11676)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:11539)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:12474)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:12340)
```
--
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]