Skip to content

Add support for InMemoryRelation #137

Closed

Description

@sunchao

What is the problem the feature request solves?

Currently Comet cannot be triggered if Spark users read data from cached RDD. To support this use case, we'll need to add support for Spark's InMemoryRelation.

It looks like we may need to implement Arrow for CachedBatchSerializer.

Describe the potential solution

Add Comet support for InMemoryRelation, so that Spark query starts from cached RDD can also use Comet native execution.

Additional context

It is not a priority as of now, but will be something good to have in future.

Activity

  1. advancedxy commented on Mar 1, 2024

    @advancedxy
    Contributor

    Another way to read InMemoryRelation is to wrapped it with an CometRowToColumnarExec like I proposed in #119

  2. sunchao commented on Mar 1, 2024

    @sunchao
    MemberAuthor

    @advancedxy Yea, CometRowToColumnarExec could be a more general solution, not only for InMemoryRelation, but also for other types of data sources like CSV, JSON, etc. The advantage of implementing Arrow for CachedBatchSerializer here is that we can avoid the extra cost from row to columnar conversion, and potentially be more space efficient because of better compression.

  3. advancedxy commented on Mar 1, 2024

    @advancedxy
    Contributor

    The advantage of implementing Arrow for CachedBatchSerializer here is that we can avoid the extra cost from row to columnar conversion, and potentially be more space efficient because of better compression.

    Yea, of course. I can get the rational. We could always add specialized operators to improve performance as long as it's worth the effort and there's interest to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions