-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for correlated subqueries & fix all related TPC-H benchma…
…rk issues (#2885) * Failing test case for TPC-H query 20 * Fix name * Broken test for adding intervals to dates * Tests pass * Fix rebase * Fix query * Additional tests * Reduce to minimum failing (and passing) cases * Adjust so data _should_ be returned, but see none * Fixed data, decorrelated test passes * Check in plans * Put real assertion in place * Add test for already working subquery optimizer * Add decorellator * Check in broken test * Add some passing and failing tests to see scope of problem * Have almost all inputs needed for optimization, but need to catch 1 level earlier in tree * Collected all inputs, now we just need to optimize * Successfully decorrelated query 4 * refactor * Pass test 4 * Ready for PR? * Only operate on equality expressions * Lint error * Tests still pass because we are losing remaining predicate * Don't lose remaining expressions * Update test to expect remaining filter clause * Debugging * Can run query 4 * Remove debugging code * Clippy * Refactor where exists, add scalar subquery * Login qty < () and 0.2 times, predicate pushdown is killing our plan * Query plan looks good * Fudge data to make test output nicer * Fix syntax error * [WIP] where in * Working recursively, q20 plan looks good, but execution failing * Fix CSV for execution error, remove silly variables in favor of --nocapture * Silence verbose logs * Query 21 test * [WIP] refactoring, query 4 looking good * [WIP] 4 & 17 look good * 22 good? * Check in "Test" for query 11 * query 11 works * Don't throw away plans when multiple subqueries in one filter * Manually decorellate query 21 * [WIP] add data for query 21, anti join failing for some reason * Does appear to be problem with anti-join * Minimum failing test * Verify anti join fix * Repeatable tests * cargo fmt * Restore some optimizers and update test expectations * Restore some optimizers and update test expectations * Restore some optimizers and update test expectations * Restore some optimizers and update test expectations * Cleanup * Cleanup scalar subquery, de-duplicate some code * Cleanup * Refactor * Refactor * Refactor * Refactor * Handle recursive where in * Update assertions * Support recursion in where exists queries * Unit tests on where in * Add correlated where in test * Nasty code to make where in work for both correlated and uncorrelated queries * Cleanup * Refactoring * Refactoring * Add correlated unit test * Add correlated where exists unit test * [WIP] Failing scalar subquery unit test * Refactor * tuple mixup * Scalar subquery unit test * ASF header * PR feedback * PR feedback * PR feedback * PR feedback * Fix build again * Formatting * Testing * multiple where in * Unit tests for where in * where exists tests * scalar subquery tests * add aggregates to scalar subqueries * Remove tests that only existed to get logical plans as input to unit tests * Check in assertions for valid tests * 1/33 passing unit tests :/ * Down to one failing test * All the unit tests pass * into methods * Where exists unit tests passing * Try from methods * Fix tests * Fix tests * Refactor * Fix test * Refactor * Fix test * Fix error message * Fix tests * Fix tests * Refactor * Refactor and fix tests * Improved recursive subquery test * Recursive subquery fix * Update tests * Update tests * Update tests * Doc * Clippy * Linter & clippy * Add doc, move test methods into test modules * PR cleanup * Inline test data * Remove shared test data * Remove shared test data * Update tests * Fix toml * Update expectation * PR feedback * PR feedback Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org> * Fix test to reveal logic error * Simplify test * Fix stuff, break other stuff * I've writen scala in rust because I'm in a hurry :( * Clean the API up a little * PR feedback * PR feedback * PR feedback * PR feedback Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
- Loading branch information
1 parent
117df4d
commit 7b0f2f8
Showing
23 changed files
with
2,952 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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
Oops, something went wrong.