greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

REPL for the new region server

Open waynexia opened this issue 1 year ago • 1 comments

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

waynexia avatar Sep 13 '23 03:09 waynexia

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.

MichaelScofield avatar Apr 11 '24 07:04 MichaelScofield