Skip to content

[FLINK-40322][python] Fix Array/Multiset from_sql_type to decode elements - #28912

Open
nikolauspschuetz wants to merge 2 commits into
apache:masterfrom
nikolauspschuetz:fix-flink-from-sql-type-array-multiset
Open

[FLINK-40322][python] Fix Array/Multiset from_sql_type to decode elements#28912
nikolauspschuetz wants to merge 2 commits into
apache:masterfrom
nikolauspschuetz:fix-flink-from-sql-type-array-multiset

Conversation

@nikolauspschuetz

@nikolauspschuetz nikolauspschuetz commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

ArrayType and MultisetType were calling to_sql_type on elements in from_sql_type, which is the wrong direction. This caused decoding of ARRAY and MULTISET to fail with AttributeError: 'int' object has no attribute 'toordinal'.

Fixed by calling from_sql_type instead (matching MapType.from_sql_type behavior).

Brief change log

  • Add: test_array_from_sql_type_converts_elements
  • Add: test_multiset_from_sql_type_converts_elements
  • Fix: ArrayType.from_sql_type to decode elements via from_sql_type
  • Fix: MultisetType.from_sql_type to decode elements via from_sql_type

Verifying this change

  • Added tests that verify the fix (test suite will pass on CI)
  • Related to existing test for MapType.from_sql_type consistency
  • Regression tests for ARRAY and MULTISET
Was generative AI tooling used to co-author this PR?

[x] Yes (Claude Code (Opus 4.8))

Generated-by: Claude Code (Opus 4.8)

@flinkbot

flinkbot commented Aug 4, 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