armitage420 commented on code in PR #5539:
URL: https://github.com/apache/hive/pull/5539#discussion_r1899762392


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/exchange/AlterTableExchangePartitionAnalyzer.java:
##########
@@ -77,9 +85,24 @@ protected void analyzeCommand(TableName tableName, 
Map<String, String> partition
     if (AcidUtils.isTransactionalTable(sourceTable) || 
AcidUtils.isTransactionalTable(destTable)) {
       throw new 
SemanticException(ErrorMsg.EXCHANGE_PARTITION_NOT_ALLOWED_WITH_TRANSACTIONAL_TABLES.getMsg());
     }
+    List<String> sourceProjectFilters = 
MetaStoreUtils.getPvals(sourceTable.getPartCols(), partitionSpecs);
 
     // check if source partition exists
-    PartitionUtils.getPartitions(db, sourceTable, partitionSpecs, true);
+    GetPartitionsFilterSpec getSourcePartitionsFilterSpec = new 
GetPartitionsFilterSpec();
+    getSourcePartitionsFilterSpec.setFilters(sourceProjectFilters);
+    getSourcePartitionsFilterSpec.setFilterMode(PartitionFilterMode.BY_VALUES);
+
+    GetProjectionsSpec getProjectionsSpec = new 
GetPartitionProjectionsSpecBuilder()
+        .addProjectFieldList(Arrays.asList("values","lastAccessTime")).build();

Review Comment:
   @wecharyu This piece of code does not require "lastAccessTime", although it 
does require "values" in the process when _convertFromPartSpec_ method is 
called upon by HS2 in the very process to extract our partitions list.



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

Reply via email to