K2InformaticsGmbH / imem

Clustered in-memory database based on MNESIA with simple SQL layer
http://www.k2informatics.ch/
Apache License 2.0
21 stars 4 forks source link

failing JSON path SQL condition #303

Open stoch opened 5 years ago

stoch commented 5 years ago

image

imem_statement  generate_virtual_data   928

Unsupported virtual join bound filter guard [{imem_statement,'-generate_virtual_data/4-fun-20-',1,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,928}]},{imem_statement,join_virtual,5,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,876}]},{imem_statement,'-join_row/5-lc$^0/1-1-',5,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,840}]},{imem_statement,join_row,5,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,840}]},{imem_statement,join_rows,6,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,833}]},{imem_statement,handle_info,2,[{file,"d:/build/cpro/_build/default/lib/imem/src/imem_statement.erl"},{line,573}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,616}]}]

[{ex,'UnimplementedException'}
,{string,{'and'
         ,{is_like
          ,{to_binstr,'$32'}
          ,<<"138.188.83.%">>
          }
         ,{is_member
          ,'$32'
          ,[<<"10.222.38.200">>
           ,<<"10.231.2.81">>
           ,<<"10.232.2.91">>
           ,<<"10.29.10.202">>
           ,<<"10.59.40.58">>
           ,<<"10.59.40.72">>
           ,<<"138.188.83.254">>
           ,<<"178.199.69.169">>
           ,<<"213.3.36.208">>
           ]
          }
         }
 }
]
stoch commented 5 years ago

Reproduce with:

select
    ckey, to_binstr(wl.item)
from
    cpro.SMPPP,
    string wl
where
    to_binstr(wl.item) like '138.188.83%'
    and is_member(wl.item, cvalue|:Whitelist#keys|)
order by
    1 asc