Type deduction systems in TiFlash and TiDB are independent with each other, that means even for the same function with the same input arguments, the result type may be different in TiDB and TiFlash, in order to make TiFlash compatible with TiDB, after compiling a function, TiFlash will check if the return type is the same as TiDB, if not, an implicit cast will be added to force aligning the type.
Enhancement
These implicit cast brings a lot of redundant computation, we need to avoid this by improving the native type deduction system in TiDB/TiFlash
This is an umbrella issue for all the enhancement related to avoiding unnecessary implicit cast.
Background
Type deduction systems in TiFlash and TiDB are independent with each other, that means even for the same function with the same input arguments, the result type may be different in TiDB and TiFlash, in order to make TiFlash compatible with TiDB, after compiling a function, TiFlash will check if the return type is the same as TiDB, if not, an implicit cast will be added to force aligning the type.
Enhancement
These implicit cast brings a lot of redundant computation, we need to avoid this by improving the native type deduction system in TiDB/TiFlash
This is an umbrella issue for all the enhancement related to avoiding unnecessary implicit cast.