ramitg254 commented on code in PR #6413:
URL: https://github.com/apache/hive/pull/6413#discussion_r3378522263


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/AlterTableUtils.java:
##########
@@ -75,7 +75,7 @@ public static boolean isSchemaEvolutionEnabled(Table table, 
Configuration conf)
   }
 
   public static boolean isFullPartitionSpec(Table table, Map<String, String> 
partitionSpec) {
-    for (FieldSchema partitionCol : table.getPartCols()) {
+    for (FieldSchema partitionCol : table.getPartitionKeys()) {

Review Comment:
   I changed it while hacking it for some test failures, reverted this usage in 
other places but this one got left, will make it back to getPartCols



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactAnalyzer.java:
##########
@@ -95,15 +95,15 @@ protected void analyzeCommand(TableName tableName, 
Map<String, String> partition
           break;
         case HiveParser.TOK_WHERE:
           RowResolver rwsch = new RowResolver();
-          Map<String, String> colTypes = new HashMap<>();
           Table table;
           try {
             table = getDb().getTable(tableName);
-            for (FieldSchema fs : table.getCols()) {
+            List<FieldSchema> colsToLookUp = 
table.hasNonNativePartitionSupport() ? table.getAllCols() :

Review Comment:
   yes, as it used to set filterExpr and for non-native tables they will 
eventually run into:
   ```
   if (desc.getFilterExpr() != null) {
         if (!DDLUtils.isIcebergTable(table)) {
           throw new 
HiveException(ErrorMsg.NONICEBERG_COMPACTION_WITH_FILTER_NOT_SUPPORTED, 
               table.getDbName(), table.getTableName());
         }
   ```
   so will be safer to use getAllCols() only here,done



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java:
##########
@@ -171,13 +169,7 @@ private void addPartitionData(DataOutputStream out, 
HiveConf conf, String column
       boolean isFormatted, boolean isOutputPadded) throws IOException {
     String partitionData = "";
     if (columnPath == null) {
-      List<FieldSchema> partitionColumns = null;
-      // TODO (HIVE-29413): Refactor to a generic getPartCols() implementation
-      if (table.isPartitioned()) {
-        partitionColumns = table.hasNonNativePartitionSupport() ?
-            table.getStorageHandler().getPartitionKeys(table) :
-            table.getPartCols();
-      }
+      List<FieldSchema> partitionColumns = table.isPartitioned() ? 
table.getPartCols() : null;

Review Comment:
   yes it can be droppd, done



-- 
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]

Reply via email to