forked from apache/incubator-gluten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GLUTEN-4424][CORE] Upgrade spark version to 3.5.1 in Gluten (apache#…
…4822) * Upgrade spark version to 3.5 --------- Co-authored-by: Holden Karau <[email protected]>
- Loading branch information
Showing
40 changed files
with
3,145 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
shims/spark32/src/main/scala/io/glutenproject/execution/GenerateTreeStringShim.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.glutenproject.execution | ||
|
||
import org.apache.spark.sql.execution.{SparkPlan, UnaryExecNode} | ||
|
||
/** | ||
* Spark 3.5 has changed the parameter type of the generateTreeString API in TreeNode. In order to | ||
* support multiple versions of Spark, we cannot directly override the generateTreeString method in | ||
* WhostageTransformer. Therefore, we have defined the GenerateTreeStringShim trait in the shim to | ||
* allow different Spark versions to override their own generateTreeString. | ||
*/ | ||
|
||
trait GenerateTreeStringShim extends UnaryExecNode { | ||
|
||
def stageId: Int | ||
|
||
def substraitPlanJsonValue: String | ||
|
||
def wholeStageTransformerContextDefined: Boolean | ||
|
||
override def generateTreeString( | ||
depth: Int, | ||
lastChildren: Seq[Boolean], | ||
append: String => Unit, | ||
verbose: Boolean, | ||
prefix: String = "", | ||
addSuffix: Boolean = false, | ||
maxFields: Int, | ||
printNodeId: Boolean, | ||
indent: Int = 0): Unit = { | ||
val prefix = if (printNodeId) "^ " else s"^($stageId) " | ||
child.generateTreeString( | ||
depth, | ||
lastChildren, | ||
append, | ||
verbose, | ||
prefix, | ||
addSuffix = false, | ||
maxFields, | ||
printNodeId = printNodeId, | ||
indent) | ||
|
||
if (verbose && wholeStageTransformerContextDefined) { | ||
append(prefix + "Substrait plan:\n") | ||
append(substraitPlanJsonValue) | ||
append("\n") | ||
} | ||
} | ||
} |
Oops, something went wrong.