You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this can apply inverted index on strCol just fine in V1 b/c V1 engine is not type-aware; thus the filter clause gets converted into =(strCol, '123')
this will be translated to CAST(strCol AS INT) = 123 in V2 b/c it is type-aware and b/c of this function application, it doesn't apply index properly.
There's 2 solutions
do not allow these type of implicit type casting at all (e.g. query must explicitly ask for CAST or failed type mismatch) this will avoid the potential performance degradation but will make some V1 query backward-incompatible
do the smart rewrite rule to convert this to a left-cast not a right-cast; this will potentially have many corner cases to handle.
query like
strColjust fine in V1 b/c V1 engine is not type-aware; thus the filter clause gets converted into=(strCol, '123')CAST(strCol AS INT) = 123in V2 b/c it is type-aware and b/c of this function application, it doesn't apply index properly.There's 2 solutions