Skip to content
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

feat: last join on window #3565

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

aceforeverd
Copy link
Collaborator

@aceforeverd aceforeverd commented Oct 23, 2023

Supporting online for this kind of SQLs:

SELECT ... FROM request
LAST JOIN (
  SELECT ID, count(val) over w as agg
  FROM t2 
  WINDOW w as ( PARTITION BY part ... )
) tx ON request.ID = tx.ID

RESTRICTIONS

  1. The JOIN condition, tx.ID, where ID must resolve to the column from actual table, which is t2 in the SQL above, not from the window agg result
  2. Table t2 should at least have two indexes, one index key referred by tx.ID, another index key referred by WINDOW PARTITION BY column

@github-actions github-actions bot added the execute-engine hybridse sql engine label Oct 23, 2023
@aceforeverd aceforeverd force-pushed the feat-last-join-window branch from 28229cc to c64ca4b Compare October 24, 2023 10:07
@aceforeverd aceforeverd changed the title Feat last join window feat: last join on window Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 179 lines in your changes are missing coverage. Please review.

Comparison is base (23d7c50) 75.31% compared to head (e4ad2e5) 75.27%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3565      +/-   ##
============================================
- Coverage     75.31%   75.27%   -0.05%     
  Complexity      587      587              
============================================
  Files           719      719              
  Lines        129836   130167     +331     
  Branches       1280     1280              
============================================
+ Hits          97787    97983     +196     
- Misses        31763    31898     +135     
  Partials        286      286              
Files Coverage Δ
...bridse/examples/toydb/src/tablet/tablet_catalog.cc 67.66% <ø> (+10.34%) ⬆️
...ybridse/examples/toydb/src/tablet/tablet_catalog.h 63.63% <ø> (ø)
...amples/toydb/src/testing/toydb_engine_test_base.cc 73.46% <100.00%> (-0.54%) ⬇️
hybridse/include/codec/row.h 95.00% <100.00%> (ø)
hybridse/include/codec/row_list.h 86.95% <100.00%> (+21.73%) ⬆️
hybridse/include/vm/catalog.h 47.20% <ø> (ø)
...idse/src/passes/physical/batch_request_optimize.cc 90.62% <100.00%> (+0.26%) ⬆️
...dse/src/passes/physical/group_and_sort_optimized.h 100.00% <100.00%> (ø)
...e/src/passes/physical/transform_up_physical_pass.h 75.00% <ø> (ø)
hybridse/src/plan/planner.cc 88.27% <100.00%> (ø)
... and 18 more

... and 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aceforeverd aceforeverd force-pushed the feat-last-join-window branch from c64ca4b to 028f961 Compare October 24, 2023 13:27
@aceforeverd aceforeverd marked this pull request as ready for review October 24, 2023 13:42
@aceforeverd aceforeverd force-pushed the feat-last-join-window branch from 028f961 to 26f5af2 Compare October 25, 2023 16:18
@aceforeverd aceforeverd force-pushed the feat-last-join-window branch from 26f5af2 to b39cb17 Compare October 26, 2023 08:59
@github-actions github-actions bot added the storage-engine openmldb storage engine. nameserver & tablet label Oct 26, 2023
@aceforeverd aceforeverd force-pushed the feat-last-join-window branch from b39cb17 to e4ad2e5 Compare November 9, 2023 14:08
@aceforeverd aceforeverd merged commit c2b7817 into 4paradigm:main Nov 15, 2023
26 of 28 checks passed
@aceforeverd aceforeverd deleted the feat-last-join-window branch November 15, 2023 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-engine hybridse sql engine storage-engine openmldb storage engine. nameserver & tablet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants