StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.03k stars 1.82k forks source link

[Enhancement] add limit operator before union gather #53102

Closed stdpain closed 3 hours ago

stdpain commented 18 hours ago

Why I'm doing:

baseline:

mysql>   select  to_bitmap(1) FROM TABLE(generate_series(0, 655350)) union all select bitmap_agg(lo_orderkey) from lineorder group by lo_linenumber limit 1;
+--------------+
| to_bitmap(1) |
+--------------+
| NULL         |
+--------------+
1 row in set (7.42 sec)

patched:

mysql> select  to_bitmap(1) FROM TABLE(generate_series(0, 655350)) union all select bitmap_agg(lo_orderkey) from lineorder group by lo_linenumber limit 1;
+--------------+
| to_bitmap(1) |
+--------------+
| NULL         |
+--------------+
1 row in set (0.04 sec)

What I'm doing:

Fixes #issue

What type of PR is this:

Does this PR entail a change in behavior?

If yes, please specify the type of change:

Checklist:

Bugfix cherry-pick branch check:

github-actions[bot] commented 3 hours ago

[FE Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] commented 3 hours ago

[Java-Extensions Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] commented 3 hours ago

[BE Incremental Coverage Report]

:white_check_mark: pass : 4 / 4 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: be/src/exec/union_node.cpp 4 4 100.00% []
github-actions[bot] commented 3 hours ago

@Mergifyio backport branch-3.4

github-actions[bot] commented 3 hours ago

@Mergifyio backport branch-3.3

mergify[bot] commented 3 hours ago

backport branch-3.4

✅ Backports have been created

* [#53120 [Enhancement] add limit operator before union gather (backport #53102)](https://github.com/StarRocks/starrocks/pull/53120) has been created for branch `branch-3.4`
mergify[bot] commented 3 hours ago

backport branch-3.3

✅ Backports have been created

* [#53121 [Enhancement] add limit operator before union gather (backport #53102)](https://github.com/StarRocks/starrocks/pull/53121) has been created for branch `branch-3.3`