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

Towards #11 Add support for enums #37

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Towards #11 Add support for enums #37

merged 1 commit into from
Jun 28, 2022

Conversation

ncpenke
Copy link
Collaborator

@ncpenke ncpenke commented Apr 2, 2022

  • enum slices don't work - need scalar support

let array_name = &input.common.array_name();
let iterator_name = &input.common.iterator_name();

// - For dense unions, return the value of the variant that corresponds to the matched arm. Since
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jorgecarleitao This is logic going to change once scalar support comes in so that we can serialize slices correctly.

Copy link
Collaborator

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

Holly moly, amazing.

I have not gone through all of it in detail, but the tests, oh boy what they enable! Enum variants with inner types! 🤯

@ncpenke
Copy link
Collaborator Author

ncpenke commented Jun 27, 2022

I have not gone through all of it in detail, but the tests, oh boy what they enable! Enum variants with inner types! 🤯

Pretty cool in theory right?! This might be a bit ahead of its time though in terms of downstream uses, since querying nested types doesn't seem to be a thing? But this could be useful for flight rpc or parquet (assuming nested types are already supported or will be supported in the future). Read-only structured data for example JSON docs, can be cleaned and easily stored in parquet.

@jorgecarleitao
Copy link
Collaborator

yeap, very impressive! It reminds me of flatbuffers and the like that can store these type of nested enum variants, but in Arrow and typing in Rust! Amazing idea and implementation, @ncpenke !

Agree that is probably ahead of its time - I do not think arrow2 (or C++ for fwiw) even tests these complex types over IPC lol

- enum slices don't work - need scalar support
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.

None yet

2 participants