You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/10/07 15:01:52 UTC

[GitHub] [druid] gianm commented on a diff in pull request #13173: Fix row schema of nested queries to get proper row type during planning validation

gianm commented on code in PR #13173:
URL: https://github.com/apache/druid/pull/13173#discussion_r990186903


##########
sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidRules.java:
##########
@@ -223,7 +225,14 @@ public void onMatch(final RelOptRuleCall call)
                              .withSort(sort)
         );
         if (outerQueryRel.isValidDruidQuery()) {
-          call.transformTo(outerQueryRel);
+          try {
+            call.transformTo(outerQueryRel);
+          }

Review Comment:
   You're right to be suspicious. This change definitely isn't right. This try/catch is papering over a bug in some implementation of DruidRel. Any DruidRel that returns `true` from `isValidDruidQuery()` should never throw a `CannotBuildQueryException` from either of its `toDruidQueryForExplaining` or `toDruidQuery` methods. Instead of doing the try/catch here, the buggy DruidRel implementation should be fixed.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org