zhangbutao commented on code in PR #4995:
URL: https://github.com/apache/hive/pull/4995#discussion_r1449643511


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdatePart.java:
##########
@@ -181,7 +182,7 @@ private void populateInsertUpdateMap(Map<PartitionInfo, 
ColumnStatistics> statsP
             e -> e.partitionId).collect(Collectors.toList()
     );
 
-    prefix.append("select \"PART_ID\", \"COLUMN_NAME\" from \"PART_COL_STATS\" 
WHERE ");
+    prefix.append("select \"PART_ID\", \"COLUMN_NAME\", \"ENGINE\" from 
\"PART_COL_STATS\" WHERE ");

Review Comment:
    Make sense.  if so, Shouldn't we add the `ENGINE `field in the `WHERE 
`sub-statement?
   Current direct SQL query:
   `select "PART_ID", "COLUMN_NAME" from "PART_COL_STATS" WHERE ("PART_ID" in 
(141))`
   
   Maybe can be changed to:
   `select "PART_ID", "COLUMN_NAME" from "PART_COL_STATS" WHERE ("PART_ID" in 
(141)) and ENGINE = hive`
   
   BTW, we also have another field `CAT_NAME` in `PART_COL_STATS` to 
differentiate column stas between multi catalog. Should we also consider it 
here?



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