Hi Mihir Kamdar, yes, there is.
The fix is to return NULL instead of error when doing a comparison on incompatible types, e.g. SELECT 1 < "string". Here are the steps to verify it:
- Try <, >, =, != and their combinations on incompatible types including arrays and records, e.g. {"name": "Dave"} = 3
- Use those comparison operators in a query:
SELECT 1 < "String";
|
SELECT [1,2] = 3;
|
|
FROM ds SELECT ds.f1, ds.f2 WHERE ds.int_value_field > "test";
|
FROM ds SELECT ds.f1, ds.f2 WHERE ds.record_value_field > [1, 2];
|
|
FROM ds1, ds2 SELECT ds1.f1, ds2.f1 WHERE ds1.int_value_field = ds2.string_value_field; // no tuples will join since comparison should return NULL
|
The fix is implemented by:
https://issues.apache.org/jira/browse/ASTERIXDB-1223
https://issues.apache.org/jira/browse/ASTERIXDB-2516
Moved to Mad-Hatter (with Sachin and Tai)