greptimedb
greptimedb copied to clipboard
REPL for the new region server
What type of enhancement is this?
Refactor
What does the enhancement do?
REPL
is bound in the universal greptime
binary. It's a convenient tools for debugging datanode.
After we migrated to region server https://github.com/GreptimeTeam/greptimedb/pull/2364, datanode now only handles queries in logical plan, and only for one region. The previous REPL impl is broken as it still passes SQL and table queries. We should make some necessary changes to make REPL work again.
Implementation challenges
- Emit logical plan instead of SQL
- Connect to meta server to retrieve table route info.
- Do partial query on regions that exist in the connected datanode
For the new REPL, I think we can simply support these two features: 1. connect to Frontend only, and 2. submit SQLs. In this way, we'll get a cli client to talk to greptimedb in grpc interface, good for testing grpc service, and useful when there're no other cli client like mysql or psql.