Skip to content

[BUG] Binning UDFs aren’t resolved via PPLFuncImpTable #4740

Closed

Description

@dai-chen

What is the bug?

Binning UDFs used by the bin command (e.g., span_bucket) are not resolved through PPLFuncImpTable.resolve(...). Instead, they’re instantiated via makeCall, which bypasses normal resolution. Because these functions are also missing from BuiltinFunctionName, resolution fails and throws an exception below.

Unsupported function: span_bucket
java.lang.IllegalArgumentException: Unsupported function: span_bucket
	at org.opensearch.sql.expression.function.PPLFuncImpTable.resolve(PPLFuncImpTable.java:514)

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Call the PPLFuncImpTable.resolve API with a binning UDF.
  2. Observe IllegalArgumentException: Unsupported function exception.

What is the expected behavior?

  1. Binning UDFs are declared in BuiltinFunctionName.
  2. They are always constructed via PPLFuncImpTable.resolve(...).

What is your host/environment?

  • Version: OS 2.19-dev and latest main
  • Plugins: OpenSearch PPL

Do you have any additional context?

Implications

  • Functionality
    • Type checking is skipped for these functions.
    • Schemaless operations and implicit casting are not applied.
  • Integrations
    • Bin command in Spark breaks because the UDF is not resolvable through the standard function table.

Activity

  1. added
    bug
    on Nov 4, 2025
  2. added 2 commits that reference this issue on Nov 4, 2025
    66ed07b
    e3c83c0
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions