test: Add end to end tests for string functions#26950
Open
allenshen13 wants to merge 1 commit intomasterfrom
Open
test: Add end to end tests for string functions#26950allenshen13 wants to merge 1 commit intomasterfrom
allenshen13 wants to merge 1 commit intomasterfrom
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds end-to-end native execution tests for the string functions bit_length, longest_common_prefix, and replace_first within the existing string functions test suite. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches. Re-running this action after a short time may resolve the issue. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
1bd9162 to
a7151e1
Compare
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- For the tests that only exercise scalar behavior with literals (e.g.,
bit_length(''),longest_common_prefix('', ''),replace_first('aaa', 'a', 'b')), consider usingVALUESinstead ofFROM nationto avoid unnecessary table scans and keep the E2E suite leaner. - The new
SELECT ... FROM orders/nationassertions withoutLIMIT(e.g.,bit_length(comment),replace_first(comment, 'the', 'THE')) will compare full table results between engines; if the intent is just to exercise the function end-to-end, you might want to narrow these (e.g., withLIMITor a restricted predicate) to reduce test runtime.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the tests that only exercise scalar behavior with literals (e.g., `bit_length('')`, `longest_common_prefix('', '')`, `replace_first('aaa', 'a', 'b')`), consider using `VALUES` instead of `FROM nation` to avoid unnecessary table scans and keep the E2E suite leaner.
- The new `SELECT ... FROM orders/nation` assertions without `LIMIT` (e.g., `bit_length(comment)`, `replace_first(comment, 'the', 'THE')`) will compare full table results between engines; if the intent is just to exercise the function end-to-end, you might want to narrow these (e.g., with `LIMIT` or a restricted predicate) to reduce test runtime.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
a7151e1 to
32df666
Compare
Contributor
|
Thanks for the release note! Formatting nit: You can delete everything after the |
beb791f to
2245230
Compare
jkhaliqi
reviewed
Feb 5, 2026
Contributor
jkhaliqi
left a comment
There was a problem hiding this comment.
@allenshen13 Thanks for the tests!
...ecution/src/test/java/com/facebook/presto/nativeworker/AbstractTestNativeGeneralQueries.java
Outdated
Show resolved
Hide resolved
2245230 to
af7b992
Compare
jkhaliqi
reviewed
Feb 17, 2026
af7b992 to
b5155f9
Compare
Contributor
|
@allenshen13 : Can you rebase your code ? I'll approve after the tests run successfully. |
b5155f9 to
44003d4
Compare
jkhaliqi
approved these changes
Apr 3, 2026
…common_prefix, replace_first
44003d4 to
ea416c0
Compare
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.
Description
Add E2E tests for bit_length, longest_common_prefix, replace_first
Motivation and Context
Closes #26936
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.