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

[C++] Support iterable types in RowEncodeTrait #1212

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

PragmaTwice
Copy link
Member

@PragmaTwice PragmaTwice commented Dec 6, 2023

What do these changes do?

In this PR we support any iterable types for RowEncodeTrait and its combination with struct types, e.g.

std::vector<int>

// nested array type
std::vector<std::vector<int>>

// class type in array type
struct A { ... }
std::vector<A>

// array in class type
struct B {
  std::vector<...> field1;
  ...
}

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

LGTM. one more thing, do we need to add an ArrayEncoder in array_encoder.h ?

@chaokunyang chaokunyang merged commit 71121ca into apache:main Dec 6, 2023
16 checks passed
@chaokunyang
Copy link
Collaborator

chaokunyang commented Dec 6, 2023

Those meta programing codegen is really impressive, learned a lot from your code 😄

@PragmaTwice
Copy link
Member Author

PragmaTwice commented Dec 7, 2023

do we need to add an ArrayEncoder in array_encoder.h ?

I plan to extend RowEncoder<T> rather than adding a new class, so users don't need to use different class to encode different types.

@chaokunyang
Copy link
Collaborator

do we need to add an ArrayEncoder in array_encoder.h ?

I plan to extend RowEncoder<T> rather than adding a new class, so users don't need to use different class to encode different types.

OK, got it

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.

2 participants