Skip to content

Comparing dimensions to each other in a filter #3840

@erikdubbelboer

Description

@erikdubbelboer

We would like to model something like the following SQL query in Druid:

SELECT *
FROM t
WHERE t.a == t.b

As far as I can see it's not possible to compare dimensions to each other in Druid. Or is it?

Would it be possible to add some new filter like:

"filter": { "type": "dimensions", "dimensions": [<dimension_string>, <dimension_string>, ...], "op": <"=="|"!="> }

Which would allow you to compare 2 or more dimensions to each other.

It's not possible top speed up queries with this filter so I guess it should be applied once a columns is selected to be processed (does that make sense?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions