Skip to content

Coercion from Dictionary(UInt32, Boolean) to Boolean #12511

@samuelcolvin

Description

@samuelcolvin

I'm trying to run a query like

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions