-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Description
The current implementation of FnOverloadImpl.getInstance(PType[] args) in FnOverload.java ignores the provided argument types and always returns the same function instance. This is a design limitation of the current architecture and not a simple bug.
Current Behavior
@Nullable
@Override
public Fn getInstance(PType[] args) {
return instance; // Always returns the same instance, ignoring args
}
The FnOverload.Builder creates a single Fn instance with fixed parameter types, and FnOverloadImpl stores this single instance. The getInstance() method cannot validate argument types because it only has one pre-built instance for specific types and changing this behavior would break existing code that relies on the current implementation.
- Function overload resolution must be handled at a higher level (catalog/registry)
- The method signature suggests type validation but doesn't perform it
Additional Context
- PartiQL version: v1.2.2
Metadata
Metadata
Assignees
Labels
No labels