Skip to content

branch-4.1: [Feature](function) Pick two array-function#64081

Open
linrrzqqq wants to merge 2 commits into
apache:branch-4.1from
linrrzqqq:pick-array-func-branch-4.1
Open

branch-4.1: [Feature](function) Pick two array-function#64081
linrrzqqq wants to merge 2 commits into
apache:branch-4.1from
linrrzqqq:pick-array-func-branch-4.1

Conversation

@linrrzqqq
Copy link
Copy Markdown
Collaborator

pick: #60403 and #64031

@linrrzqqq linrrzqqq requested a review from yiguolei as a code owner June 3, 2026 10:58
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Issue Number: apache#48203

Related PR: apache#59223

doc: apache/doris-website#3891

Problem Summary:

Support function `ARRAY_CROSS_PRODUCT`

```sql
Doris> SELECT CROSS_PRODUCT([1, 2, 3], [2, 3, 4]);
+-------------------------------------+
| CROSS_PRODUCT([1, 2, 3], [2, 3, 4]) |
+-------------------------------------+
| [-1, 2, -1]                         |
+-------------------------------------+
1 row in set (0.021 sec)

Doris> SELECT CROSS_PRODUCT([1, 2, 3], NULL);
+--------------------------------+
| CROSS_PRODUCT([1, 2, 3], NULL) |
+--------------------------------+
| NULL                           |
+--------------------------------+
1 row in set (0.009 sec)

Doris> SELECT CROSS_PRODUCT([1, NULL, 3], [1, 2, 3]);
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INVALID_ARGUMENT]function array_cross_product cannot have null
Doris> SELECT CROSS_PRODUCT([1, 2, 3, 4], [1, 2, 3, 4]);
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INVALID_ARGUMENT]function array_cross_product requires both input arrays to have exactly 3 elements, got 4 and 4

```
@linrrzqqq linrrzqqq force-pushed the pick-array-func-branch-4.1 branch from 63e27ad to f164298 Compare June 3, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants