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 Support for Struct Conversion when reading Arrow data #115

Closed

Conversation

kronsbein
Copy link
Contributor

What changes were proposed in this pull request?

This PR adds support for struct conversion when reading Arrow data

Why are the changes needed?

Resolves #114

Does this PR introduce any user-facing change?

Additional functionality when reading Arrow data

How was this patch tested?

By extending existing test case TestReadArrowRecord

}
tmp := make(map[string]any)

for j := 0; j < data.NumField(); j++ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can now use

for j := range data.NumField() {

:)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thank you for your review!

Copy link
Contributor

@grundprinzip grundprinzip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add an integration test with something like this:

select named_struct('a', 1, 'b', 2, 'c', cast(10.32 as double), 'e', array(1,2,3,4))

@kronsbein
Copy link
Contributor Author

I added an integration test under internal/tests/integration/sql_test.go. Not exactly sure, if this is the right place, please let me know if I should move it somewhere else.

Copy link
Contributor

@grundprinzip grundprinzip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, merging to master.

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 this pull request may close these issues.

Support Struct Conversion when reading Arrow data
3 participants