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


##########
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:
   validated with a q test:
   ```
   set hive.support.concurrency=true;
   set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
   
   create table acid_compact_part (key string, val string)
     partitioned by (dt string)
     clustered by (val) into 2 buckets
     stored as ORC
     tblproperties ('transactional'='true');
   
   alter table acid_compact_part compact 'major' where dt='2023';
   ```
   
   which ran into:
   `FAILED: Execution Error, return code 10440 from 
org.apache.hadoop.hive.ql.ddl.DDLTask. Compaction with filter is not allowed on 
non-Iceberg table default.acid_compact_part`



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