# Columnar batch

Glossary, read 10 Nov 2026

**The short answer.** A columnar batch is a group of rows stored column by column in memory, so a filter reads one contiguous array per column. In Spark the class is org.apache.spark.sql.vectorized.ColumnarBatch, which wraps several ColumnVectors and also offers a row view for code that expects rows.

Native accelerators hand data between Spark and C++ in columnar batches. When an operator falls back to Spark, a conversion between columnar batches and rows is needed, and that conversion has a cost.

The class is marked DeveloperApi, so its shape can change between Spark releases. That is one reason plugin vendors list supported Spark versions.

## A sourced example

Spark's SparkSessionExtensions has an injectColumnar method, documented in the Spark 4.3.0 API, that injects a rule to override columnar execution on an executor. Plugins hook in this way without changing job code.

## Sources

- Apache Spark 4.3.0 API: ColumnarBatch: https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/vectorized/ColumnarBatch.html (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://sparkaccelerationcompare.com/glossary/columnar-batch/
