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

[CORE] Bad mutable query plan nodes #8182

Open
zhztheplayer opened this issue Dec 9, 2024 · 0 comments
Open

[CORE] Bad mutable query plan nodes #8182

zhztheplayer opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zhztheplayer
Copy link
Member

zhztheplayer commented Dec 9, 2024

Description

Spark / Gluten query planner requires heavily on plan immutability.

Currently there are some (unlimited to) code snippets potentially making plans mutable:

  1. WholeStageTransformer.setOutputSchemaForPlan (CH)
    def setOutputSchemaForPlan(expectOutput: Seq[Attribute]): Unit = {
    if (outputSchemaForPlan.isDefined) {
    return
    }
    // Fixes issue-1874
    outputSchemaForPlan = Some(inferSchemaFromAttributes(expectOutput))
    }
  2. BatchScanExecTransformer.setPushDownFilters (VL + CH)
    def setPushDownFilters(filters: Seq[Expression]): Unit = {
    pushdownFilters = Some(filters)
    }

Should find a way to optimize against the code to make relevant plan immutable.

@zhztheplayer zhztheplayer added the enhancement New feature or request label Dec 9, 2024
@zhztheplayer zhztheplayer changed the title [CORE][CH] Bad mutable query plan nodes [CORE] Bad mutable query plan nodes Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant