Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e5d2af7
add grammar
teunbrand Nov 17, 2026
94801f2
parsing + build AST
teunbrand Nov 17, 2026
121b202
write validation steps
teunbrand Nov 17, 2026
2d8c092
initial set of summary computation
teunbrand Nov 18, 2026
24d2477
summarising data
teunbrand Nov 18, 2026
6374d31
insert label stub column if it doesn't exist
teunbrand Nov 19, 2026
9525040
layout weaving
teunbrand Nov 19, 2026
5ede4d4
Merge remote-tracking branch 'origin/main' into tabulate-summarise
teunbrand Nov 19, 2026
6085a9b
Adopt new parameter infra
teunbrand Nov 19, 2026
a53ba09
Renumber collapsed facet group keys at birth
teunbrand Nov 24, 2026
41ed134
Wire SUMMARISE into the table pipeline
teunbrand Nov 24, 2026
cc4d676
Set new TableCellKinds
teunbrand Nov 24, 2026
18d4dae
Store scope on SummaryRow
teunbrand Nov 24, 2026
ead970f
initial styling
teunbrand Nov 24, 2026
e1e1f9a
Some nuances with borders
teunbrand Nov 24, 2026
0a1f956
expand operations
teunbrand Nov 25, 2026
878be25
Merge remote-tracking branch 'origin/main' into tabulate-summarise
teunbrand Nov 25, 2026
b4384cf
adapt to zygos
teunbrand Nov 25, 2026
20389a4
apply format to summary cells
teunbrand Nov 25, 2026
71e7c37
wire up summary templates
teunbrand Nov 25, 2026
bff2c6c
parsing/validation of template
teunbrand Nov 25, 2026
8ff5df9
compute templates
teunbrand Nov 25, 2026
f7732dc
add extra operations
teunbrand Nov 25, 2026
f19ed42
experiment with summary expressions
teunbrand Nov 25, 2026
62c1028
add docs
teunbrand Nov 26, 2026
3ca9c77
support for temporal columns
teunbrand Nov 26, 2026
5b694d0
filler cells
teunbrand Nov 26, 2026
e56fb07
float columns share precision
teunbrand Nov 26, 2026
7e72c0d
Deal with template nulls
teunbrand Nov 26, 2026
a597d80
editorialise comments
teunbrand Nov 26, 2026
1505a22
Merge branch 'main' into tabulate-summarise
teunbrand Nov 30, 2026
b7a2b0a
update wording of doc based on comment
teunbrand Dec 1, 2026
9bd8b9d
error on 0 row summaries
teunbrand Dec 1, 2026
1711b82
resolve settings in setup
teunbrand Dec 3, 2026
c390eee
shape some logic into the chaos of parameter validation
teunbrand Dec 3, 2026
24e0b04
harden boundaries of summary columns
teunbrand Dec 3, 2026
113ab36
few more review comments
teunbrand Dec 3, 2026
25d3411
add navigation for summarise doc
teunbrand Dec 3, 2026
22f403d
phrasing
teunbrand Dec 3, 2026
8513420
Merge remote-tracking branch 'origin/main' into tabulate-summarise
teunbrand Dec 3, 2026
506a1eb
surface validation errors
teunbrand Dec 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- `SPAN` groups columns under a shared header cell (spanner).
- `FORMAT` configures how a column's cells are displayed.
- `FACET` sets row groups.
- `SUMMARISE` computes aggregates over rows.
- `Writer::write_table` renders a resolved table, taking the new public
`TableLayout` — the table's cells bundled with their column and row
metadata.
Expand Down
4 changes: 4 additions & 0 deletions doc/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ website:
href: syntax/clause/format.qmd
- text: "`FACET`"
href: syntax/clause/facet-tabulate.qmd
- text: "`SUMMARISE`"
href: syntax/clause/summarise.qmd
- text: Gallery
href: gallery/index.qmd
- href: faq.qmd
Expand Down Expand Up @@ -131,6 +133,8 @@ website:
href: syntax/clause/format.qmd
- text: "`FACET`"
href: syntax/clause/facet-tabulate.qmd
- text: "`SUMMARISE`"
href: syntax/clause/summarise.qmd
- section: Layers
contents:
- section: Types
Expand Down
63 changes: 63 additions & 0 deletions doc/ggsql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>

