andygrove commented on issue #3167:
URL: 
https://github.com/apache/datafusion-comet/issues/3167#issuecomment-4742670471

   Context for whoever picks this up: PR #4580 added a `ScalarValue::Map` arm 
to `spark_size_scalar` in `native/spark-expr/src/array_funcs/size.rs`. The arm 
is currently unreachable through SQL because the `Size` serde wraps native size 
calls in `CASE WHEN isNotNull(child) THEN size(child) ELSE <legacy literal> 
END`, so null map inputs short-circuit before hitting native, and `CreateMap` 
itself still falls back to Spark.
   
   Once `create_map` runs natively, constant-folded map literals will reach 
`spark_size_scalar` as `ScalarValue::Map`, and the new arm becomes 
load-bearing. Worth adding a SQL test for `size(map('a', 1, 'b', 2))` (default 
mode, not `spark_answer_only`) to 
`spark/src/test/resources/sql-tests/expressions/array/size.sql` when this lands.


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