Skip to content

feat(lapis): support scalar functions in aggregation fields via dot notation#1780

Draft
fhennig wants to merge 1 commit into
mainfrom
feature/scalar-functions-in-aggregation-fields
Draft

feat(lapis): support scalar functions in aggregation fields via dot notation#1780
fhennig wants to merge 1 commit into
mainfrom
feature/scalar-functions-in-aggregation-fields

Conversation

@fhennig

@fhennig fhennig commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

WIP

resolves #1767

Summary

Users can now specify computed fields like date.isoWeek in the fields parameter of the /aggregated endpoint. LAPIS validates the function against a whitelist (currently isoWeek for date fields), generates a map() step before groupBy() in the SaneQL query, and renames the internal alias columns back to the user-facing field.function names in the response.

PR Checklist

  • All necessary documentation has been adapted.
  • All necessary changes are explained in the llms.txt.
  • The implemented feature is covered by an appropriate test.

…otation

Users can now specify computed fields like `date.isoWeek` in the `fields`
parameter of the `/aggregated` endpoint. LAPIS validates the function against
a whitelist (currently `isoWeek` for date fields), generates a `map()` step
before `groupBy()` in the SaneQL query, and renames the internal alias columns
back to the user-facing `field.function` names in the response.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lapis Ready Ready Preview, Comment Jul 23, 2026 2:39pm

Request Review

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.

Add scalar function to aggregation fields

1 participant