In TDV version 8.3 HF-004, there has been a change in default value for "
SELECT {
option "
FORCE_ESTIMATION" } " parameter, which has been changed from -1 to 2. This update allows the query optimizer to perform cardinality estimation on query operators and query columns when statistics on the underlying query tables are available. However, this change may throw the exception when using CAST function as explained above.
Note: By default, in TDV v7.x and 8.3 the Postgres Database also throws the same exception whereas MS SQL Server does not.
To bypass this exception, change the CAST('' as INTEGER) to CAST(NULL as INTEGER).