-
Notifications
You must be signed in to change notification settings - Fork 5.5k
test: Add Sequence and Exclude columns function tests with lateral #27042
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
base: master
Are you sure you want to change the base?
Conversation
Reviewer's GuideAdds new test coverage demonstrating use of the exclude_columns table function and the sequence table function within LATERAL joins, validating behavior under filtering and join conditions against TPCH tables. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey - I've left some high level feedback:
- In
testExcludeColumnsLateralJoin, the aliasris reused both for the table function (TABLE(...) r) and for the enclosing lateral subquery () r), which is legal but confusing; consider using distinct aliases to make it clearer which level eachrrefers to.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `testExcludeColumnsLateralJoin`, the alias `r` is reused both for the table function (`TABLE(...) r`) and for the enclosing lateral subquery (`) r`), which is legal but confusing; consider using distinct aliases to make it clearer which level each `r` refers to.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
aditi-pandit
left a comment
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.
Thanks @mohsaka for these tests. Had a question about them.
| // This tests using exclude_columns in a lateral join context with filtering | ||
| assertQuery("SELECT n.nationkey, filtered.* " + | ||
| "FROM tpch.tiny.nation n " + | ||
| "CROSS JOIN LATERAL (" + |
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.
@mohsaka : What is the purpose of LATERAL here ? Were you not able to do the same logic with the same SQL without LATERAL ?
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.
We can, per the expected SQL which has the same result. But I thought we wanted to test lateral in combination with the exclude columns table function result?
Description
Add examples for lateral calls with table function calls.
Motivation and Context
Add more test coverage and show examples.
Impact
Test Plan
Ran ExcludeColumns and Sequence tests to verify they pass.
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
Summary by Sourcery
Add test coverage for using table functions in lateral joins.
Tests: