-
Notifications
You must be signed in to change notification settings - Fork 322
feat(sql): lazy last join #3533
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
Conversation
For SQL `A last join (B last join C)`, it'll optimize and run `B last join C` lazily. Both batch mode and request(batch-request) mode are considered.
and also: - rm redundant code path in group_and_sort_optimized.cc
/** | ||
* Resolve column id with given column expression [ColumnRefNode, ColumnId] | ||
*/ | ||
base::Status ResolveColumnID(const node::ExprNode* column, size_t* column_id) const; |
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.
delete due to no implementation.
@@ -522,39 +586,6 @@ bool GroupAndSortOptimized::KeyAndOrderOptimized( | |||
sort, new_in); | |||
} | |||
|
|||
bool GroupAndSortOptimized::SortOptimized( |
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.
never covered
&child_column_id, &source_column_id, &source); | ||
|
||
// try loose the relation | ||
if (!status.isOK() && !col->GetRelationName().empty()) { |
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.
deleted. do not make sense from try twice
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3533 +/- ##
============================================
+ Coverage 75.25% 75.36% +0.10%
Complexity 587 587
============================================
Files 701 717 +16
Lines 129041 129709 +668
Branches 1280 1280
============================================
+ Hits 97115 97751 +636
- Misses 31640 31672 +32
Partials 286 286
☔ View full report in Codecov by Sentry. |
8319e97
to
bd12f46
Compare
correct expr resolving in group_and_sort_optimized
Skip for the case `JOIN(TABLE, ...)`. Cluster optimize only happen with `JOIN(ROW, TABLE)`.
Do not optimize target table if resolved column is from different table, even column name does be the same.
SQL changes mainly from 4paradigm#3533 and 4paradigm#3554
SQL changes mainly from 4paradigm#3533 and 4paradigm#3554
support online for SQLs:
t1 last join (t2 last join t3)
What's changed:
last join (filter)
in request mode with cluster optimized #3531JOIN(ROW, TABLE)
, skip for cases likeJOIN(TABLE, ...)
JOIN (..., JOIN(...))
DataProvider
node