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

Keep the original SQL for CreateExternalTable::definition #12652

Open
davisp opened this issue Sep 27, 2024 · 1 comment · May be fixed by #12653
Open

Keep the original SQL for CreateExternalTable::definition #12652

davisp opened this issue Sep 27, 2024 · 1 comment · May be fixed by #12653
Labels
enhancement New feature or request

Comments

@davisp
Copy link
Member

davisp commented Sep 27, 2024

Is your feature request related to a problem or challenge?

Currently, the CreateExternalTable definition is just a stringified version of the statement, rather than the original SQL that was parsed.

Describe the solution you'd like

I'd like to propose capturing the original SQL as provided and storing that instead so that when a definition is displayed, it matches what a user originally provided.

Describe alternatives you've considered

Nothing comes to mind. Its a fairly small change.

Additional context

No response

@davisp davisp added the enhancement New feature or request label Sep 27, 2024
@davisp davisp linked a pull request Sep 27, 2024 that will close this issue
@davisp
Copy link
Member Author

davisp commented Sep 27, 2024

I've opened a draft PR to show that there's a what appears to be a reasonable approach to handling this if anyone is interested in checking that out. I'm fully aware that its a bit hacky and a proper PR will likely involve splitting some of the logic into the sqlparser crate which I'm more than happy to do as a precondition. I just didn't want to invest that much time in pursuing this until there's some general agreement that this is even a desirable change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant