apache / apache/pinot

Support transform functions in query preprocessing if all the arguments are all literals

Open
#10,718 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.