-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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-4585]when run RelNode error,Confuse log info be thrown(xiong duan) #2402
Conversation
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.
+1
} catch (RuntimeException e) { | ||
assertThat(e.getMessage(), | ||
equalTo("java.sql.SQLException: Error while preparing statement [\n" | ||
+ "LogicalProject($f0=[ABS($1)])\n" |
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.
Hmm, the plan may be helpful but it is not a statement ?
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.
Statement in Calcite may be include three types: Sql. RelNode . Queryable. This method Called prepareStatement_. My be we listen to others opinion.
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.
Actually, I'm +1 for Danny, maybe change "statement" to "plan" is better. But the code before is also "Error while preparing statement"
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.
Ok. I will change this to plan. Thanks for all of your advice.
We don't generally use The commit message (and JIRA subject) is not clear. Can you improve it? I don't think it will be clear to future maintainers what is the purpose of the two test methods. Please add javadoc comments to those methods indicating what you are testing. |
Hi, @julianhyde I have try to modify this. Thanks for your advice. This really helped me a lot |
@NobiGo, I refactored a little in https://github.com/julianhyde/calcite/tree/4585-relRunner-exception, and also fixed related bug https://issues.apache.org/jira/browse/CALCITE-4591. Let me know if there are any objections. I will squash & merge shortly. |
@julianhyde CALCITE-4591 makes this issue more complete. I'm +1 for this |
Close apache#2402
If a query is executed via RelRunner.prepare(RelNode) and fails, the exception should report the RelNode plan. Currently it reports the SQL, and for this kind of query, there is no SQL. Close apache#2402
This prepareStatement method capture the exception,But Only the output of SQL exception is processed.When run RelNode
error, The print log is "Error while preparing statement [null]", There is no useful information in this log So need to add the procedure to handle extra Relnode exception.