deniskuzZ commented on code in PR #6358:
URL: https://github.com/apache/hive/pull/6358#discussion_r3130491451
##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -178,11 +180,18 @@ protected void doCommit(TableMetadata base, TableMetadata
metadata) {
LOG.debug("Committing new table: {}", fullName);
}
+ // Preserve Hive bucketing (CLUSTERED BY) if present in the existing
table
+ StorageDescriptor sd = tbl.getSd();
+ List<String> bucketCols = sd != null ? sd.getBucketCols() : null;
Review Comment:
maybe
````
List<String> bucketCols = null;
int numBuckets = -1;
if (sd != null) {
bucketCols = sd.getBucketCols();
numBuckets = sd.getNumBuckets();
}
````
--
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]