Skip to content

Inefficient DPP fallback for TPC-DS #3874

Closed

Description

@andygrove

Describe the bug

In TPC-DS, the fact table scans fall back to Spark because they use DPP. For some reason, the filter that wraps the scan also falls back to Spark, but Comet uses JVM shuffle write after the filter. This means there are two transitions in the plan.

CometShuffleWriter
  CometRowToColumnar
    SparkFilter
      SparkColumnarToRow
        SparkScan

The CometRowToColumnar also involves FFI transfers.

Steps to reproduce

No response

Expected behavior

Perhaps it would be better for Comet not to try and accelerate this stage or introduce the columnar exchange? I am not sure.

Additional context

No response

Activity

  1. added
    bug
    on Apr 1, 2026
  2. self-assigned this
    on Apr 1, 2026
  3. added this to the 0.15.0 milestone on Apr 1, 2026
  4. andygrove commented on Apr 1, 2026

    @andygrove
    MemberAuthor

    The solution is probably to wrap the Spark scan in CometSparkToColumnarExec so the rest of the stage is Comet native.

    However, we need to fix the compatibility issues (timezone related) with CometSparkToColumnarExec first (see #2733).

  5. added a commit that references this issue on Apr 1, 2026
    d2cffbb
  6. andygrove commented on Apr 1, 2026

    @andygrove
    MemberAuthor

    The solution is probably to wrap the Spark scan in CometSparkToColumnarExec so the rest of the stage is Comet native.

    This may add too much overhead. Perhaps we just need to fall back for the entire stage, which will cause the rest of the query to fall back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugrequires-triage

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions