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

Explain query not work in MySQL client #531

Closed
francis-du opened this issue Nov 16, 2022 · 7 comments · Fixed by #546
Closed

Explain query not work in MySQL client #531

francis-du opened this issue Nov 16, 2022 · 7 comments · Fixed by #546
Assignees
Labels
C-bug Category Bugs

Comments

@francis-du
Copy link
Contributor

francis-du commented Nov 16, 2022

What type of bug is this?

Crash

What subsystems are affected?

Standalone mode

What happened?

image

What operating system did you use?

MBP Intel CPU

Relevant log output and stack trace

No response

How can we reproduce the bug?

Run query in MySQL client:

explain select * from numbers;
@francis-du francis-du added the C-bug Category Bugs label Nov 16, 2022
@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 16, 2022

MySQL protocol now only supports reading and writing data, more functionalities is under active developing. EXPLAIN will soon be supported.

@francis-du
Copy link
Contributor Author

How to support Explain syntax for this? can i try it?

@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 16, 2022

How to support Explain syntax for this? can i try it?

We'd appreciate any contribution, please reach us if you need any help!

As to implementing EXPLAIN statement in MySQL protocol, you need to first implement SQL parser for EXPLAIN keyword, and convert the statement to datafusion::logical_plan::plan::LogicalPlan::Explain in datafusion, execute the plan and then return to client.

@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 16, 2022

Anyway if MySQL protocol handler receives any statement that is currently not supported, it should return an UnsupportedError instead of just panicking. We will fix this.

@francis-du
Copy link
Contributor Author

How to support Explain syntax for this? can i try it?

We'd appreciate any contribution, please reach us if you need any help!

As to implementing EXPLAIN statement in MySQL protocol, you need to first implement SQL parser for EXPLAIN keyword, and convert the query following EXPLAIN to plans in datafusion, and serialize the plan to string and then return to client.

Thanks you, let me try. Can you assign this issue to me?

@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 16, 2022

How to support Explain syntax for this? can i try it?

We'd appreciate any contribution, please reach us if you need any help!
As to implementing EXPLAIN statement in MySQL protocol, you need to first implement SQL parser for EXPLAIN keyword, and convert the query following EXPLAIN to plans in datafusion, and serialize the plan to string and then return to client.

Thanks you, let me try. Can you assign this issue to me?

If you need any help, please reach us thru our slack channel.

@francis-du
Copy link
Contributor Author

francis-du commented Nov 16, 2022

Thanks for your help @v0y4g3r

@evenyag evenyag changed the title [Bug]: Explain query not work in MySQL client Explain query not work in MySQL client Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants