wecharyu commented on code in PR #5063:
URL: https://github.com/apache/hive/pull/5063#discussion_r1532474771
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1050,17 +1073,26 @@ private List<Partition>
getPartitionsFromPartitionIds(String catName, String dbN
+ ".\"SD_ID\" " + " left outer join " + SERDES + " on " + SDS +
".\"SERDE_ID\" = "
+ SERDES + ".\"SERDE_ID\" " + "where \"PART_ID\" in (" + partIds
+ ") order by \"PART_NAME\" asc";
+ // Keep order by name, consistent with JDO.
+ ArrayList<Partition> orderedResult = new
ArrayList<Partition>(partIdList.size());
+ populatePartitionsByQuery(catName, dbName, tblName, isView, queryText,
null, projectionFields,
+ isAcidTable, args, orderedResult);
+ return orderedResult;
+ }
+
+ private void populatePartitionsByQuery(String catName, String dbName, String
tblName,
Review Comment:
Addressed. The initial thought was that the result list size can be
determined by partition names size, so I want to init the result list before
calling `populatePartitionsByQuery`, but actually the result size can be
fetched from the sqlResult.
--
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]