Skip to content

Parse identifiers function #805

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

Closed
Jefffrey opened this issue Feb 6, 2023 · 2 comments · Fixed by #860
Closed

Parse identifiers function #805

Jefffrey opened this issue Feb 6, 2023 · 2 comments · Fixed by #860

Comments

@Jefffrey
Copy link
Contributor

Jefffrey commented Feb 6, 2023

Extract function from datafusion to here

https://github.com/apache/arrow-datafusion/blob/d5077b55ef39e5376ace93d4e9068b94b678e7f1/datafusion/common/src/table_reference.rs#L228-L279

Allowing use of this function to parse a string containing identifiers (not a SQL string)

@AugustoFKL
Copy link
Contributor

@Jefffrey, can you please give an example (s) of what queries you're running, what you're trying to do, the problem, and what you expect to achieve?

Sorry, but going through data fusion code isn't on my immediate plans. But it seems simple, so once I understand it, I could do it (or you could do it as well if you feel like it).

@Jefffrey
Copy link
Contributor Author

Yeah this is simple upstreaming of function from DataFusion to here, where it's more appropriate. It's mainly for parsing identifiers, especially for taking into consideration quoting, e.g. parse catalog."data.""base"."TABLE" into a list of Idents

Can see the unit tests for some example usages:

https://github.com/apache/arrow-datafusion/blob/d5077b55ef39e5376ace93d4e9068b94b678e7f1/datafusion/common/src/table_reference.rs#L305-L322

I've been meaning do to it since I did write that original function in DataFusion, but just haven't gotten around to it yet.

@AugustoFKL

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

Successfully merging a pull request may close this issue.

2 participants