nikolauspschuetz opened a new pull request, #28912:
URL: https://github.com/apache/flink/pull/28912

   ## 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<DATE> and MULTISET<DATE> 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
   
   - [x] Added tests that verify the fix (test suite will pass on CI)
   - [x] Related to existing test for MapType.from_sql_type consistency
   - [x] Regression tests for ARRAY<DATE> and MULTISET<DATE>
   
   ##### Was generative AI tooling used to co-author this PR?
   [x] Yes (Claude 3 Haiku)
   
   Generated-by: Claude 3 Haiku (Analysis & Testing)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to