Skip to content
Merged
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 @@ -101,18 +101,7 @@ class ColumnarCachedBatchSerializer extends CachedBatchSerializer with Logging {
}

override def supportsColumnarInput(schema: Seq[Attribute]): Boolean = {
// Note, there is a issue that, if gluten columnar scan is disabled and vanilla Spark
// columnar is enabled, then the following plan would fail.
// InMemoryTableScan
// InMemoryRelation
// (vanilla Spark columnar Scan) Parquet
// The reason is that, Spark will remove the top level `ColumnarToRow` and call
// `convertColumnarBatchToCachedBatch`, but the inside ColumnarBatch is not arrow-based.
// See: `InMemoryRelation.apply()`.
// So we should disallow columnar input if using vanilla Spark columnar scan.
val noVanillaSparkColumnarScan = glutenConf.enableColumnarFileScan ||
!glutenConf.getConf(GlutenConfig.VANILLA_VECTORIZED_READERS_ENABLED)
glutenConf.enableGluten && validateSchema(schema) && noVanillaSparkColumnarScan
glutenConf.enableGluten && validateSchema(schema)
}

override def supportsColumnarOutput(schema: StructType): Boolean = {
Expand Down