okumin commented on code in PR #6202:
URL: https://github.com/apache/hive/pull/6202#discussion_r2681084252
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java:
##########
@@ -1300,9 +1302,10 @@ private static void
runTopNKeyOptimization(OptimizeTezProcContext procCtx)
return;
}
+ String topNKeyRegexPattern = buildTopNKeyRegexPattern(procCtx);
Map<SemanticRule, SemanticNodeProcessor> opRules = new
LinkedHashMap<SemanticRule, SemanticNodeProcessor>();
opRules.put(
- new RuleRegExp("Top n key optimization",
ReduceSinkOperator.getOperatorName() + "%"),
+ new RuleRegExp("Top n key optimization", topNKeyRegexPattern),
Review Comment:
I slightly suppose this level of complicated bailout should happen in
[TopNKeyProcessor](https://github.com/apache/hive/blob/25e58308970f2855e8c017150096cae28c4a7f17/ql/src/java/org/apache/hadoop/hive/ql/optimizer/topnkey/TopNKeyProcessor.java#L70-L102).
Most likely, can we skip adding a TopNKeyOperator when the RSO is not a
PTFReduceSink and RSO's ancestors don't include RSO?
--
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]