Repository navigation
Perf: Check for null when getting DTV values (JDBC spec compliance - getBinaryStream /getAsciiStream will return null when the value is null) - #2600
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2600 +/- ##
============================================
- Coverage 51.35% 51.33% -0.03%
+ Complexity 3981 3970 -11
============================================
Files 147 147
Lines 33686 33688 +2
Branches 5627 5628 +1
============================================
- Hits 17300 17294 -6
+ Misses 13956 13953 -3
- Partials 2430 2441 +11 ☔ View full report in Codecov by Sentry. |
David Engel (David-Engel)
approved these changes
Feb 11, 2025
lilgreenbird (lilgreenbird)
previously requested changes
Feb 13, 2025
lilgreenbird (lilgreenbird)
left a comment
Contributor
There was a problem hiding this comment.
add test?
Contributor
Contributor
Author
Verified that existing tests already cover this code path. This code path is hit for any get call on a ResultSet that returns NULL. e.g. many tests in ResultSetTest cover this. |
Divang Sharma (divang)
approved these changes
Feb 19, 2025
Jeff Wasty (Jeffery-Wasty)
dismissed
lilgreenbird (lilgreenbird)’s stale review
February 19, 2025 17:33
Addressed
Jeff Wasty (Jeffery-Wasty)
approved these changes
Feb 19, 2025
Terry Chow (tkyc)
approved these changes
Feb 20, 2025
Contributor
|
test added in PR #2617 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix of checking for null value of a DTVImpl before calling DTVImpl::getValue has shown some perf gains in our internal benchmark.
This fix will change behavior of getBinaryStream /getAsciiStream in ResultSet to be compliant with JDBC specs:
a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; if the value is SQL NULL, the value returned is null