-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Implement LEFT JOIN and fix NULL handling in PostgreSQL protocol #12
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dffa54b
feat(executor): add JoinType enum to core executor types
poyrazK b20e3f7
refactor(executor): update Operator base class and HashJoinOperator i…
poyrazK 7b5de19
feat(executor): implement LEFT JOIN logic and fix Operator state mana…
poyrazK 396953d
fix(parser): improve qualified column resolution in ColumnExpr
poyrazK 27c51bb
feat(executor): map and pass join types in QueryExecutor build_plan
poyrazK 55a5199
fix(network): correctly transmit NULL values in PostgreSQL protocol a…
poyrazK eb4b5cc
style: automated clang-format fixes
poyrazK 3a86f21
feat(executor): implement FULL and RIGHT join support in HashJoinOper…
poyrazK 6538637
fix(parser): align evaluate_vectorized with scalar qualified column r…
poyrazK b41d2cd
test(parser): fix undeclared aliases in ParserAdvanced tests
poyrazK 671483f
perf(network): reserve capacity for col_vals in server response
poyrazK 9f1e234
feat(test): add rowsort and valuesort support to SLT runner
poyrazK a49f061
refactor(test): implement cross-platform CPU detection in run_test.sh
poyrazK 69da2ab
chore: resolve merge conflicts in tests/cloudSQL_tests.cpp
poyrazK 0b8d82b
style: automated clang-format fixes
poyrazK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Aggregate and Group By Tests | ||
|
|
||
| statement ok | ||
| CREATE TABLE agg_test (grp TEXT, val INT); | ||
|
|
||
| statement ok | ||
| INSERT INTO agg_test VALUES ('A', 10), ('A', 20), ('B', 5), ('B', 15), ('C', 100); | ||
|
|
||
| # Basic Aggregates | ||
| query IIII | ||
| SELECT SUM(val), COUNT(val), MIN(val), MAX(val) FROM agg_test; | ||
| ---- | ||
| 150 5 5 100 | ||
|
|
||
| # Group By | ||
| query TI | ||
| SELECT grp, SUM(val) FROM agg_test GROUP BY grp ORDER BY grp; | ||
| ---- | ||
| A 30 | ||
| B 20 | ||
| C 100 | ||
|
|
||
| # Group By with Filter | ||
| query TI | ||
| SELECT grp, COUNT(val) FROM agg_test WHERE val > 10 GROUP BY grp ORDER BY grp; | ||
| ---- | ||
| A 1 | ||
| B 1 | ||
| C 1 | ||
|
|
||
| # Having Clause | ||
| query TI | ||
| SELECT grp, SUM(val) FROM agg_test GROUP BY grp HAVING SUM(val) > 25 ORDER BY grp; | ||
| ---- | ||
| A 30 | ||
| C 100 | ||
|
|
||
| # Average (Real) | ||
| query R | ||
| SELECT AVG(val) FROM agg_test WHERE grp = 'A'; | ||
| ---- | ||
| 15.0 | ||
|
|
||
| statement ok | ||
| DROP TABLE agg_test; |
Oops, something went wrong.
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.
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.
Do not hash SQL NULL join keys as ordinary values.
Lines 609-610 and 661-665 route join keys through
to_string(), so a NULL key becomes just another hash entry. That makesNULL = NULLmatch here and can even collide with a real text key like"NULL", which breaks join semantics and prevents the unmatched-row paths from firing correctly in LEFT/RIGHT/FULL joins.Also applies to: 661-675
🤖 Prompt for AI Agents