This PR contains some searching logic extensions related to supporting JOIN queries in search queries.
What we would like to support:
The same ComprasionExpression as currently supported but in JOIN ON statements;
Current searchable logic expect SQLVal in comparison expression to be able to calculate some hash, so the following JOINS queries JOIN table t ON t.search_column = t2.some_column is not supported with searchable encryption. The corresponding log warning was added that can simplify debugging in such scenarios.
However, queries like JOIN table t ON t.search_column_1 = t2.searchable_column_2 are suitable only for searchable encryption, so in such scenarios we need to transform the query to the following JOIN table t ON substring(t.search_column_1, 1, <HMAC_size>) = substring(t2.searchable_column_2, 1, <HMAC_size>)
This PR contains some searching logic extensions related to supporting JOIN queries in search queries.
What we would like to support:
JOIN ON
statements;SQLVal
in comparison expression to be able to calculate some hash, so the following JOINS queriesJOIN table t ON t.search_column = t2.some_column
is not supported with searchable encryption. The corresponding log warning was added that can simplify debugging in such scenarios.JOIN table t ON t.search_column_1 = t2.searchable_column_2
are suitable only for searchable encryption, so in such scenarios we need to transform the query to the followingJOIN table t ON substring(t.search_column_1, 1, <HMAC_size>) = substring(t2.searchable_column_2, 1, <HMAC_size>)
Checklist