Skip to content

Fix table name parsing for window queries#18616

Merged
yashmayya merged 1 commit into
apache:masterfrom
wolfkill:fix/window-table-name-parser
May 31, 2026
Merged

Fix table name parsing for window queries#18616
yashmayya merged 1 commit into
apache:masterfrom
wolfkill:fix/window-table-name-parser

Conversation

@wolfkill
Copy link
Copy Markdown
Contributor

Fixes #15204

Summary

  • Handle Calcite SqlWindow operands while compiling PinotQuery expressions, so table-name resolution does not crash on OVER window definitions.
  • Add regression coverage for extracting table names from a multi-stage LAG(...) OVER (...) query.

Testing

  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./mvnw -pl pinot-common -am -Dtest=RequestUtilsTest,TableNameExtractorTest -Dsurefire.failIfNoSpecifiedTests=false test
  • git diff --check

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 28, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.37%. Comparing base (6bff229) to head (1bfd64f).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...org/apache/pinot/sql/parsers/CalciteSqlParser.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18616      +/-   ##
============================================
- Coverage     64.39%   64.37%   -0.02%     
  Complexity     1137     1137              
============================================
  Files          3336     3336              
  Lines        206096   206100       +4     
  Branches      32145    32147       +2     
============================================
- Hits         132721   132687      -34     
- Misses        62714    62760      +46     
+ Partials      10661    10653       -8     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.37% <50.00%> (-0.02%) ⬇️
temurin 64.37% <50.00%> (-0.02%) ⬇️
unittests 64.37% <50.00%> (-0.02%) ⬇️
unittests1 56.77% <50.00%> (-0.02%) ⬇️
unittests2 36.94% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wolfkill wolfkill marked this pull request as ready for review May 29, 2026 01:11
Copy link
Copy Markdown
Contributor

@yashmayya yashmayya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yashmayya yashmayya merged commit f2c715a into apache:master May 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CalciteSqlParser fails to parse table name from queries with window functions

3 participants