horaedb
horaedb copied to clipboard
Tracking issue for sql supporting
Description
Support for SQL is very important, but it is far from perfect in ceresdb now. Now there are some deficiencies as follow:
- Tests are not enough.
- SQL grammar support is not enough.
- Bugs in supported SQL grammar.
- The implementation of dialect is too rough(partly due to the insufficient scalability of sqlparser).
Proposal
- We plan to add and test sqls related to system table,ud,tpch first, and continue to improve after. The main works on this part are extending related sqls, adding testcases and fixing found bugs.
- About refactoring the parser to support dialect, it seems hard if still using sqlparser crate (see issue) If you have a good idea, you can put the proposal forward.
Additional context
Maybe CeresDB can fork sqlparser for secondary development on its basis?
The sql/parser
submod is a kind of hard-fork. So fork and/or wrap our dialect on top of it could be an option. https://github.com/CeresDB/ceresdb/blob/21bc3e51bd03890a2998919b2d405ab3adc1b8b4/sql/src/parser.rs#L374
@dust1 @waynexia I intend to refactor as #155 temporarily. But I think it's still no so good.
This issue is kinds of stale, closing since no obvious work need to do now.