Avoid unnecessary implicit cast in TiFlash
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the return-type compatibility check in dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp at the linked location. Trace how TiDB and TiFlash deduce native types and where implicit casts are added. Done means redundant casts are avoided while TiFlash still aligns function return types with TiDB; this umbrella issue requires choosing a concrete enhancement first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100