Skip to content

Error while applying rule DruidSemiJoinRule #6134

@egor-ryashin

Description

@egor-ryashin

Got this exception:

{  
   "error":"Unknown exception",
   "errorMessage":"Error while applying rule DruidSemiJoinRule, args [rel#1822:LogicalProject.NONE.[](input=rel#1821:Subset#8.NONE.[],cn=$20,b=$7), rel#1943:LogicalJoin.NONE.[](left=rel#1939:Subset#26.NONE.[],right=rel#1817:Subset#6.NONE.[],condition==($20, $119),joinType=inner), rel#2028:DruidQueryRel.NONE.[[]](query={\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"dt\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"2018-08-01T13:00:00.001Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[],\"resultFormat\":\"compactedList\",\"batchSize\":20480,\"limit\":9223372036854775807,\"filter\":null,\"columns\":[\"__time\", ***],\"legacy\":false,\"context\":{\"sqlTimeZone\":\"GMT\"},\"descending\":false},signature={__time:LONG, *** }), rel#2046:DruidOuterQueryRel.NONE.[1 DESC](innerQuery=rel#1813:Subset#4.NONE.[1 DESC],query={\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"__subquery__\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[],\"filter\":null,\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"default\",\"dimension\":\"cn\",\"outputName\":\"d0\",\"outputType\":\"STRING\"}],\"aggregations\":[],\"postAggregations\":[],\"having\":null,\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"sqlTimeZone\":\"GMT\"},\"descending\":false},signature={d0:STRING})]",
   "errorClass":"java.lang.RuntimeException",
   "host":null
}

while executing a query:

{"query":"select cn, b, count(*) as cnt1 from dt where cn in (select cn from (select cn, count(*) as cnt0 from dt WHERE __time > TIMESTAMP '2018-08-01 13:00:00' group by cn order by cnt0 desc limit 10)) and __time > TIMESTAMP '2018-08-01 13:00:00' group by cn, b order by cnt1 desc limit 20",
  "context" : {
    "sqlTimeZone" : "GMT"
  }
}

Real column names replaced by ***.

Version: 0.11.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions