ramitg254 commented on code in PR #6259:
URL: https://github.com/apache/hive/pull/6259#discussion_r2720715005
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/DummyPartition.java:
##########
@@ -80,8 +81,12 @@ public LinkedHashMap<String, String> getSpec() {
@Override
public List<String> getValues() {
+ Table table = this.getTable();
List<String> values = new ArrayList<String>();
- for (FieldSchema fs : this.getTable().getPartCols()) {
+ for (FieldSchema fs :
Review Comment:
updated this values retrieval to be done when constructor is defined
but for this
> his is mess, full of code duplication, why not pass Partition partition to
addPartitionData(out, conf, columnPath, table, isFormatted, isOutputPadded); -
doesn't make any sence
there is an issue passing partition to this function solve the redundant
code as partition can be null as well for the statement like `describe
formatted testice1000` which also use this method and which makes it a table
specific information and we won't be able to retrive below info for that table:
```
# Partition Information
# col_name data_type comment
b string Transform: truncate[2]
```
and this makes it table specific and correct way when table.getPartCols()
implementation ets updated which currently result in some issues and used which
can solve this code redundancy:
```
if (table.isPartitioned()) {
partitionColumns = table.hasNonNativePartitionSupport() ?
table.getStorageHandler().getPartitionKeys(table) :
table.getPartCols();
}
```
--
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]