kasakrisz commented on code in PR #3588:
URL: https://github.com/apache/hive/pull/3588#discussion_r977631693
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java:
##########
@@ -308,17 +390,26 @@ private void convertOrderLimitToASTNode(HiveSortLimit
hiveSortLimit) {
private void convertSortToASTNode(HiveSortExchange hiveSortExchange) {
List<RelFieldCollation> fieldCollations =
hiveSortExchange.getCollation().getFieldCollations();
- convertFieldCollationsToASTNode(hiveSortExchange, new
Schema(hiveSortExchange), fieldCollations,
+ convertFieldCollationsAndSetOrderAST(hiveSortExchange, new
Schema(hiveSortExchange), fieldCollations,
null, HiveParser.TOK_SORTBY, "TOK_SORTBY");
}
- private void convertFieldCollationsToASTNode(
+ private void convertFieldCollationsAndSetOrderAST(
RelNode node, Schema schema, List<RelFieldCollation>
fieldCollations, Map<Integer, RexNode> obRefToCallMap,
int astToken, String astText) {
+
if (fieldCollations.isEmpty()) {
return;
}
+ hiveAST.order = convertFieldCollationsToASTNode(
+ node.getCluster().getRexBuilder(), schema, fieldCollations,
obRefToCallMap, astToken, astText);
+ }
+
+ public static ASTNode convertFieldCollationsToASTNode(
Review Comment:
No, changed to `private`.
--
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]