jaideeppyne opened a new pull request, #26019:
URL: https://github.com/apache/datafusion/pull/26019

   ## Which issue does this PR close?
   
   Fixes #26012.
   
   ## Rationale for this change
   
   The literal lookup path recognizes `FixedSizeBinary` operands, but its byte 
iterator casts them to `LargeBinaryArray`. These are different Arrow array 
types, so CASE expressions with multiple literal WHEN branches panic instead of 
returning rows.
   
   ## What changes are included in this PR?
   
   - Use the fixed-size binary downcast and iterator in the byte lookup path.
   - Add SQL regressions for matching/unmatched operands, omitted ELSE, 
duplicate WHEN values (first match wins), NULL operands, and NULL WHEN values.
   
   ## What is the testing strategy for this PR?
   
   The new SQL reproduction panicked on the original code. With the fix:
   
   - CASE-filtered sqllogictests passed (case, spark/case, and ucase).
   - The full extended workspace lib/test/bin suite passed with all required 
fixtures initialized and features 
`avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption`.
   - `cargo fmt --all` and workspace `cargo clippy --all-targets --all-features 
-- -D warnings` passed on pinned Rust 1.99.0.
   - Ran the existing five-entry UTF-8 CASE lookup benchmark group on both main 
and the patch in the CI profile as a smoke check. This benchmark does not 
exercise FixedSizeBinary; no performance claim is made.
   
   ## Are there any user-facing changes?
   
   These fixed-size binary CASE queries now return their expected results 
rather than panicking. No API changes.
   
   Implementation and regression tests were developed with Codex assistance. 
Validation above was executed locally; maintainer review remains welcome.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to