-
Notifications
You must be signed in to change notification settings - Fork 426
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
Added support to read SQL Warnings after ResultSet is read completely #785
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #785 +/- ##
============================================
+ Coverage 48.16% 48.18% +0.02%
+ Complexity 2785 2782 -3
============================================
Files 116 116
Lines 27858 27862 +4
Branches 4639 4641 +2
============================================
+ Hits 13418 13426 +8
+ Misses 12230 12208 -22
- Partials 2210 2228 +18
Continue to review full report at Codecov.
|
// Clear out previous results | ||
clearLastResult(); | ||
// Clear out previous results only when clearFlag = true | ||
if (clearFlag) |
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.
add brackets even if there's only one line in the if statement
@@ -1368,7 +1368,7 @@ final void clearLastResult() { | |||
* |
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.
Modify javadoc now that clearFlag is a parameter
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.
Done
As of now JDBC driver does not capture any warnings after ResultSet is fully consumed and the TDS_MSG tokens are not consumed but are left unused in Stream.
Use Case:
Capturing warnings at the end of ResultSet is helpful for PolyBase External Data tables where rows could get rejected due to bad column values. This information is sent by SQL Server after ResultSet data.