Skip to content

Incorrect handling of reused exchanges in CometExecRule #2859

@andygrove

Description

@andygrove

Describe the bug

The following match arms in CometExecRule will never replac the exchange with a Comet exchange, because the conversion only happens if all children are native, and the child in this case is ReusedExchangeExec .

This issue became apparent after the recent refactoring work.

      case s @ BroadcastQueryStageExec(
            _,
            ReusedExchangeExec(_, _: CometBroadcastExchangeExec),
            _) =>
        convertToCometIfAllChildrenAreNative(s, CometExchangeSink).getOrElse(s)

      case s @ ShuffleQueryStageExec(_, ReusedExchangeExec(_, _: CometShuffleExchangeExec), _) =>
        convertToCometIfAllChildrenAreNative(s, CometExchangeSink).getOrElse(s)

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions