Actually, we are querying our customized plugin. We need get the SQL condition and send query to data source. But for the SQL plan, which is common logic for all plugins. I test the JSON data, it still miss the condition.
Version: 4.1.1-201912191016540894-05db06db
Below is a query sameple.
select id from table_1 where field_1 <> 'ABC' and field_1 is not null
I tested the JSON query, for the SQL plan, the “IS NOT NULL” will be removed, but the final result will check “IS NOT NULL”. Could you advise where to apply the query filters for the FIleSystem Data source?
I did more testing, seems if there is not equal, it will remove the NULL cause, which is unexpected.
Could you let me know the code where remove the NULL result?
It seems calcite is resolving it correctly. Any evaluation of SQL expression is against not-null values. So to put:
something <> ‘ABC’
“something” above has to be not-null before above can be evaluated. So, indicating that “something” to be ‘is not null’ over again is logically not required when a literal evaluation is already a condition in the where-clause.