Skip to content

Commit

Permalink
Explicitly use the public version of ParquetCachedBatchSerializer (#4021
Browse files Browse the repository at this point in the history
)

Refactoring accidentally used the shimmed implementation class instead
of facade.

Need a separate issue to remove consolidate this code in a single class
as it's currently replicated a few times in the repo

Signed-off-by: Gera Shegalov <gera@apache.org>
  • Loading branch information
gerashegalov authored Nov 3, 2021
1 parent cebcc1f commit fd754aa
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,10 @@ trait Spark32XShims extends SparkShims {
+ TypeSig.ARRAY).nested(), TypeSig.all),
(scan, conf, p, r) => new SparkPlanMeta[InMemoryTableScanExec](scan, conf, p, r) {
override def tagPlanForGpu(): Unit = {
if (!scan.relation.cacheBuilder.serializer.isInstanceOf[ParquetCachedBatchSerializer]) {
willNotWorkOnGpu("ParquetCachedBatchSerializer is not being used")
scan.relation.cacheBuilder.serializer match {
case _: com.nvidia.spark.ParquetCachedBatchSerializer => ()
case _ =>
willNotWorkOnGpu("ParquetCachedBatchSerializer is not being used")
}
}

Expand Down Expand Up @@ -885,7 +887,7 @@ trait Spark32XShims extends SparkShims {
exportColumnRdd: Boolean): GpuColumnarToRowExecParent = {
val serName = plan.conf.getConf(StaticSQLConf.SPARK_CACHE_SERIALIZER)
val serClass = ShimLoader.loadClass(serName)
if (serClass == classOf[ParquetCachedBatchSerializer]) {
if (serClass == classOf[com.nvidia.spark.ParquetCachedBatchSerializer]) {
GpuColumnarToRowTransitionExec(plan)
} else {
GpuColumnarToRowExec(plan)
Expand Down

0 comments on commit fd754aa

Please sign in to comment.