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

Like condition fails with Json Path expression #210

Open
stoch opened this issue Jul 2, 2018 · 0 comments
Open

Like condition fails with Json Path expression #210

stoch opened this issue Jul 2, 2018 · 0 comments
Assignees
Labels

Comments

@stoch
Copy link
Contributor

stoch commented Jul 2, 2018

SELECT
    a.ckey, a.cvalue|:SUBMITPASS|, c.cvalue|:SHORTID|
FROM
    tpac a,
    tpac c
WHERE
    length(a.ckey) = 5
    AND safe_string(nth(3, a.ckey)) = to_string('lacon')
    AND safe_string(nth(5, a.ckey)) = to_string('access')
    AND c.ckey = slice(a.ckey, 1, 4)
    AND a.cvalue|:SUBMITPASS| LIKE '%' || c.cvalue|:SHORTID| || '%'

After adding the last condition, the query execution fails:

ClientError: {"Cannot evaluate pruned where clause", {3, {'and', {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0,undefined, false,undefined,undefined, {'and', {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0,undefined, false,undefined,undefined, {'and', {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0, undefined,false,undefined,undefined, {'and', {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0, undefined,false,undefined,undefined, {'==', {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,false,undefined,undefined, {length, {bind,0,0,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,term, undefined,undefined,'$not_a_value',false,undefined,undefined, {from_binterm, {bind,2,2,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,binterm, undefined,undefined,'$not_a_value',false,undefined,undefined, undefined,'$22'}}, '$22'}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,true,undefined,undefined,5,[]}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0, undefined,false,undefined,undefined, {'==', {bind,0,0,undefined,undefined,undefined,undefined,string,0,0, undefined,false,undefined,undefined, {safe_string, {bind,0,0,undefined,undefined,undefined,undefined,term,0,0, undefined,false,undefined,undefined, {nth, {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,true,undefined,undefined,3,[]}, {bind,0,0,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,term, undefined,undefined,'$not_a_value',false,undefined,undefined, {from_binterm, {bind,2,2,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>, binterm,undefined,undefined,'$not_a_value',false,undefined, undefined,undefined,'$22'}}, '$22'}}, []}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,string,0,0, undefined,false,undefined,undefined, {to_string, {bind,0,0,undefined,undefined,undefined,undefined,binstr,0,0, <<>>,true,undefined,undefined,<<"lacon">>,[]}}, []}}, []}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0, undefined,false,undefined,undefined, {'==', {bind,0,0,undefined,undefined,undefined,undefined,string,0,0, undefined,false,undefined,undefined, {safe_string, {bind,0,0,undefined,undefined,undefined,undefined,term,0,0, undefined,false,undefined,undefined, {nth, {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,true,undefined,undefined,5,[]}, {bind,0,0,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,term, undefined,undefined,'$not_a_value',false,undefined,undefined, {from_binterm, {bind,2,2,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,binterm, undefined,undefined,'$not_a_value',false,undefined,undefined, undefined,'$22'}}, '$22'}}, []}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,string,0,0, undefined,false,undefined,undefined, {to_string, {bind,0,0,undefined,undefined,undefined,undefined,binstr,0,0,<<>>, true,undefined,undefined,<<"access">>,[]}}, []}}, []}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0,undefined, false,undefined,undefined, {'==', {bind,0,0,undefined,undefined,undefined,undefined,binstr,0,0, undefined,false,undefined,undefined, {slice, {bind,0,0,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,term,undefined, undefined,'$not_a_value',false,undefined,undefined, {from_binterm, {bind,2,2,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"ckey">>,binterm, undefined,undefined,'$not_a_value',false,undefined,undefined, undefined,'$22'}}, '$22'}, {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,true,undefined,undefined,1,[]}, {bind,0,0,undefined,undefined,undefined,undefined,integer,0,0, undefined,true,undefined,undefined,4,[]}}, []}, {bind,0,0,<<"sbsgui">>,<<"tpac">>,<<"c">>,<<"ckey">>,term,undefined, undefined,'$not_a_value',false,undefined,undefined, {from_binterm, {bind,3,2,<<"sbsgui">>,<<"tpac">>,<<"c">>,<<"ckey">>,binterm, undefined,undefined,'$not_a_value',false,undefined,undefined, undefined,'$32'}}, '$32'}}, []}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,boolean,0,0,undefined, false,undefined,undefined, {is_like, {bind,0,0,undefined,undefined,undefined,undefined,json,0,0,undefined, false,undefined,undefined, {json_value,<<"SUBMITPASS">>, {bind,2,3,<<"sbsgui">>,<<"tpac">>,<<"a">>,<<"cvalue">>,binstr, undefined,undefined, <<"fun(R) -> imem_dal_skvh:is_row_type(binary,R) end.">>,false, undefined,undefined,undefined,'$23'}}, []}, {bind,0,0,undefined,undefined,undefined,undefined,json,0,0,undefined, false,undefined,undefined, {concat, {json_to_list, {bind,0,0,undefined,undefined,undefined,undefined,binstr,0,0,<<>>, true,undefined,undefined,<<"%">>,[]}}, {json_to_list, {bind,0,0,undefined,undefined,undefined,undefined,json,0,0,undefined, false,undefined,undefined, {concat, {json_to_list, {bind,0,0,undefined,undefined,undefined,undefined,json,0,0, undefined,false,undefined,undefined, {json_value,<<"SHORTID">>, {bind,3,3,<<"sbsgui">>,<<"tpac">>,<<"c">>,<<"cvalue">>,binstr, undefined,undefined, <<"fun(R) -> imem_dal_skvh:is_row_type(binary,R) end.">>,false, undefined,undefined,undefined,'$33'}}, []}}, {json_to_list, {bind,0,0,undefined,undefined,undefined,undefined,binstr,0,0,<<>>, true,undefined,undefined,<<"%">>,[]}}}, []}}}, []}}, []}}}}
@stoch stoch added the bug label Jul 2, 2018
@stoch stoch added this to the 2.5.0 milestone Jul 2, 2018
@stoch stoch self-assigned this Jul 2, 2018
@stoch stoch changed the title Like condition fails Like condition fails with Json Path expression Jul 2, 2018
@c-bik c-bik removed this from the 2.5.0 milestone Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants