Skip to content

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

@dai-chen

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.

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