deniskuzZ commented on code in PR #5648: URL: https://github.com/apache/hive/pull/5648#discussion_r2003633753
########## ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java: ########## @@ -141,14 +141,29 @@ private boolean constructColumnStatsFromPackedRows(Table tbl, List<ColumnStatist if (!statsObjs.isEmpty()) { if (!isTblLevel) { - List<FieldSchema> partColSchema = tbl.getPartCols(); + List<FieldSchema> partColSchema = new ArrayList<>(); List<String> partVals = new ArrayList<>(); - // Iterate over partition columns to figure out partition name - for (int i = pos; i < pos + partColSchema.size(); i++) { - Object partVal = ((PrimitiveObjectInspector) fields.get(i).getFieldObjectInspector()) + + if (tbl.hasNonNativePartitionSupport()) { + ObjectInspector inspector = fields.get(pos).getFieldObjectInspector(); + if (inspector.getCategory() == ObjectInspector.Category.STRUCT) { Review Comment: it is always STRUCT for iceberg, we compute stats per partition spec, see `TransformSpec#toNamedStruct however, it might have diff logic for other SH with nonNativePartitionSupport -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org