Skip to content

[core] Deduplicate initial listagg tokens - #11256

Open
zhangyue19921010 wants to merge 1 commit into
apache:masterfrom
zhangyue19921010:contrib/deduplicate-initial-listagg-tokens
Open

zhangyue19921010 wants to merge 1 commit into
apache:masterfrom
zhangyue19921010:contrib/deduplicate-initial-listagg-tokens

Conversation

@zhangyue19921010

Copy link
Copy Markdown
Contributor

Purpose

Distinct listagg retains duplicate tokens from the first input: merging "a,a" and "b" produces "a,a,b", including after full compaction. Normalize the accumulator before appending unseen tokens, including when partial-update sequence groups reverse the inputs. Keep non-distinct and empty-delimiter behavior unchanged.

Fixes #11255

Tests

PrimaryKeyListaggDistinctTest covers aggregation and partial-update tables, same/separate commits, custom delimiters, reversed sequence groups, and full compaction, with non-distinct and empty-delimiter controls.

On unchanged master 79b8ec4788, 12 regression cases fail and 6 compatibility controls pass. With this change, all 38 selected table, listagg, and partial-update tests pass on JDK 11. Normal Maven verify also passes Checkstyle, Spotless, Enforcer, and RAT.

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.

[Bug] Distinct listagg retains repeated tokens from the first input

1 participant