parthchandra commented on PR #6458:
URL: 
https://github.com/apache/datafusion-comet/pull/6458#issuecomment-5919287892

   Notes (Spark's `IfTypeCoercion` already widens int/long/decimal/string 
before Comet sees the plan, so only nested-nullability, field-name, and 
tz-label differences survive, which is exactly what this handles):
   
   - **`native/core/src/execution/planner.rs:823`** — this uses 
`SparkCastOptions::new(EvalMode::Legacy, "UTC", false)`, which matches 
`create_case_expr` only after #6347 lands. On current main `create_case_expr` 
still uses `new_without_timezone`, so if this merges first, IF relabels a 
timestamp branch to UTC while CASE WHEN relabels to empty during that window. 
"UTC" is the correct choice - can you confirm the intended merge order with 
#6347?
   
   - 
**`spark/src/test/resources/sql-tests/expressions/conditional/if_nested_nullability.sql:53`**
 — every struct here is a single field `struct<x:int>`, so the common type only 
ever differs from one branch. Please add a two-field struct where a different 
field is nullable in each branch, e.g. `IF(q, named_struct('x', i, 'y', 0), 
named_struct('x', 0, 'y', i))`, so both branches get cast.
   
   - **`if_nested_nullability.sql`** (add cases) — the nesting tested is 
map-of-struct and map-of-array. The complex-type bar also wants array-of-struct 
and struct-with-a-map-or-array-field. Please add a branch pair over 
`array<struct<x:int>>` and a struct whose field is itself a map or array, 
exercising the recursive `struct_coercion`/`list_coercion` paths the fix relies 
on.
   
   - **`native/core/src/execution/planner.rs:818`** — the "every TimestampType 
is labelled UTC" path has no test; there's no IF query with a timestamp branch 
anywhere. Please add an IF over a timestamp column with a non-UTC session 
timezone, mirroring what #6347 added for CASE/COALESCE. If it's genuinely 
unreachable from a native plan, a sentence saying so would be clearer than the 
comment.
   


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