Details
Description
When there is a relevant secondary index and one tries to query it with placeholders (positional parameters or named parameters), the request fails due to a JSON marshalling issue.
To see it on beer-sample in cbq, first create an appropriate index:
CREATE INDEX cities ON `beer-sample` (city);
A few queries that work (the one with placeholder just complains that no value was passed for $1):
SELECT * FROM `beer-sample` WHERE city = 'Wrzburg';
SELECT * FROM `beer-sample` WHERE city = $1;
EXPLAIN SELECT * FROM `beer-sample` WHERE city = 'Wrzburg';
But explain and prepare with the placeholder fail:
EXPLAIN SELECT * FROM `beer-sample` WHERE city = $1;
PREPARE SELECT * FROM `beer-sample` WHERE city = $city;
The response is:
cbq> EXPLAIN SELECT * FROM `beer-sample` WHERE city = $city;
{
"requestID": "716c77ff-8120-4433-82bc-2dc10691b34e",
"signature": "json",
"results": [
],
"errors": [
],
"status": "stopped",
"metrics":
}
Attachments
Issue Links
- is triggering
-
JCBC-714 Calling Secondary Index gets "error calling MarshalJSON "
- Resolved
For Gerrit Dashboard: MB-13597 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
47933,2 | Enable json marshalling of Spans in IndexScan. Fixes MB-13597. | master | query | Status: MERGED | +2 | +1 |
47996,1 | Enable json marshalling of Spans in IndexScan. Fixes MB-13597. | master | query | Status: ABANDONED | 0 | 0 |