-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,11 @@ import org.apache.spark.sql.execution.{ColumnarToRowTransition, SparkPlan} | |
import org.apache.spark.sql.execution.adaptive.ShuffleQueryStageExec | ||
import org.apache.spark.sql.execution.command.{CreateDataSourceTableAsSelectCommand, DataWritingCommand, RunnableCommand} | ||
import org.apache.spark.sql.execution.datasources._ | ||
import org.apache.spark.sql.execution.datasources.V1WritesUtils.Empty2Null | ||
import org.apache.spark.sql.execution.datasources.parquet.ParquetFilters | ||
import org.apache.spark.sql.execution.exchange.{EXECUTOR_BROADCAST, ShuffleExchangeExec, ShuffleExchangeLike} | ||
import org.apache.spark.sql.rapids.GpuElementAtMeta | ||
import org.apache.spark.sql.rapids.GpuV1WriteUtils.GpuEmpty2Null | ||
import org.apache.spark.sql.rapids.execution.{GpuBroadcastHashJoinExec, GpuBroadcastNestedLoopJoinExec} | ||
|
||
object SparkShimImpl extends Spark321PlusDBShims { | ||
|
@@ -56,6 +58,16 @@ object SparkShimImpl extends Spark321PlusDBShims { | |
|
||
override def getExprs: Map[Class[_ <: Expression], ExprRule[_ <: Expression]] = { | ||
val shimExprs: Map[Class[_ <: Expression], ExprRule[_ <: Expression]] = Seq( | ||
// Empty2Null is pulled out of FileFormatWriter by default since Spark 3.4.0, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
NVnavkumar
Collaborator
|
||
// so it is visible in the overriding stage. | ||
GpuOverrides.expr[Empty2Null]( | ||
"Converts the empty string to null for writing data", | ||
ExprChecks.unaryProjectInputMatchesOutput( | ||
TypeSig.STRING, TypeSig.STRING), | ||
(a, conf, p, r) => new UnaryExprMeta[Empty2Null](a, conf, p, r) { | ||
override def convertToGpu(child: Expression): GpuExpression = GpuEmpty2Null(child) | ||
} | ||
), | ||
GpuOverrides.expr[KnownNullable]( | ||
"Tags the expression as being nullable", | ||
ExprChecks.unaryProjectInputMatchesOutput( | ||
|
There is actually an open Spark 3.4 issue (#7043) for Empty2Null