Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move internal grpc client to test crate #3798

Closed
MichaelScofield opened this issue Apr 25, 2024 · 1 comment · Fixed by #3820
Closed

Move internal grpc client to test crate #3798

MichaelScofield opened this issue Apr 25, 2024 · 1 comment · Fixed by #3820
Labels
good first issue Good for newcomers

Comments

@MichaelScofield
Copy link
Collaborator

What type of enhancement is this?

Refactor

What does the enhancement do?

For historic reason, there's an internal grpc client in crate "client" called "Database", for talking to Frontend's grpc service. Now it's mainly used in two places: one is in the cli data export tool, and the other is in tests. We can move the grpc client to test crate to make our codes more clear. And in the mean time, use other client (like mysql client, or simply http API) in our cli data export tool, to replace it.

Implementation challenges

No response

@tisonkun
Copy link
Collaborator

This is the related struct:

#[derive(Clone, Debug, Default)]
pub struct Database {
// The "catalog" and "schema" to be used in processing the requests at the server side.
// They are the "hint" or "context", just like how the "database" in "USE" statement is treated in MySQL.
// They will be carried in the request header.
catalog: String,
schema: String,
// The dbname follows naming rule as out mysql, postgres and http
// protocol. The server treat dbname in priority of catalog/schema.
dbname: String,
// The time zone indicates the time zone where the user is located.
// Some queries need to be aware of the user's time zone to perform some specific actions.
timezone: String,
client: Client,
ctx: FlightContext,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants