Skip to content

Allow Postgres group-by on nested function expressions - #329

Open
bhubam wants to merge 1 commit into
mainfrom
postgres-nested-function-group-by
Open

bhubam wants to merge 1 commit into
mainfrom
postgres-nested-function-group-by

Conversation

@bhubam

@bhubam bhubam commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Interval buckets such as MULTIPLY(FLOOR(DIVIDE(col, 60000)), 60000) failed on Postgres because function operands could only be columns. Nested functions and numeric constants are now rendered inline, and a function group-by repeats the selected expression.

Description

Please include a summary of the change, motivation and context.

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

Interval buckets such as MULTIPLY(FLOOR(DIVIDE(col, 60000)), 60000) failed on Postgres because function operands could only be columns. Nested functions and numeric constants are now rendered inline, and a function group-by repeats the selected expression.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (cd897e9) to head (8e3e895).

Files with missing lines Patch % Lines
.../v1/vistors/PostgresFunctionExpressionVisitor.java 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #329      +/-   ##
============================================
+ Coverage     81.23%   81.30%   +0.07%     
- Complexity     1698     1705       +7     
============================================
  Files           243      243              
  Lines          7780     7790      +10     
  Branches        771      774       +3     
============================================
+ Hits           6320     6334      +14     
+ Misses          962      958       -4     
  Partials        498      498              
Flag Coverage Δ
integration 81.30% <63.63%> (+0.07%) ⬆️
unit 58.96% <63.63%> (+0.11%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Test Results

  128 files  ±0    128 suites  ±0   34s ⏱️ -9s
  897 tests +3    896 ✅ +3  1 💤 ±0  0 ❌ ±0 
1 267 runs  +3  1 266 ✅ +3  1 💤 ±0  0 ❌ ±0 

Results for commit 8e3e895. ± Comparison against base commit cd897e9.

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.

1 participant