-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CALCITE-6168] RexExecutor can throw during compilation #3588
Conversation
Maybe I should refine the catch block to catch fewer exceptions. |
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
@@ -1418,6 +1418,14 @@ protected static Calendar getCalendarNotTooNear(int timeUnit) { | |||
} | |||
} | |||
|
|||
/** Test case for | |||
* <a href="https://issues.apache.org/jira/browse/CALCITE-6168">[CALCITE-6168] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this test belongs here, it's not a test case for a specific operator. I think there is a test class called RexExecutorTest
that might be better.
6e9a337
to
38f851b
Compare
Thank you @tanclary for the review, I have pushed one more commit which addresses your suggestion. |
Can someone please review this PR which fixes a bug? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ise = (IllegalStateException) x; | ||
break; | ||
} | ||
if (x.getCause() == x) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just to prevent SO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen this pattern used elsewhere in this function, so I have followed it. I am not sure whether a Throwable can have itself as a cause. It looks like the Java APIs make that possible, since you can create a Throwable and assign a cause to it later using initCause.
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
No description provided.