[fix](function) Fix array_join to handle non-constant columns.#60612
[fix](function) Fix array_join to handle non-constant columns.#60612zclllyybb merged 2 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 30368 ms |
ClickBench: Total hot run time: 28.36 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 30361 ms |
ClickBench: Total hot run time: 28.88 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 30167 ms |
ClickBench: Total hot run time: 28.83 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 30665 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-DS: Total hot run time: 190906 ms |
ClickBench: Total hot run time: 28.04 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
The previous implementation of array_join was incorrect: it didn't consider whether the inputs were constant columns and always took the first element from each column. before ```sql mysql> select * from db_array_join; +------+-----------------+-------+ | id | sarr | s | +------+-----------------+-------+ | 1 | ["a", "b", "c"] | 0000 | | 2 | ["c", "d", "e"] | 11111 | +------+-----------------+-------+ mysql> select array_join(sarr,s) from db_array_join; +--------------------+ | array_join(sarr,s) | +--------------------+ | a0000b0000c | | c0000d0000e | +--------------------+ ``` now ```sql mysql> select array_join(sarr,s) from db_array_join; +--------------------+ | array_join(sarr,s) | +--------------------+ | a0000b0000c | | c11111d11111e | +--------------------+ ```
…e#60612) The previous implementation of array_join was incorrect: it didn't consider whether the inputs were constant columns and always took the first element from each column. before ```sql mysql> select * from db_array_join; +------+-----------------+-------+ | id | sarr | s | +------+-----------------+-------+ | 1 | ["a", "b", "c"] | 0000 | | 2 | ["c", "d", "e"] | 11111 | +------+-----------------+-------+ mysql> select array_join(sarr,s) from db_array_join; +--------------------+ | array_join(sarr,s) | +--------------------+ | a0000b0000c | | c0000d0000e | +--------------------+ ``` now ```sql mysql> select array_join(sarr,s) from db_array_join; +--------------------+ | array_join(sarr,s) | +--------------------+ | a0000b0000c | | c11111d11111e | +--------------------+ ```
…, Fix array_join to handle non-constant columns. (#60707) ### What problem does this PR solve? #60612 #60575 ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
What problem does this PR solve?
The previous implementation of array_join was incorrect: it didn't consider whether the inputs were constant columns and always took the first element from each column.
before
now
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)