-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-39355: [Java] Improve JdbcConsumer exceptions #39356
Conversation
|
...adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/consumer/CompositeJdbcConsumer.java
Outdated
Show resolved
Hide resolved
Thanks to @aiguofer for this enhancement. Would it be possible to add a unit test to cover these new exception improvements? |
@aiguofer agreeing with @davisusanibar here. |
...adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/consumer/CompositeJdbcConsumer.java
Show resolved
Hide resolved
@davisusanibar @vibhatha It would certainly be great to have tests for consumer! unfortunately there's not much prior art regarding this. I'm not very familiar with the test suite in general and this would likely require mocking a ResultSet along with the corresponding ResultSetMetaData in order to properly test this, which seems like a lot of work. |
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.
For testing, we do use hsqldb in the suite to integration test against an actual database (instead of mocking everything). That said mocking may be easier here overall
It would be good to add a Possibly we should extend SQLException instead? |
+1 |
should we include it in this PR itself or should we create follow up? |
Sorry all, I'm just getting back from break. The exceptions are not always a
Currently, the |
Ok, thanks. Then I think just documenting it in |
@lidavidm done! |
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit a71c941. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### Rationale for this change This helps debug Arrow conversion errors from JDBC by exposing the JdbcFieldInfo for the related column and the ArrowType for the corresponding vector. ### What changes are included in this PR? A new JdbcConsumerException which is thrown by the CompositeJdbcConsumer while consuming data for a specific vector. ### Are these changes tested? N/A ### Are there any user-facing changes? Users can now catch `JdbcConsumerException`s and extract the related ArrowType and JdbcFieldInfo from it for debugging. * Closes: apache#39355 Authored-by: Diego Fernandez <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change This helps debug Arrow conversion errors from JDBC by exposing the JdbcFieldInfo for the related column and the ArrowType for the corresponding vector. ### What changes are included in this PR? A new JdbcConsumerException which is thrown by the CompositeJdbcConsumer while consuming data for a specific vector. ### Are these changes tested? N/A ### Are there any user-facing changes? Users can now catch `JdbcConsumerException`s and extract the related ArrowType and JdbcFieldInfo from it for debugging. * Closes: apache#39355 Authored-by: Diego Fernandez <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change This helps debug Arrow conversion errors from JDBC by exposing the JdbcFieldInfo for the related column and the ArrowType for the corresponding vector. ### What changes are included in this PR? A new JdbcConsumerException which is thrown by the CompositeJdbcConsumer while consuming data for a specific vector. ### Are these changes tested? N/A ### Are there any user-facing changes? Users can now catch `JdbcConsumerException`s and extract the related ArrowType and JdbcFieldInfo from it for debugging. * Closes: apache#39355 Authored-by: Diego Fernandez <[email protected]> Signed-off-by: David Li <[email protected]>
Rationale for this change
This helps debug Arrow conversion errors from JDBC by exposing the JdbcFieldInfo for the related column and the ArrowType for the corresponding vector.
What changes are included in this PR?
A new JdbcConsumerException which is thrown by the CompositeJdbcConsumer while consuming data for a specific vector.
Are these changes tested?
N/A
Are there any user-facing changes?
Users can now catch
JdbcConsumerException
s and extract the related ArrowType and JdbcFieldInfo from it for debugging.