alan910127 opened a new issue, #15013:
URL: https://github.com/apache/datafusion/issues/15013

   ### Is your feature request related to a problem or challenge?
   
   Discovered in #14763.
   
   Currently, `NativeType::Null` is treated as a special case in 
`TypeSignatureClass::matches_native_type`. This leads to an error in 
`TypeSignatureClass::default_casted_type` when the signature class is not 
`TypeSignatureClass::Native`, since both `native_type` and `origin_type` end up 
being `Null`. This results in an inconsistency between the two functions.
   
   ### Describe the solution you'd like
   
   One approach is to add `TypeSignatureClass::Native(logical_null())` to the 
`allowed_source_types` of `Coercion::Implicit` wherever `NULL` is valid. 
However, this would require modifying many places in the codebase.
   
   ### Describe alternatives you've considered
   
   Another option is introducing a `Coercion::new_nullable` function, which 
takes the same arguments as `Coercion::new_implicit` and automatically adds 
`TypeSignatureClass::Native(logical_null())` to `allowed_source_type`.
   
   ### Additional context
   
   Both approaches require significant changes, so I’d love to hear thoughts on 
which direction makes the most sense.


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to