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

GH-41668: [C++] Support cast kernel from list-like to (large) string #41831

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

llama90
Copy link
Contributor

@llama90 llama90 commented May 26, 2024

Rationale for this change

Support cast kernel from list-like (such as list, large list, list view, large list view, fixed size list, and map) to (large) string

What changes are included in this PR?

  • Support cast kernel
    • from list to (large) string
    • from large list to (large) string
    • from list view to (large) string
    • from large list view to (large) string
    • from fixed size list to (large) string
    • from map to (large) string

Are these changes tested?

Yes. It is passed by existing test cases.

Are there any user-facing changes?

No.

@llama90
Copy link
Contributor Author

llama90 commented May 26, 2024

The reason for handling these types in a PR.

  • list, large list, list view, large list view, fixed-size list, and map
classDiagram
    NestedType <|-- BaseListType
    BaseListType <|-- ListType
    BaseListType <|-- LargeListType
    BaseListType <|-- ListViewType
    BaseListType <|-- LargeListViewType
    BaseListType <|-- FixedSizeListType
    ListType <|-- MapType
Loading

@llama90 llama90 changed the title GH-41668: [WIP][C++] Support cast kernel from list-like to (large) string GH-41668: [C++] Support cast kernel from list-like to (large) string May 26, 2024
}
}

class TestMapScalar : public TestCastToString {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just as TestMapScalar was written for MapType, I wanted to write similar classes for List and FixedSizeList.

However, I found it too extensive to address within this PR, so I only covered MapType.

It would be better to create a separate issue to handle this.

@pitrou
Copy link
Member

pitrou commented Jul 22, 2024

@felipecrv Would you like to take a look at this (potentially stale) PR?

@felipecrv
Copy link
Contributor

@felipecrv Would you like to take a look at this (potentially stale) PR?

I have wrote a series of comments (in #41827) explaining @llama90 that stringfying nested arrays efficiently will require an approach similar to building the hierarchy of builders. I even started building the skeleton of that so that he could continue building formatters for other nested types, but there are some PRs that should be merged before I can push that code (like the stringv-view/string casts).

@llama90
Copy link
Contributor Author

llama90 commented Jul 23, 2024

@felipecrv Thank you very much for your efforts not only on this issue but also on the related issues.

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

Successfully merging this pull request may close these issues.

3 participants