Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.0.3, 6.5.0
-
Untriaged
-
Yes
Description
It has right plan in 5.5.x
create index ix1 on default(c1); |
EXPLAIN SELECT 1 FROM default AS d UNNEST d.a1 AS a WHERE d.c1 != 10 AND d.c1 = a.u1; |
"spans": [ |
{
|
"range": [ |
{
|
"high": "(`a`.`u1`)", |
"inclusion": 3, |
"low": "(`a`.`u1`)" |
}
|
]
|
}
|
],
|
The span contains UNNEST alias which we are not known. This will cause panic
_time=2020-02-27T14:23:36.446-08:00 _level=SEVERE _msg=panic: runtime error: invalid memory address or nil pointer dereference |
_time=2020-02-27T14:23:36.446-08:00 _level=SEVERE _msg=request text: <ud>SELECT 1 FROM default AS d UNNEST d.a1 AS a WHERE d.c1 != 10 AND d.c1 = a.u1;</ud> |
_time=2020-02-27T14:23:36.446-08:00 _level=SEVERE _msg=stack: goroutine 4424 [running]: |
github.com/couchbase/query/execution.(*Context).Recover(0xc0000bf6c0, 0x0) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/context.go:653 +0xbb |
panic(0x5210440, 0x66c6640) |
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2 |
github.com/couchbase/query/expression.(*Identifier).Evaluate(0xc00176a480, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0xc000f46000, 0x8, 0x1, 0xf) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/identifier.go:64 +0x22 |
github.com/couchbase/query/expression.(*BinaryFunctionBase).BinaryEval(0xc000a45720, 0x56f9860, 0xc000a45720, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0x7d7d30313231, 0x20, 0x28, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/function.go:395 +0xbf |
github.com/couchbase/query/expression.(*Field).Evaluate(0xc000a45720, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0x2243505247737466, 0x66222c303331393a, 0xc000f71bf0, 0x400e6f8) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/nav_field.go:52 +0x70 |
github.com/couchbase/query/execution.evalOne(0x575f420, 0xc000a45720, 0xc0000bf6c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x69222c3530313900) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_util.go:21 +0x1ce |
github.com/couchbase/query/execution.evalSpan2(0xc00182cea0, 0x1, 0x2, 0x0, 0x0, 0xc0000bf6c0, 0x6464222c22363962, 0x75227b3a2273636f, 0x6f702f223a226972, 0x616665642f736c6f, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index2.go:200 +0x115 |
github.com/couchbase/query/execution.evalSpan3(0xc00182cea0, 0x1, 0x2, 0x0, 0x0, 0x0, 0xc0000bf6c0, 0xc001cc8ba0, 0x1, 0xc000930ec8, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:234 +0x944 |
github.com/couchbase/query/execution.(*IndexScan3).scan(0xc000bff680, 0xc0000bf6c0, 0xc000fb8900, 0x0, 0x0) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:156 +0xf9 |
created by github.com/couchbase/query/execution.(*IndexScan3).RunOnce.func1
|
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:68 +0x2ff |
|
goroutine 4424 [running]: |
github.com/couchbase/query/execution.(*Context).Recover(0xc0000bf6c0, 0x0) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/context.go:653 +0xbb |
panic(0x5210440, 0x66c6640) |
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2 |
github.com/couchbase/query/expression.(*Identifier).Evaluate(0xc00176a480, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0xc000f46000, 0x8, 0x1, 0xf) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/identifier.go:64 +0x22 |
github.com/couchbase/query/expression.(*BinaryFunctionBase).BinaryEval(0xc000a45720, 0x56f9860, 0xc000a45720, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0x7d7d30313231, 0x20, 0x28, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/function.go:395 +0xbf |
github.com/couchbase/query/expression.(*Field).Evaluate(0xc000a45720, 0x0, 0x0, 0x5727b40, 0xc0000bf6c0, 0x2243505247737466, 0x66222c303331393a, 0xc000f71bf0, 0x400e6f8) |
/Users/sitaram/master/query/src/github.com/couchbase/query/expression/nav_field.go:52 +0x70 |
github.com/couchbase/query/execution.evalOne(0x575f420, 0xc000a45720, 0xc0000bf6c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x69222c3530313900) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_util.go:21 +0x1ce |
github.com/couchbase/query/execution.evalSpan2(0xc00182cea0, 0x1, 0x2, 0x0, 0x0, 0xc0000bf6c0, 0x6464222c22363962, 0x75227b3a2273636f, 0x6f702f223a226972, 0x616665642f736c6f, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index2.go:200 +0x115 |
github.com/couchbase/query/execution.evalSpan3(0xc00182cea0, 0x1, 0x2, 0x0, 0x0, 0x0, 0xc0000bf6c0, 0xc001cc8ba0, 0x1, 0xc000930ec8, ...) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:234 +0x944 |
github.com/couchbase/query/execution.(*IndexScan3).scan(0xc000bff680, 0xc0000bf6c0, 0xc000fb8900, 0x0, 0x0) |
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:156 +0xf9 |
created by github.com/couchbase/query/execution.(*IndexScan3).RunOnce.func1
|
/Users/sitaram/master/query/src/github.com/couchbase/query/execution/scan_index3.go:68 +0x2ff |
Attachments
Issue Links
- is triggered by
-
MB-30970 Unnest scan does not choose union scan when unnest predicate has OR clause
- Closed