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 try/catch is papering over some other
bug. We should never be doing a `call.transformTo` that isn't going to work:
our rules and our calls to `isValidDruidQuery()` are meant to be validating
what is OK before we attempt to do the transformation. So, instead of doing the
try/catch here, it's better to fix the bug that caused us to get to this line
in the first place.
--
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]