Skip to content

test: improve sha function SQL test coverage#23758

Merged
2010YOUY01 merged 4 commits into
apache:mainfrom
2010YOUY01:codex/coverage-sha-variants
Jul 23, 2026
Merged

test: improve sha function SQL test coverage#23758
2010YOUY01 merged 4 commits into
apache:mainfrom
2010YOUY01:codex/coverage-sha-variants

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

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 Codecov bot comment -> ☔ View full report in Codecov by Harness -> Indirect Changes for the updated test coverage.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Jul 21, 2026
@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.72%. Comparing base (02a902c) to head (cd7b6fd).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23758      +/-   ##
==========================================
+ Coverage   80.71%   80.72%   +0.01%     
==========================================
  Files        1089     1089              
  Lines      368293   368948     +655     
  Branches   368293   368948     +655     
==========================================
+ Hits       297250   297846     +596     
- Misses      53332    53340       +8     
- Partials    17711    17762      +51     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nuno-faria nuno-faria left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @2010YOUY01. Like in #23756, I suggest adding a case that fails.

sha224(arrow_cast(column1, 'Binary')) = sha224('tom'),
sha224(arrow_cast(column1, 'LargeBinary')) = sha224('tom'),
sha224(arrow_cast(column1, 'BinaryView')) = sha224('tom')
FROM (VALUES ('tom'), (NULL)) AS t(column1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM (VALUES ('tom'), (NULL)) AS t(column1);
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);

sha384(arrow_cast(column1, 'Binary')) = sha384('tom'),
sha384(arrow_cast(column1, 'LargeBinary')) = sha384('tom'),
sha384(arrow_cast(column1, 'BinaryView')) = sha384('tom')
FROM (VALUES ('tom'), (NULL)) AS t(column1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM (VALUES ('tom'), (NULL)) AS t(column1);
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);

sha512(arrow_cast(column1, 'Binary')) = sha512('tom'),
sha512(arrow_cast(column1, 'LargeBinary')) = sha512('tom'),
sha512(arrow_cast(column1, 'BinaryView')) = sha512('tom')
FROM (VALUES ('tom'), (NULL)) AS t(column1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM (VALUES ('tom'), (NULL)) AS t(column1);
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);

@2010YOUY01
2010YOUY01 added this pull request to the merge queue Jul 23, 2026
Merged via the queue into apache:main with commit 2180253 Jul 23, 2026
37 checks passed
@2010YOUY01
2010YOUY01 deleted the codex/coverage-sha-variants branch July 23, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants