Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ object InMemoryRelation {
ser.get
}

/* Visible for testing */
private[columnar] def clearSerializer(): Unit = synchronized { ser = None }

def convertToColumnarIfPossible(plan: SparkPlan): SparkPlan = plan match {
case gen: WholeStageCodegenExec => gen.child match {
case c2r: ColumnarToRowTransition => c2r.child match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.apache.spark.sql.{QueryTest, Row}
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.{Attribute, Expression}
import org.apache.spark.sql.columnar.{CachedBatch, CachedBatchSerializer}
import org.apache.spark.sql.execution.columnar.InMemoryRelation.clearSerializer
import org.apache.spark.sql.execution.vectorized.OnHeapColumnVector
import org.apache.spark.sql.internal.{SQLConf, StaticSQLConf}
import org.apache.spark.sql.test.SharedSparkSession
Expand Down Expand Up @@ -120,6 +121,16 @@ class CachedBatchSerializerSuite extends QueryTest with SharedSparkSession {
classOf[TestSingleIntColumnarCachedBatchSerializer].getName)
}

protected override def beforeAll(): Unit = {
super.beforeAll()
clearSerializer()
}

protected override def afterAll(): Unit = {
clearSerializer()
super.afterAll()
}

test("Columnar Cache Plugin") {
withTempPath { workDir =>
val workDirPath = workDir.getAbsolutePath
Expand Down