Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auron-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Define constants for supported component versions
# -----------------------------------------------------------------------------
SUPPORTED_OS_IMAGES=("centos7" "ubuntu24" "rockylinux8" "debian11" "azurelinux3")
SUPPORTED_SPARK_VERSIONS=("3.0" "3.1" "3.2" "3.3" "3.4" "3.5")
SUPPORTED_SPARK_VERSIONS=("3.0" "3.1" "3.2" "3.3" "3.4" "3.5" "4.0")
SUPPORTED_SCALA_VERSIONS=("2.12" "2.13")
SUPPORTED_CELEBORN_VERSIONS=("0.5" "0.6")
# Currently only one supported version, but kept plural for consistency
Expand Down
6 changes: 6 additions & 0 deletions auron-spark-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<artifactId>spark-sql_${scalaVersion}</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.auron</groupId>
<artifactId>spark-version-annotation-macros_${scalaVersion}</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,44 @@
*/
package org.apache.spark.sql.execution.ui

import javax.servlet.http.HttpServletRequest

import scala.xml.{Node, NodeSeq}

import org.apache.spark.internal.Logging
import org.apache.spark.ui.{UIUtils, WebUIPage}

import org.apache.auron.sparkver

private[ui] class AuronAllExecutionsPage(parent: AuronSQLTab) extends WebUIPage("") with Logging {

private val sqlStore = parent.sqlStore

override def render(request: HttpServletRequest): Seq[Node] = {
@sparkver("3.0 / 3.1 / 3.2 / 3.3 / 3.4 / 3.5")
override def render(request: javax.servlet.http.HttpServletRequest): Seq[Node] = {
val buildInfo = sqlStore.buildInfo()
val infos =
UIUtils.listingTable(propertyHeader, propertyRow, buildInfo.info, fixedWidth = true)
val summary: NodeSeq =
<div>
<div>
<span class="collapse-sql-properties collapse-table"
onClick="collapseTable('collapse-sql-properties', 'sql-properties')">
<h4>
<span class="collapse-table-arrow arrow-open"></span>
<a>Auron Build Information</a>
</h4>
</span>
<div class="sql-properties collapsible-table">
{infos}
</div>
</div>
<br/>
</div>

UIUtils.headerSparkPage(request, "Auron", summary, parent)
}

@sparkver("4.0")
override def render(request: jakarta.servlet.http.HttpServletRequest): Seq[Node] = {
val buildInfo = sqlStore.buildInfo()
val infos =
UIUtils.listingTable(propertyHeader, propertyRow, buildInfo.info, fixedWidth = true)
Expand Down
41 changes: 41 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,47 @@
</properties>
</profile>

<profile>
<id>spark-4.0</id>
<properties>
<shimName>spark-4.0</shimName>
<shimPkg>spark-extension-shims-spark4</shimPkg>
<scalaTestVersion>3.2.10</scalaTestVersion>
<scalafmtVersion>3.9.9</scalafmtVersion>
<sparkVersion>4.0.1</sparkVersion>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-java-scala-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[17,)</version>
<message>Spark 4.0 requires JDK 17 or higher to compile!</message>
</requireJavaVersion>
<requireProperty>
<property>scalaVersion</property>
<regex>^2.13.*</regex>
<regexMessage>Spark 4.0 requires Scala 2.13 and is not compatible with Scala 2.12!</regexMessage>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>jdk-8</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.apache.auron.sparkver

object InterceptedValidateSparkPlan extends Logging {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
def validate(plan: SparkPlan): Unit = {
import org.apache.spark.sql.execution.adaptive.BroadcastQueryStageExec
import org.apache.spark.sql.execution.auron.plan.NativeRenameColumnsBase
Expand Down Expand Up @@ -76,7 +76,7 @@ object InterceptedValidateSparkPlan extends Logging {
throw new UnsupportedOperationException("validate is not supported in spark 3.0.3 or 3.1.3")
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
private def errorOnInvalidBroadcastQueryStage(plan: SparkPlan): Unit = {
import org.apache.spark.sql.execution.adaptive.InvalidAQEPlanException
throw InvalidAQEPlanException("Invalid broadcast query stage", plan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ class ShimsImpl extends Shims with Logging {
override def shimVersion: String = "spark-3.4"
@sparkver("3.5")
override def shimVersion: String = "spark-3.5"
@sparkver("4.0")
override def shimVersion: String = "spark-4.0"

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def initExtension(): Unit = {
ValidateSparkPlanInjector.inject()

Expand Down Expand Up @@ -437,7 +439,7 @@ class ShimsImpl extends Shims with Logging {
length: Long,
numRecords: Long): FileSegment = new FileSegment(file, offset, length)

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def commit(
dep: ShuffleDependency[_, _, _],
shuffleBlockResolver: IndexShuffleBlockResolver,
Expand Down Expand Up @@ -598,7 +600,7 @@ class ShimsImpl extends Shims with Logging {
expr.asInstanceOf[AggregateExpression].filter
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
private def isAQEShuffleRead(exec: SparkPlan): Boolean = {
import org.apache.spark.sql.execution.adaptive.AQEShuffleReadExec
exec.isInstanceOf[AQEShuffleReadExec]
Expand All @@ -610,7 +612,7 @@ class ShimsImpl extends Shims with Logging {
exec.isInstanceOf[CustomShuffleReaderExec]
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
private def executeNativeAQEShuffleReader(exec: SparkPlan): NativeRDD = {
import org.apache.spark.sql.execution.adaptive.AQEShuffleReadExec
import org.apache.spark.sql.execution.CoalescedMapperPartitionSpec
Expand Down Expand Up @@ -910,7 +912,7 @@ class ShimsImpl extends Shims with Logging {
}
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getSqlContext(sparkPlan: SparkPlan): SQLContext =
sparkPlan.session.sqlContext

Expand All @@ -932,7 +934,7 @@ class ShimsImpl extends Shims with Logging {
size: Long): PartitionedFile =
PartitionedFile(partitionValues, filePath, offset, size)

@sparkver("3.4 / 3.5")
@sparkver("3.4 / 3.5 / 4.0")
override def getPartitionedFile(
partitionValues: InternalRow,
filePath: String,
Expand All @@ -943,7 +945,7 @@ class ShimsImpl extends Shims with Logging {
PartitionedFile(partitionValues, SparkPath.fromPath(new Path(filePath)), offset, size)
}

@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getMinPartitionNum(sparkSession: SparkSession): Int =
sparkSession.sessionState.conf.filesMinPartitionNum
.getOrElse(sparkSession.sparkContext.defaultParallelism)
Expand All @@ -965,13 +967,13 @@ class ShimsImpl extends Shims with Logging {
}
}

@sparkver("3.4 / 3.5")
@sparkver("3.4 / 3.5 / 4.0")
private def convertPromotePrecision(
e: Expression,
isPruningExpr: Boolean,
fallback: Expression => pb.PhysicalExprNode): Option[pb.PhysicalExprNode] = None

@sparkver("3.3 / 3.4 / 3.5")
@sparkver("3.3 / 3.4 / 3.5 / 4.0")
private def convertBloomFilterAgg(agg: AggregateFunction): Option[pb.PhysicalAggExprNode] = {
import org.apache.spark.sql.catalyst.expressions.aggregate.BloomFilterAggregate
agg match {
Expand Down Expand Up @@ -1000,7 +1002,7 @@ class ShimsImpl extends Shims with Logging {
@sparkver("3.0 / 3.1 / 3.2")
private def convertBloomFilterAgg(agg: AggregateFunction): Option[pb.PhysicalAggExprNode] = None

@sparkver("3.3 / 3.4 / 3.5")
@sparkver("3.3 / 3.4 / 3.5 / 4.0")
private def convertBloomFilterMightContain(
e: Expression,
isPruningExpr: Boolean,
Expand Down Expand Up @@ -1034,7 +1036,7 @@ class ShimsImpl extends Shims with Logging {
exec.initialPlan
}

@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getAdaptiveInputPlan(exec: AdaptiveSparkPlanExec): SparkPlan = {
exec.inputPlan
}
Expand Down Expand Up @@ -1064,7 +1066,7 @@ class ShimsImpl extends Shims with Logging {
})
}

@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getJoinBuildSide(exec: SparkPlan): JoinBuildSide = {
import org.apache.spark.sql.catalyst.optimizer.BuildLeft
convertJoinBuildSide(
Expand All @@ -1079,7 +1081,7 @@ class ShimsImpl extends Shims with Logging {
case class ForceNativeExecutionWrapper(override val child: SparkPlan)
extends ForceNativeExecutionWrapperBase(child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand All @@ -1094,6 +1096,6 @@ case class NativeExprWrapper(
override val nullable: Boolean)
extends NativeExprWrapperBase(nativeExpr, dataType, nullable) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def withNewChildrenInternal(newChildren: IndexedSeq[Expression]): Expression = copy()
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.apache.auron.sparkver

case class ConvertToNativeExec(override val child: SparkPlan) extends ConvertToNativeBase(child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ case class NativeAggExec(
child)
with BaseAggregateExec {

@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.1 / 3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override val requiredChildDistributionExpressions: Option[Seq[Expression]] =
theRequiredChildDistributionExpressions

@sparkver("3.3 / 3.4 / 3.5")
@sparkver("3.3 / 3.4 / 3.5 / 4.0")
override val initialInputBufferOffset: Int = theInitialInputBufferOffset

override def output: Seq[Attribute] =
Expand All @@ -64,15 +64,15 @@ case class NativeAggExec(
ExprId.apply(NativeAggBase.AGG_BUF_COLUMN_EXPR_ID))
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def isStreaming: Boolean = false

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def numShufflePartitions: Option[Int] = None

override def resultExpressions: Seq[NamedExpression] = output

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ case class NativeBroadcastExchangeExec(mode: BroadcastMode, override val child:
relationFuturePromise.future
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.apache.auron.sparkver
case class NativeCollectLimitExec(limit: Int, override val child: SparkPlan)
extends NativeCollectLimitBase(limit, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ case class NativeExpandExec(
override val child: SparkPlan)
extends NativeExpandBase(projections, output, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.apache.auron.sparkver
case class NativeFilterExec(condition: Expression, override val child: SparkPlan)
extends NativeFilterBase(condition, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ case class NativeGenerateExec(
override val child: SparkPlan)
extends NativeGenerateBase(generator, requiredChildOutput, outer, generatorOutput, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.apache.auron.sparkver
case class NativeGlobalLimitExec(limit: Long, override val child: SparkPlan)
extends NativeGlobalLimitBase(limit, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.apache.auron.sparkver
case class NativeLocalLimitExec(limit: Long, override val child: SparkPlan)
extends NativeLocalLimitBase(limit, child) {

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override protected def withNewChildInternal(newChild: SparkPlan): SparkPlan =
copy(child = newChild)

Expand Down
Loading
Loading