clintropolis commented on a change in pull request #8566: Upgrade Calcite to
1.21
URL: https://github.com/apache/incubator-druid/pull/8566#discussion_r332785717
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java
##########
@@ -116,13 +127,26 @@ private PlannerResult planWithDruidConvention(
final RelRoot root
) throws RelConversionException
{
- final DruidRel<?> druidRel = (DruidRel<?>) planner.transform(
- Rules.DRUID_CONVENTION_RULES,
- planner.getEmptyTraitSet()
- .replace(DruidConvention.instance())
- .plus(root.collation),
- root.rel
- );
+ final RelNode wrappedRootRel =
possiblyWrapRootWithOuterLimitFromContext(root);
+
+ final DruidRel<?> druidRel;
+ if (wrappedRootRel == null) {
Review comment:
could `possiblyWrapRootWithOuterLimitFromContext` just return `root.rel`
instead of `null` to collapse these near identical planner transform blocks?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]