Uh oh!
There was an error while loading. Please reload this page.
Support mvdedup eval function - #4828
Conversation
Signed-off-by: Kai Huang <ahkcs@amazon.com>
Signed-off-by: Kai Huang <ahkcs@amazon.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dai-chen
left a comment
There was a problem hiding this comment.
Could you check if this has same semantic as ARRAY_DISTINCT?
2: jdbc:calcite:model=src/test/resources/mode> SELECT ARRAY_DISTINCT(ARRAY[1,2,1,3,3,4]);
+--------------+
| EXPR$0 |
+--------------+
| [1, 2, 3, 4] |
+--------------+
1 row selected (0.018 seconds)
2: jdbc:calcite:model=src/test/resources/mode> SELECT ARRAY_DISTINCT(ARRAY[4,1,2,1,3,3,4]);
+--------------+
| EXPR$0 |
+--------------+
| [4, 1, 2, 3] |
+--------------+
Signed-off-by: Kai Huang <ahkcs@amazon.com>
ahkcs
commented
Nov 20, 2025
Hi @dai-chen, thanks for the suggestion! After checking, I think cc @ykmr1224 |
dai-chen
commented
Nov 21, 2025
Do we need to backport? |
ahkcs
commented
Nov 21, 2025
Yes |
Uh oh!
There was an error while loading. Please reload this page.
* Support eval function Signed-off-by: Kai Huang <ahkcs@amazon.com> * Updates Signed-off-by: Kai Huang <ahkcs@amazon.com> * update javadoc Signed-off-by: Kai Huang <ahkcs@amazon.com> * Update to use ARRAY_DISTINCT Signed-off-by: Kai Huang <ahkcs@amazon.com> --------- Signed-off-by: Kai Huang <ahkcs@amazon.com> (cherry picked from commit 5049a03) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Support eval function * Updates * update javadoc * Update to use ARRAY_DISTINCT --------- (cherry picked from commit 5049a03) Signed-off-by: Kai Huang <ahkcs@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Support eval function Signed-off-by: Kai Huang <ahkcs@amazon.com> * Updates Signed-off-by: Kai Huang <ahkcs@amazon.com> * update javadoc Signed-off-by: Kai Huang <ahkcs@amazon.com> * Update to use ARRAY_DISTINCT Signed-off-by: Kai Huang <ahkcs@amazon.com> --------- Signed-off-by: Kai Huang <ahkcs@amazon.com>
Description
This PR implements the
mvdedupeval function for PPL, enabling users to remove duplicate values from multivalue arrays.Behavior
Given the input:
The function returns:
Key Details
Empty arrays return empty arrays
Order-preserving: The first appearance of each value is kept; subsequent duplicates are removed.
Example
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.