Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .github/workflows/pr_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ jobs:
org.apache.comet.exec.CometShuffleSuite
org.apache.comet.exec.CometShuffle4_0Suite
org.apache.comet.exec.CometNativeColumnarToRowSuite
org.apache.comet.exec.CometDirectColumnarToRowSuite
org.apache.comet.exec.CometNativeShuffleSuite
org.apache.spark.sql.comet.execution.shuffle.CometNativeShuffleInputRDDSuite
org.apache.comet.exec.CometShuffleEncryptionSuite
Expand All @@ -344,6 +345,7 @@ jobs:
org.apache.comet.exec.CometJoinSuite
org.apache.spark.sql.comet.CometMapInBatchSuite
org.apache.comet.CometNativeSuite
org.apache.comet.DirectColumnarToRowConverterSuite
org.apache.comet.CometConfSuite
org.apache.comet.CometPublicApiSuite
org.apache.comet.QueryContextInternerSuite
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr_build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
org.apache.comet.exec.CometShuffleSuite
org.apache.comet.exec.CometShuffle4_0Suite
org.apache.comet.exec.CometNativeColumnarToRowSuite
org.apache.comet.exec.CometDirectColumnarToRowSuite
org.apache.comet.exec.CometNativeShuffleSuite
org.apache.spark.sql.comet.execution.shuffle.CometNativeShuffleInputRDDSuite
org.apache.comet.exec.CometShuffleEncryptionSuite
Expand All @@ -160,6 +161,7 @@ jobs:
org.apache.comet.exec.CometJoinSuite
org.apache.spark.sql.comet.CometMapInBatchSuite
org.apache.comet.CometNativeSuite
org.apache.comet.DirectColumnarToRowConverterSuite
org.apache.comet.CometConfSuite
org.apache.comet.CometPublicApiSuite
org.apache.comet.QueryContextInternerSuite
Expand Down
15 changes: 15 additions & 0 deletions docs/source/user-guide/latest/tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,21 @@ plan to fall back to Spark row-based execution — Comet removes its native oper
mix of native and fallback operators joined by repeated conversions — which can be cheaper than paying the
expensive conversions again and again.

### Experimental: Direct Columnar-to-Row Conversion

When the JVM columnar-to-row operator is in use (`spark.comet.exec.columnarToRow.native.enabled=false`),
setting `spark.comet.exec.columnarToRow.direct.enabled=true` enables an experimental converter that writes
values straight from Arrow buffers into Spark's row format without allocating an object per value. This is
most beneficial for decimal-heavy schemas, where the default conversion allocates a `Decimal` object per
value (and considerably more for decimals with precision above 18); microbenchmarks show up to 2x faster
conversion and a large reduction in garbage creation for such schemas. Schemas containing data types the
converter does not support fall back to the default conversion automatically.

Batches with fewer rows than `spark.comet.exec.columnarToRow.direct.minBatchSize` (default `128`) also fall
back to the default conversion, since the direct converter's per-batch setup does not pay off on very small
batches. This optimization is experimental: it only affects the operator's non-codegen paths (including
broadcast relation builds), and the default conversion remains enabled unless explicitly opted in.

## Metrics Overhead

Comet exposes rich native operator metrics for observability (see [Metrics](metrics.md)), but they are
Expand Down
Loading
Loading