Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YCQL] JSONB dereferencing operators return ERROR when applying to NULL input #6766

Closed
nocaway opened this issue Dec 29, 2020 · 1 comment
Closed
Assignees
Labels
kind/bug This issue is a bug

Comments

@nocaway
Copy link
Contributor

nocaway commented Dec 29, 2020

In the following example, SELECT statement should have been valid, and the output for jsonb access operator should have been NULL. However, YugaByte returns error.

ycqlsh:test> CREATE TABLE tab( h INT, r INT, v INT, j JSONB, PRIMARY KEY (h, r))   with transactions = {'enabled' : true};
ycqlsh:test> INSERT INTO tab(h, r, v) VALUES (7, 14, 21);
ycqlsh:test> select j->>'a' from tab;
ServerError: Server Error. Not enough data to process
select j->>'a' from tab;
^^^^^^
 (ql error -2)
@nocaway nocaway added the kind/bug This issue is a bug label Dec 29, 2020
@nocaway nocaway self-assigned this Dec 29, 2020
nocaway added a commit that referenced this issue Dec 30, 2020
Summary: Checked for NULL objects before applying the operators.

Test Plan: Update TestJson and TestJsonIndex

Reviewers: oleg, zyu, mihnea

Reviewed By: zyu, mihnea

Subscribers: mihnea, zyu, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D10237
nocaway added a commit that referenced this issue Dec 30, 2020
…o NULL objects

Summary: Backport to 2.1

Test Plan: Run TestJson

Differential Revision: https://phabricator.dev.yugabyte.com/D10242
nocaway added a commit that referenced this issue Dec 30, 2020
…o NULL objects

Summary: Back port to 2.2

Test Plan: TestJson and TestJsonIndex

Differential Revision: https://phabricator.dev.yugabyte.com/D10243
@nocaway
Copy link
Contributor Author

nocaway commented Dec 30, 2020

Fixed in master and backported to 2.1, 2.2, and 2.4.

@nocaway nocaway closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant