Skip to content

Nested SQL query throws error on latest version 0.11.0 #5353

@bendrecm

Description

@bendrecm

For dataset se-druid, following query was working for 0.10.1 version but throws error on latest version 0.11.0

SELECT gender, country, count(distinct unique_users) as unique_users FROM \"se-druid\" GROUP BY gender, country HAVING gender <> '' and country in (SELECT country FROM \"se-druid\" WHERE country <> '' and country is not null GROUP BY country ORDER BY count(distinct unique_users) desc LIMIT 5)

Error:

{"error":"Unknown exception","errorMessage":"Cannot build plan for query: SELECT gender, country, count(distinct unique_users) as unique_users FROM \"se-druid{"query":"SELECT gender, country, count(distinct unique_users) as unique_users FROM \"se-druid\" GROUP BY gender, country HAVING gender <> '' and country in (SELECT country FROM \"se-druid\" WHERE country <> '' and country is not null GROUP BY country ORDER BY count(distinct unique_users) desc LIMIT 5)","errorClass":"io.druid.java.util.common.ISE","host":null}

How to reproduce ->

  1. Run any nested query like above on calcite SQL adapter on 0.11.0 version. The nested query can be in where clause or having clause.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions