test: improve digest function SQL test coverage#23756
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23756 +/- ##
==========================================
+ Coverage 80.71% 80.74% +0.03%
==========================================
Files 1089 1089
Lines 368293 368948 +655
Branches 368293 368948 +655
==========================================
+ Hits 297250 297894 +644
+ Misses 53332 53293 -39
- Partials 17711 17761 +50 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nuno-faria
approved these changes
Jul 21, 2026
nuno-faria
left a comment
Contributor
There was a problem hiding this comment.
Thanks @2010YOUY01. Just to confirm, I suggest adding a case that fails in those comparisons.
| digest(column1, 'blake2s') = digest('tom', 'blake2s'), | ||
| digest(column1, 'blake2b') = digest('tom', 'blake2b'), | ||
| digest(column1, 'blake3') = digest('tom', 'blake3') | ||
| FROM (VALUES ('tom'), (NULL)) AS t(column1); |
Contributor
There was a problem hiding this comment.
Suggested change
| FROM (VALUES ('tom'), (NULL)) AS t(column1); | |
| FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1); |
| digest(arrow_cast(column1, 'BinaryView'), 'blake2s') = digest('tom', 'blake2s'), | ||
| digest(arrow_cast(column1, 'BinaryView'), 'blake2b') = digest('tom', 'blake2b'), | ||
| digest(arrow_cast(column1, 'BinaryView'), 'blake3') = digest('tom', 'blake3') | ||
| FROM (VALUES ('tom'), (NULL)) AS t(column1); |
Contributor
There was a problem hiding this comment.
Suggested change
| FROM (VALUES ('tom'), (NULL)) AS t(column1); | |
| FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1); |
| SELECT | ||
| digest(arrow_cast(column1, 'LargeUtf8'), 'md5') = digest('tom', 'md5'), | ||
| digest(arrow_cast(column1, 'Utf8View'), 'md5') = digest('tom', 'md5') | ||
| FROM (VALUES ('tom'), (NULL)) AS t(column1); |
Contributor
There was a problem hiding this comment.
Suggested change
| FROM (VALUES ('tom'), (NULL)) AS t(column1); | |
| FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1); |
Contributor
Author
Good point, updated. Thank you for the review. |
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.
Which issue does this PR close?
Rationale for this change
Codecov reports low test coverage for this function, so this PR adds more SLT tests for it.
The tests were AI-generated, and I manually verified that the results are correct.
See
Codecovbot comment ->☔ View full report in Codecov by Harness->Indirect Changesfor the updated test coverage.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?