Skip to content

[datafusion-spark] Test integrating datafusion-spark code into comet #1704

Closed

Description

@alamb

What is the problem the feature request solves?

@shehabgamin added the datafusion-spark crate in apache/datafusion#15168

The goal is to help centralize the development of this function library in the core repository rather than duplicated effort

To verify this is feasible I would like to verify that the setup created in datafusion-spark / apache/datafusion#15168 can be used by downstream crates like comet before we go too far

Describe the potential solution

I would like someone to make a PR that shows we can remove one or more of the spark function in datafusion-spark can be used in comet (and reduce the code here)

Additional context

cc @comphead @andygrove @mbutrovich

Activity

  1. andygrove commented on May 5, 2025

    @andygrove
    Member

    I created apache/datafusion#15947 to add Comet's hex function to datafusion-spark. This involved converting it from a PhysicalExpr to a ScalarUDFImpl.

    Also, I created #1711 to use the expm1 function from datafusion-spark in Comet.

  2. andygrove commented on May 22, 2025

    @andygrove
    Member

    #1711 is now merged, so Comet is now using the datafusion-spark crate

  3. andygrove commented on May 22, 2025

    @andygrove
    Member

    I will keep this issue open until we actually remove an expression from comet and use a version from data fusion-spark

  4. self-assigned this
    on May 22, 2025
  5. alamb commented on May 22, 2025

    @alamb
    ContributorAuthor

    #1711 is now merged, so Comet is now using the datafusion-spark crate

    EPIC! FYI @shehabgamin

  6. removed their assignment
    on Aug 11, 2025
  7. dwsmith1983 commented on Sep 11, 2026

    @dwsmith1983
    Contributor

    The condition set here (remove a Comet expression and use the datafusion-spark version instead) was met in #2080 (d8c62f3), which dropped Comet's own chr in favor of the datafusion-spark one, and the pattern has since become routine: native/Cargo.toml pulls datafusion-spark into both native/core and native/spark-expr, and native/core/src/execution/jni_api.rs registers a growing set of its functions (SparkArrayContains, SparkArrayRepeat, SparkBitCount, SparkBitGet, SparkBitShift, SparkWidthBucket, and more) in the session context. Suggest closing.

  8. andygrove commented on Sep 28, 2026

    @andygrove
    Member

    Closing this, since the condition I set above has been met. As @dwsmith1983 pointed out, #2080 replaced Comet's own chr with the datafusion-spark version, and bit_not (#2896), space (#3612), bit_count (#3616) and substring (#4161) have gone the same way since. Comet now uses more than 30 datafusion-spark functions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions