[ https://issues.apache.org/jira/browse/HIVE-26832?focusedWorklogId=836608&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-836608 ]
ASF GitHub Bot logged work on HIVE-26832: ----------------------------------------- Author: ASF GitHub Bot Created on: 03/Jan/23 12:46 Start Date: 03/Jan/23 12:46 Worklog Time Spent: 10m Work Description: deniskuzZ commented on code in PR #3849: URL: https://github.com/apache/hive/pull/3849#discussion_r1060552941 ########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -683,6 +699,86 @@ public List<FieldSchema> sortColumns(org.apache.hadoop.hive.ql.metadata.Table hm s.transform().toString(), s.direction().name(), s.nullOrder().name()))).collect(Collectors.toList()); } + @Override + public List<String> getIcebergPartitions(Configuration config, + org.apache.hadoop.hive.ql.metadata.Table partitionMetadataTable) { + Path path = new Path(partitionMetadataTable.getParameters().get("metadata_location")); + List<String> parts = new ArrayList<String>(); + JobConf job = getJobConfForPartitionTable(config, path, partitionMetadataTable); + + try { + Class<? extends InputFormat> formatter = partitionMetadataTable.getInputFormatClass(); + InputFormat inputFormat = FetchOperator.getInputFormatFromCache(formatter, job); + InputSplit[] splits = inputFormat.getSplits(job, 1); + try (RecordReader<WritableComparable, Writable> reader = inputFormat.getRecordReader(splits[0], job, + Reporter.NULL)) { + parts = getParts(job, reader, partitionMetadataTable); + } + return parts; + } catch (Exception e) { + LOG.warn("Warn:", e); Review Comment: why do we need extra "Warn" ? Issue Time Tracking ------------------- Worklog Id: (was: 836608) Time Spent: 2h 40m (was: 2.5h) > Implement SHOW PARTITIONS for Iceberg > ------------------------------------- > > Key: HIVE-26832 > URL: https://issues.apache.org/jira/browse/HIVE-26832 > Project: Hive > Issue Type: New Feature > Reporter: Simhadri Govindappa > Assignee: Simhadri Govindappa > Priority: Major > Labels: pull-request-available > Time Spent: 2h 40m > Remaining Estimate: 0h > > Show partition command for iceberg tables should reflect the partition info > from theĀ iceberg.partition metadata table based on the default-spec-id . -- This message was sent by Atlassian Jira (v8.20.10#820010)