Skip to content

[FLINK-40357][table] Add ARRAY_FLATTEN function to Flink SQL - #28945

Open
cytq-123 wants to merge 8 commits into
apache:masterfrom
cytq-123:add-array-flatten-FLINK-40357
Open

[FLINK-40357][table] Add ARRAY_FLATTEN function to Flink SQL#28945
cytq-123 wants to merge 8 commits into
apache:masterfrom
cytq-123:add-array-flatten-FLINK-40357

Conversation

@cytq-123

@cytq-123 cytq-123 commented Aug 9, 2026

Copy link
Copy Markdown

What is the purpose of the change

This PR adds the ARRAY_FLATTEN function to Flink SQL, which flattens a nested array by one level.

Brief change log

  • Add ARRAY_FLATTEN function definition in BuiltInFunctionDefinitions
  • Implement ArrayFlattenFunction runtime class
  • Add type inference strategy in SpecificTypeStrategies
  • Add comprehensive test cases in CollectionFunctionsITCase

Verifying this change

This change added tests and can be verified as follows:

  • Added 10 test cases in CollectionFunctionsITCase#arrayFlattenTestCases()
  • Tests cover basic functionality, NULL handling, and edge cases

Does this pull request potentially affect one of the following parts:

  • Dependencies: no
  • The public API: no
  • The serializers: no
  • The runtime per-record code paths: no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? JavaDocs

@flinkbot

flinkbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

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