Skip to content

Add example for using CacheFactory with DataFrame::cache #18893

Closed

Description

@jizezhang

A follow-up on #17297. This PR #18688 adds the feature to allow user to create a custom logical plan for DataFrame::cache by registering a logical plan transformation via CacheFactory. To translate that into a physical plan, user needs to have their own ExtensionPlanner and/or QueryPlanner. Add an example demonstrating how to do that.

Activity

  1. milenkovicm commented on Dec 1, 2025

    @milenkovicm
    Contributor

    It gets a bit complicated when it comes to ballista implementation of cache. There are few things which needed to be implemented:

    • query planner extension which would be able to handle custom logical plan extension
    • there is need for a some kind cache manager which would need to handle cache locations
    • also there is need for job breakdown, a first job which would materialize cache and second which would read the cache ...

    It gets event more complicated when cache reconciliation and task colocation are considered.

    I'm not sure if we can or should implement it all for a showcase

  2. jizezhang commented on Dec 2, 2025

    @jizezhang
    ContributorAuthor

    Thanks for the explanation, makes sense. I was just thinking what would be a good meaningful CacheFactory example for users.

  3. jizezhang commented on Dec 7, 2025

    @jizezhang
    ContributorAuthor

    Hi @milenkovicm can you review this PR #19139 when you get a chance? If the overall content looks good, I'll work on adding docs and polishing. Thanks!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions