-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] TS crash if a built-in function argument is a collection #1944
Comments
Call stack:
Local vars:
|
The failed statement: In the statement analysis we have the following part of parser tree: To handle some built-in functions the function arguments must be saved into PB (to be sent to the server & processed on the DocDB level).
To fix it all elements in Collections must be analyzed to setup the expected type.
|
But there is a tricky case.. See the example:
Here we have built-in function: To prevent the statement
And to raise a error if the unresolved PTRef is tried to be save into PB. Possible alternative ways I see:
Let's discuss the solution.. CC: @frozenspider @nocaway |
I think that Also, I'm not sure that |
That's valid. The case works in YB & Cassandra:
|
[Neil]: I have similar thoughts with Alex for this bug. It's a bug in "cql_cast" error check and not a bug in argument datatype.
|
[Oleg]: If I understand correctly you want to undo changes in PBCollection::Anaylize() and just prevent the parametric args processing in PBCall [Oleg]: Do we need such syntax in such case? ToJson( [1,2] ) |
…lection. Summary: Fixed PTBCall::Analyze() - to prevent usage of parametric types with failed BCalls. Plus minor clean-up in macros. Test Plan: ybd --cxx-test ql-insert-table-test ybd --cxx-test ql-query-test ybd --cxx-test ql_ql-select-expr-test Reviewers: mihnea, dmitry, neil Reviewed By: neil Subscribers: alex, eng Differential Revision: https://phabricator.dev.yugabyte.com/D6986
Fixed. (See commit above.) |
Scenario:
Error in the log:
F.... eval_const.cc:200] Illegal datatype conversion: varint to unknown
Code:
Reason:
PTConstVarInt::expected_internal_type_ == {yb::InternalType} VALUE_NOT_SET
.The text was updated successfully, but these errors were encountered: