When building lookups for IndexedTableAccess, we always convert the key type to the columns type.
This is problematic when the key can't be converted to the column type without error.
The expressions used in Filters properly handle this conversion, so we should default to that.
Example:
tmp/main*> create table t (i int primary key);
tmp/main*> select * from t where i = json_array();
error: '[]interface {}' is not a valid value type for 'int'
This doesn't errror in MySQL. Also without a primary key or secondary index, the query succeeds in dolt.
When building lookups for
IndexedTableAccess
, we always convert the key type to the columns type. This is problematic when the key can't be converted to the column type without error.The expressions used in
Filters
properly handle this conversion, so we should default to that.Example:
This doesn't errror in MySQL. Also without a primary key or secondary index, the query succeeds in dolt.