doris
doris copied to clipboard
[improvement](jdbc catalog) Disallow non-constant type conversion pushdown and implicit conversion pushdown
Add a variable jdbc_cast_expr_pushdown
, the default value is false, which prohibits the pushdown of non-constant predicates with type conversion and all predicates with implicit conversion. This change can prevent the wrong predicates from being pushed down to the Jdbc data source, resulting in query data errors, because the predicates with cast were not correctly pushed down to the data source before.
If you find that the data is read correctly and the performance is better before this change, you can manually set this variable to true
| Expression | Can Push Down |
|-----------------------------------------------------|---------------|
| column type equals const type | Yes |
| column type equals cast const type | Yes |
| cast column type equals const type | No |
| cast column type equals cast const type | No |
| column type not equals column type | No |
| column type not equals cast const type | No |
| cast column type not equals const type | No |
| cast column type not equals cast const type | No |