apache / apache/pinot

Support IF statement in Transform function for post aggregation

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

Description

This is for queries like:
```
SELECT
IF AVG(met1) == 0 THEN 0 ELSE SUM(met0) / AVG(met1)
FROM "auctions"
WHERE event_time = 1601510400000
LIMIT 1
```

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing how the Transform function handles post-aggregation expressions, then follow the query path for the demonstrated IF expression. Done means the example query is accepted and evaluates the zero and nonzero branches correctly, with coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.