tidb
tidb copied to clipboard
Correlated subquery will not build index ranges when the it is contained by a scalar function
Enhancement
We support constructing index ranges with correlated columns. But only support the most simple case col op cor_col.
But we'll fail to do it when the correlated column is contained by a scalar function, like col op cor_col while they have different types. In this case the final expr will become col op cast(cor_col), which will fail to construct index ranges.