kasakrisz commented on code in PR #5505:
URL: https://github.com/apache/hive/pull/5505#discussion_r1925445293
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/opconventer/HiveSortExchangeVisitor.java:
##########
@@ -50,25 +55,45 @@ OpAttr visit(HiveSortExchange exchangeRel) throws
SemanticException {
}
RelDistribution distribution = exchangeRel.getDistribution();
- if (distribution.getType() != Type.HASH_DISTRIBUTED) {
- throw new SemanticException("Only hash distribution supported for
LogicalExchange");
+ ArrayList<ExprNodeDesc> partitionKeyList;
+ if (distribution.getType() == Type.HASH_DISTRIBUTED) {
+ partitionKeyList = new
ArrayList<>(exchangeRel.getDistribution().getKeys().size());
+ for (int index = 0; index <
exchangeRel.getDistribution().getKeys().size(); index++) {
Review Comment:
I changed to stream.map.collect because we actually convert the key indices
to ExprNodeDesc.
--
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]