horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Tracking issue for sql supporting

Open Rachelint opened this issue 2 years ago • 3 comments

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

Rachelint avatar Jul 27 '22 09:07 Rachelint

Maybe CeresDB can fork sqlparser for secondary development on its basis?

dust1 avatar Jul 28 '22 00:07 dust1

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

waynexia avatar Jul 28 '22 01:07 waynexia

@dust1 @waynexia I intend to refactor as #155 temporarily. But I think it's still no so good.

Rachelint avatar Jul 28 '22 05:07 Rachelint

This issue is kinds of stale, closing since no obvious work need to do now.

jiacai2050 avatar Mar 02 '23 13:03 jiacai2050