Support transform functions in query preprocessing if all the arguments are all literals
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 55m
- Merged PRs (30d)
- 182
Description
@npawar and I found this feature gap.
The Broker preprocess the query by invoking functions if all the function arguments are literals, and then passes the preprocessed query to the Server for query execution.
When we preprocess the query, we [only support scalar functions](https://github.com/apache/pinot/blob/d1227e466dc6e350214485334cdf4eedc7502d67/pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/CompileTimeFunctionsInvoker.java#L74). We should also support [transform functions](https://github.com/apache/pinot/tree/d1227e466dc6e350214485334cdf4eedc7502d67/pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function).
Contributor guide
Research direction
Start by reading pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/CompileTimeFunctionsInvoker.java, especially its current scalar-function handling. Then inspect the transform functions under pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function; done means preprocessing can invoke transform functions when every argument is a literal before the query reaches the Server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100