Skip to content

docs: correct pivot_offset compiled SQL window definition#704

Open
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/79b281fd
Open

docs: correct pivot_offset compiled SQL window definition#704
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/79b281fd

Conversation

@mintlify
Copy link
Copy Markdown
Contributor

@mintlify mintlify Bot commented May 26, 2026

Summary

Updates the pivot_offset compiled SQL example in the pivot functions reference so it matches the corrected window semantics (walks across pivot columns within a row).

Changes

  • Swap the PARTITION BY and ORDER BY clauses in the pivot_offset compiled SQL accordion to partition by row_index and order by column_index.
  • Update the adjacency guard to compare against column_index instead of row_index.

Context

The upstream fix changes pivot_offset(expr, n) to look at the pivot column n positions away within the same row (matching Looker semantics), rather than walking across rows within a single pivot column. The previous compiled SQL snippet documented the old, incorrect behavior.

@mintlify
Copy link
Copy Markdown
Contributor Author

mintlify Bot commented May 26, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lightdash 🟢 Ready View Preview May 26, 2026, 11:06 AM

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