Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add information about SubstraitFunctionName and LocalFunctionName #92

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions functions/registries.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ func (LocalFunctionName) functionName() {}
func (SubstraitFunctionName) functionName() {}

type functionRegistryBase[L any, S extensions.FunctionVariant, A extensions.FunctionVariant, W extensions.FunctionVariant] interface {
// GetScalarFunctions returns a slice of zero or more scalar function variants that match the provided name & numArgs
// GetScalarFunctions returns a slice of zero or more scalar function variants that match the provided name & numArgs.
// Use SubstraitFunctionName as the name's type if you want to search by substrait name and LocalFunctionName as the name's
// type if you want to search by the local name.
GetScalarFunctions(name L, numArgs int) []S

// GetAggregateFunctions returns a slice of zero or more aggregate function variants that match the provided name & numArgs
// GetAggregateFunctions returns a slice of zero or more aggregate function variants that match the provided name & numArgs.
// Use SubstraitFunctionName as the name's type if you want to search by substrait name and LocalFunctionName as the name's
// type if you want to search by the local name.
GetAggregateFunctions(name L, numArgs int) []A

// GetWindowFunctions returns a slice of zero or more window function variants that match the provided name & numArgs
// GetWindowFunctions returns a slice of zero or more window function variants that match the provided name & numArgs.
// Use SubstraitFunctionName as the name's type if you want to search by substrait name and LocalFunctionName as the name's
// type if you want to search by the local name.
GetWindowFunctions(name L, numArgs int) []W

// GetAllFunctions returns all function variants in the registry
Expand Down
Loading