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

Add SQL support for referencing fields in structs #119

Closed
alamb opened this issue Apr 26, 2021 · 4 comments · Fixed by #1204
Closed

Add SQL support for referencing fields in structs #119

alamb opened this issue Apr 26, 2021 · 4 comments · Fixed by #1204
Labels
datafusion Changes in the datafusion crate enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10761

I would like to be able to use SQL to query data sources such as Parquet and JSON that support nested types.

Example:
{code:java}
SELECT id, first_name, address.zip AS zip_code FROM customer{code}

@alamb alamb added the datafusion Changes in the datafusion crate label Apr 26, 2021
@houqp
Copy link
Member

houqp commented Oct 18, 2021

In @Igosuki 's recent PR (#1006) for adding list indexing support, he proposed using field["key"] to access nested struct field, which I think makes the query more readable. For example, foo.id could mean accessing the id attribute from an unqualified foo column or accessing the id column from the table foo. foo["id"] makes it clear that id is for accessing of struct field.

@houqp
Copy link
Member

houqp commented Oct 18, 2021

I think we are almost there with this feature, see my comment in #1006 (comment).

@houqp houqp added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 18, 2021
@Igosuki
Copy link
Contributor

Igosuki commented Oct 18, 2021 via email

@Igosuki
Copy link
Contributor

Igosuki commented Oct 30, 2021

#1204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants