apache / apache/pinot

UDF argument type matching

Open
#6,955 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 3h
Merged PRs (30d)
195

Description

In `FunctionRegistry`, the UDFs annotated with `ScalarFunction` are registered based on the function name and the number of arguments. In addition to that, we should also allow registering multiple functions with same name and number of arguments but different argument types, and perform type matching when loading function from the registry.

E.g. `double divide(double a, double b)` and `long divide(long a, long b)`
If any of the argument is floating point type, it should pick the first one; otherwise, pick the second one

Contributor guide

Open the contributing guide

Research direction

Start by locating FunctionRegistry and the ScalarFunction registration and lookup paths. Inspect how name and argument count are currently matched; the work is done when functions sharing a name and arity can be selected by argument types, including the floating-point divide example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.