You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "samuelcolvin (via GitHub)" <gi...@apache.org> on 2024/09/17 16:15:02 UTC
[I] Coercion from `Dictionary(UInt32, Boolean)` to `Boolean` [datafusion]
samuelcolvin opened a new issue, #12511:
URL: https://github.com/apache/datafusion/issues/12511
I'm trying to run a query like
```sql
select count(*) from records where json_data_colum ? 'foo' and true
```
With datafusion and getting an error:
```
type_coercion caused by Error during planning: Cannot infer common argument type for logical boolean operation Dictionary(UInt32, Boolean) AND Boolean
```
(note in our case `json_data_colum` is a dictionary column containing JSON strings, so `json_data_colum ? 'foo'` returns a `Dictionary(UInt32, Boolean)`)
This is related to https://github.com/apache/datafusion/pull/12382 where @adriangb fixed the case of filtering on a dictionary column.
I'll fix this specific case in https://github.com/datafusion-contrib/datafusion-functions-json, but I guess this should work.
--
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