Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.6.0
-
Untriaged
-
0
-
Unknown
Description
CREATE INDEX ix10 ON default(c1,c2);
|
CREATE INDEX ix20 ON default(META().id);
|
|
EXPLAIN SELECT l.*, r.*
|
FROM default l
|
LEFT JOIN default r ON META(r).id = CASE WHEN l.c1 THEN l.c1 ELSE l.c2 END
|
WHERE l.c1 IS NULL;
|
explain select l.*, r.* FROM default l LEFT JOIN default r ON META(r).id = CASE WHEN l.c1 THEN l.c1 ELSE l.c2 END WHERE l.c1 IS NULL;
|
{
|
"requestID": "6ac8cc24-d773-4ae0-a4ac-310344d7b68b",
|
"signature": "json",
|
"results": [
|
{
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"plan": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexScan3",
|
"as": "l",
|
"index": "ix10",
|
"index_id": "c524d3940141056e",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "default",
|
"namespace": "default",
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
},
|
"spans": [
|
{
|
"exact": true,
|
"range": [
|
{
|
"high": "null",
|
"inclusion": 3,
|
"index_key": "`c1`",
|
"low": "null"
|
}
|
]
|
}
|
],
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"as": "l",
|
"keyspace": "default",
|
"namespace": "default",
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
}
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"alias": "l",
|
"condition": "((`l`.`c1`) is null)",
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
}
|
}
|
]
|
}
|
},
|
{
|
"#operator": "Join",
|
"as": "r",
|
"keyspace": "default",
|
"namespace": "default",
|
"on_filter": "((meta(`r`).`id`) is not null)",
|
"on_keys": "case when (`l`.`c1`) then (`l`.`c1`) else (`l`.`c2`) end",
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
},
|
"outer": true
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "((meta(`r`).`id`) is not null)",
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
}
|
},
|
{
|
"#operator": "InitialProject",
|
"discard_original": true,
|
"optimizer_estimates": {
|
"cardinality": 1.0842021724855044e-19,
|
"cost": 1000,
|
"fr_cost": 1000,
|
"size": 1
|
},
|
"preserve_order": true,
|
"result_terms": [
|
{
|
"expr": "`l`",
|
"star": true
|
},
|
{
|
"expr": "`r`",
|
"star": true
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
},
|
"text": "select l.*, r.* FROM default l LEFT JOIN default r ON META(r).id = CASE WHEN l.c1 THEN l.c1 ELSE l.c2 END WHERE l.c1 IS NULL;"
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "8.06713ms",
|
"executionTime": "7.913362ms",
|
"resultCount": 1,
|
"resultSize": 5136,
|
"serviceLoad": 3
|
}
|
}
|
JOIN should not have on_filter, inner side should not have Filter operator