<!-- Fat arrow operator -->
<StringDetect attribute="Operator" context="#stay" String="=&gt;"/>
Expand Down Expand Up @@ -439,6 +441,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down Expand Up @@ -480,6 +484,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down Expand Up @@ -520,6 +526,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down Expand Up @@ -568,6 +576,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down Expand Up @@ -612,6 +622,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down Expand Up @@ -655,6 +667,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SpanClause" String="SPAN" insensitive="true"/>
<WordDetect attribute="Keyword" context="FormatClause" String="FORMAT" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
Expand Down Expand Up @@ -690,6 +704,8 @@
<!-- Exit to other clause contexts -->
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SpanClause" String="SPAN" insensitive="true"/>
<WordDetect attribute="Keyword" context="FormatClause" String="FORMAT" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
Expand Down Expand Up @@ -728,6 +744,8 @@
<!-- Exit to other clause contexts -->
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SpanClause" String="SPAN" insensitive="true"/>
<WordDetect attribute="Keyword" context="FormatClause" String="FORMAT" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
Expand Down Expand Up @@ -769,6 +787,8 @@
<!-- Exit to other clause contexts -->
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SpanClause" String="SPAN" insensitive="true"/>
<WordDetect attribute="Keyword" context="FormatClause" String="FORMAT" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
Expand Down Expand Up @@ -805,6 +825,47 @@
<DetectChar char="," attribute="Symbol" context="#stay"/>
</context>

<!-- SUMMARISE clause context -->
<context name="SummariseClause" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars char="-" char1="-" attribute="Comment" context="Comment"/>
<Detect2Chars char="/" char1="*" attribute="Comment" context="CommentMulti" beginRegion="comment"/>
<DetectChar char="'" attribute="String" context="StringSingle"/>
<DetectChar char="&quot;" attribute="String" context="StringDouble"/>
<RegExpr attribute="Number" context="#stay" String="-?[0-9]+\.?[0-9]*([eE][+-]?[0-9]+)?"/>

<!-- Exit to other clause contexts -->
<WordDetect attribute="Keyword" context="LabelClause" String="LABEL" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SpanClause" String="SPAN" insensitive="true"/>
<WordDetect attribute="Keyword" context="FormatClause" String="FORMAT" insensitive="true"/>
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
<WordDetect attribute="Keyword" context="#stay" String="FROM" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="WHERE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="WITH" insensitive="true"/>

<!-- Scope, column introducer and SETTING -->
<WordDetect attribute="Keyword" context="#stay" String="GROUP" insensitive="true"/>
<WordDetect attribute="Keyword" context="#stay" String="GRAND" insensitive="true"/>
<WordDetect attribute="Keyword" context="#stay" String="OF" insensitive="true"/>
<WordDetect attribute="Keyword" context="#stay" String="SETTING" insensitive="true"/>

<!-- Constants -->
<keyword attribute="Constant" context="#stay" String="constants"/>

<StringDetect attribute="Operator" context="#stay" String="=&gt;"/>
<AnyChar attribute="Operator" context="#stay" String="=!&lt;&gt;+-*/%"/>
<DetectChar char="(" attribute="Symbol" context="#stay"/>
<DetectChar char=")" attribute="Symbol" context="#stay"/>
<DetectChar char="[" attribute="Symbol" context="#stay"/>
<DetectChar char="]" attribute="Symbol" context="#stay"/>
<DetectChar char="," attribute="Symbol" context="#stay"/>
</context>

<!-- VISUALISE clause context -->
<context name="VisualiseClause" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars char="-" char1="-" attribute="Comment" context="Comment"/>
Expand All @@ -821,6 +882,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="TitleClause" String="TITLE" insensitive="true"/>
<WordDetect attribute="Keyword" context="TabulateClause" String="TABULATE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="SummariseClause" String="SUMMARIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="VisualiseClause" String="VISUALISE" insensitive="true"/>
<WordDetect attribute="Keyword" context="VisualiseClause" String="VISUALIZE" insensitive="true"/>
<WordDetect attribute="Keyword" context="Normal" String="SELECT" insensitive="true"/>
Expand Down
Loading
Loading