| # testRequireTimeConditionPositive3 case-crc:6a929fbc |
| # quidem testcase reason: JOIN_FILTER_LOCATIONS |
| !set debug true |
| !set defaultTimeout 300000 |
| !set maxScatterGatherBytes 9223372036854775807 |
| !set plannerStrategy DECOUPLED |
| !set requireTimeCondition true |
| !set sqlCurrentTimestamp 2000-01-01T00:00:00Z |
| !set sqlQueryId dummy |
| !set outputformat mysql |
| !use druidtest:/// |
| SELECT COUNT(*) FROM druid.foo |
| WHERE __time >= '2000-01-01' AND SUBSTRING(dim2, 1, 1) IN ( |
| SELECT SUBSTRING(dim1, 1, 1) FROM druid.foo |
| WHERE dim1 <> '' AND __time >= '2000-01-01' |
| ); |
| +--------+ |
| | EXPR$0 | |
| +--------+ |
| | 3 | |
| +--------+ |
| (1 row) |
| |
| !ok |
| LogicalAggregate(group=[{}], EXPR$0=[COUNT()]) |
| LogicalJoin(condition=[=($0, $1)], joinType=[inner]) |
| LogicalProject($f2=[SUBSTRING($2, 1, 1)]) |
| LogicalFilter(condition=[>=($0, 2000-01-01 00:00:00)]) |
| LogicalTableScan(table=[[druid, foo]]) |
| LogicalAggregate(group=[{0}]) |
| LogicalProject(EXPR$0=[SUBSTRING($1, 1, 1)]) |
| LogicalFilter(condition=[AND(<>($1, ''), >=($0, 2000-01-01 00:00:00))]) |
| LogicalTableScan(table=[[druid, foo]]) |
| |
| !logicalPlan |
| DruidAggregate(group=[{}], EXPR$0=[COUNT()], druid=[logical]) |
| DruidJoin(condition=[=($0, $1)], joinType=[inner]) |
| DruidProject($f2=[SUBSTRING($2, 1, 1)], druid=[logical]) |
| DruidFilter(condition=[>=($0, 2000-01-01 00:00:00)]) |
| DruidTableScan(table=[[druid, foo]], druid=[logical]) |
| DruidAggregate(group=[{0}], druid=[logical]) |
| DruidProject(EXPR$0=[SUBSTRING($1, 1, 1)], druid=[logical]) |
| DruidFilter(condition=[AND(<>($1, ''), >=($0, 2000-01-01 00:00:00))]) |
| DruidTableScan(table=[[druid, foo]], druid=[logical]) |
| |
| !druidPlan |
| { |
| "queryType" : "timeseries", |
| "dataSource" : { |
| "type" : "join", |
| "left" : { |
| "type" : "query", |
| "query" : { |
| "queryType" : "scan", |
| "dataSource" : { |
| "type" : "table", |
| "name" : "foo" |
| }, |
| "intervals" : { |
| "type" : "intervals", |
| "intervals" : [ "2000-01-01T00:00:00.000Z/146140482-04-24T15:36:27.903Z" ] |
| }, |
| "virtualColumns" : [ { |
| "type" : "expression", |
| "name" : "v0", |
| "expression" : "substring(\"dim2\", 0, 1)", |
| "outputType" : "STRING" |
| } ], |
| "resultFormat" : "compactedList", |
| "columns" : [ "v0" ], |
| "columnTypes" : [ "STRING" ], |
| "granularity" : { |
| "type" : "all" |
| }, |
| "legacy" : false |
| } |
| }, |
| "right" : { |
| "type" : "query", |
| "query" : { |
| "queryType" : "groupBy", |
| "dataSource" : { |
| "type" : "table", |
| "name" : "foo" |
| }, |
| "intervals" : { |
| "type" : "intervals", |
| "intervals" : [ "2000-01-01T00:00:00.000Z/146140482-04-24T15:36:27.903Z" ] |
| }, |
| "virtualColumns" : [ { |
| "type" : "expression", |
| "name" : "v0", |
| "expression" : "substring(\"dim1\", 0, 1)", |
| "outputType" : "STRING" |
| } ], |
| "filter" : { |
| "type" : "not", |
| "field" : { |
| "type" : "equals", |
| "column" : "dim1", |
| "matchValueType" : "STRING", |
| "matchValue" : "" |
| } |
| }, |
| "granularity" : { |
| "type" : "all" |
| }, |
| "dimensions" : [ { |
| "type" : "default", |
| "dimension" : "v0", |
| "outputName" : "d0", |
| "outputType" : "STRING" |
| } ], |
| "limitSpec" : { |
| "type" : "NoopLimitSpec" |
| } |
| } |
| }, |
| "rightPrefix" : "j0.", |
| "condition" : "(\"v0\" == \"j0.d0\")", |
| "joinType" : "INNER" |
| }, |
| "intervals" : { |
| "type" : "intervals", |
| "intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ] |
| }, |
| "granularity" : { |
| "type" : "all" |
| }, |
| "aggregations" : [ { |
| "type" : "count", |
| "name" : "a0" |
| } ] |
| } |
| !nativePlan |