You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "coderfender (via GitHub)" <gi...@apache.org> on 2026/02/12 21:49:10 UTC
[I] cast from boolean function missing support to all DF compatible data types [datafusion-comet]
coderfender opened a new issue, #3509:
URL: https://github.com/apache/datafusion-comet/issues/3509
### Describe the bug
`can_cast_from_boolean` which is a recursive function to cast complex struct types to strings doesnt support casting to string. Given that DF supports cast from bool to pretty much all possible primitive data types (logic in `is_spark_datafusion_compatible` ) , we need to fix this function to match with datafusion compatibility
### Steps to reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] cast from boolean function missing support to string (DF compatible) [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on issue #3509:
URL: https://github.com/apache/datafusion-comet/issues/3509#issuecomment-4844781244
Resolved. The buggy `can_cast_from_boolean` gate in the native `cast_supported` chain (which matched `(Boolean, _)` before `(_, Utf8)` and so rejected boolean → string) was removed as dead code in #3513. Cast-support decisions now live in `CometCast.scala`, where `isSupported` matches `(_, StringType)` before `(BooleanType, _)`, routing boolean → string to `canCastToString`, which returns `Compatible()` for booleans and recurses into struct fields for the complex-type-to-string path.
Coverage exists in both layers: the native `test_bool_to_string_cast` unit test and the `cast BooleanType to StringType` test in `CometCastSuite`.
Closing as resolved. Please reopen if you can still reproduce on a recent build.
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] cast from boolean function missing support to string (DF compatible) [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed issue #3509: cast from boolean function missing support to string (DF compatible)
URL: https://github.com/apache/datafusion-comet/issues/3509
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] cast from boolean function missing support to string (DF compatible) [datafusion-comet]
Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on issue #3509:
URL: https://github.com/apache/datafusion-comet/issues/3509#issuecomment-3915588905
The is fixed after code refactor
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org