Consider the following scenario:
- You use a database with the compatibility level set to 130 in Microsoft SQL Server 2016.
- You execute a query that accesses a column store index and a row store index or a heap, and includes a filter predicate (WHERE clause).
In addition, if the query uses an expression (such as type conversion) where its correctness depends on filtered data (for example, a char table column is converted to int, but only a subset of values contain a valid int representation, and this subset is identified by the filter predicate), then the query may fail with a data conversion error that resembles one of the following:
Conversion failed when converting the varchar value '0.5' to data type int.
Msg 8114, Level 16, State 5, Line 34
Error converting data type varchar to bigint.