blob: 08050bf040774c55bf56fce728c9c005ae2864c7 [file]
# testSelectOnLookupUsingRightJoinOperator@all_disabled case-crc:d750dd9d
# quidem testcase reason: SLIGHTLY_WORSE_FILTER_PUSHED_TO_JOIN_OPERAND
!set debug true
!set defaultTimeout 300000
!set enableJoinFilterRewrite false
!set enableJoinFilterRewriteValueColumnFilters false
!set enableRewriteJoinToFilter false
!set maxScatterGatherBytes 9223372036854775807
!set plannerStrategy DECOUPLED
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
!set sqlQueryId dummy
!set outputformat mysql
!use druidtest:///
SELECT dim1, lookyloo.*
FROM foo RIGHT JOIN lookup.lookyloo ON foo.dim1 = lookyloo.k
WHERE lookyloo.v <> 'xxx' OR lookyloo.v IS NULL;
+------+-----------+--------------+
| dim1 | k | v |
+------+-----------+--------------+
| abc | abc | xabc |
| | 6 | x6 |
| | a | xa |
| | nosuchkey | mysteryvalue |
+------+-----------+--------------+
(4 rows)
!ok
LogicalJoin(condition=[=($0, $1)], joinType=[right])
LogicalProject(dim1=[$1])
LogicalTableScan(table=[[druid, foo]])
LogicalFilter(condition=[SEARCH($1, Sarg[(-∞..'xxx':VARCHAR), ('xxx':VARCHAR..+∞); NULL AS TRUE]:VARCHAR)])
LogicalTableScan(table=[[lookup, lookyloo]])
!logicalPlan
DruidJoin(condition=[=($0, $1)], joinType=[right])
DruidProject(dim1=[$1], druid=[logical])
DruidTableScan(table=[[druid, foo]], druid=[logical])
DruidFilter(condition=[SEARCH($1, Sarg[(-∞..'xxx':VARCHAR), ('xxx':VARCHAR..+∞); NULL AS TRUE]:VARCHAR)])
DruidTableScan(table=[[lookup, lookyloo]], druid=[logical])
!druidPlan
{
"queryType" : "scan",
"dataSource" : {
"type" : "join",
"left" : {
"type" : "table",
"name" : "foo"
},
"right" : {
"type" : "query",
"query" : {
"queryType" : "scan",
"dataSource" : {
"type" : "lookup",
"lookup" : "lookyloo"
},
"intervals" : {
"type" : "intervals",
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
},
"resultFormat" : "compactedList",
"filter" : {
"type" : "or",
"fields" : [ {
"type" : "null",
"column" : "v"
}, {
"type" : "not",
"field" : {
"type" : "equals",
"column" : "v",
"matchValueType" : "STRING",
"matchValue" : "xxx"
}
} ]
},
"columns" : [ "k", "v" ],
"columnTypes" : [ "STRING", "STRING" ],
"granularity" : {
"type" : "all"
},
"legacy" : false
}
},
"rightPrefix" : "j0.",
"condition" : "(\"dim1\" == \"j0.k\")",
"joinType" : "RIGHT"
},
"intervals" : {
"type" : "intervals",
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
},
"resultFormat" : "compactedList",
"columns" : [ "dim1", "j0.k", "j0.v" ],
"columnTypes" : [ "STRING", "STRING", "STRING" ],
"granularity" : {
"type" : "all"
},
"legacy" : false
}
!nativePlan