Skip to content

feat: Introduce ansi enable parameter for execution config #18634

Description

@comphead

Is your feature request related to a problem or challenge?

As was discussed with @Omega359 and @Jefffrey in apache/datafusion-spark#5 (comment) :

A question I have is how do we plan to support spark.sql.ansi.enabled config? I've seen a few PRs for Spark functions that try to cater for this config, but we don't exactly have a way to set this so it usually results in dead code (e.g. a hardcoded boolean that is set to false for now) or their own way of toggling it (e.g. another argument to the function).
ConfigOptions via ScalarFunctionArgs.

This ANSI flag becomes more critical as Spark 4.0 configured the ANSI mode as true by default
https://spark.apache.org/docs/latest/sql-ref-ansi-compliance.html

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added theissue type on Nov 11, 2025
  2. changed the title [-]feat: Introduce `ansi` enabled parameter for execution config[/-] [+]feat: Introduce `ansi` enable parameter for execution config[/+] on Nov 11, 2025
  3. hsiang-c commented on Nov 11, 2025

    @hsiang-c
    Contributor

    take (if no one else is working on it)

  4. comphead commented on Nov 11, 2025

    @comphead
    ContributorAuthor

    take (if no one else is working on it)

    Sorry @hsiang-c the PR is already assigned #18635

  5. added a commit that references this issue on Nov 12, 2025
    becc71b
  6. coderfender commented on Nov 29, 2025

    @coderfender
    Contributor

    @comphead, I believe we need to make eval_mode as an ENUM rather than a boolean given how the behavior between Try / Legacy mode is not always the same. For example, an overflow in SUM results in wrap around value in Legacy mode while it is null in Try . I can create an issue and work on it to convert the bool to an ENUM if thats okay

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions