Kevin-Li-2025 commented on PR #23232:
URL: https://github.com/apache/datafusion/pull/23232#issuecomment-4899397169

   Thanks for pointing me back to #20012. I went through that discussion and 
tightened this PR so it does not take the broad approach that caused the 
earlier test churn.
   
   The latest commit narrows scalar literal recovery to the implicit-cast shape 
inserted by type coercion, `Cast(Literal -> expected arg type)`. It 
deliberately does not recursively unwrap user-written casts/try_casts, so cases 
such as `arrow_cast(1, cast('Utf8' as varchar))` still fail as before instead 
of treating the cast expression as a constant type argument. It also preserves 
the original scalar value when the planning-time scalar cast fails, so builtins 
that validate literal values themselves keep their existing error path instead 
of surfacing an early Arrow cast error.
   
   Local checks run:
   
   - `cargo test -p datafusion --test user_defined_integration 
test_return_field_args_scalar_argument_types_match_arg_fields`
   - `cargo test -p datafusion --test core_integration 
dataframe::dataframe_functions::test_fn_arrow_cast_requires_literal_type_arg`
   - `cargo run -p datafusion-examples --example builtin_functions -- date_time`
   - `git diff --check`
   
   New CI is now queued on head `053b1c0e8`.


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