Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 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
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 @@ -10,6 +10,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
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="LabelClause" String="LABEL" 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="LabelClause" String="LABEL" 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="LabelClause" String="LABEL" 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="LabelClause" String="LABEL" 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 @@ -567,6 +575,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="LabelClause" String="LABEL" 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 @@ -611,6 +621,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="LabelClause" String="LABEL" 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 @@ -654,6 +666,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="LabelClause" String="LABEL" 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 @@ -689,6 +703,8 @@
<!-- 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="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 @@ -727,6 +743,8 @@
<!-- 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="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 @@ -768,6 +786,8 @@
<!-- 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="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 @@ -804,6 +824,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 @@ -820,6 +881,8 @@
<WordDetect attribute="Keyword" context="FacetClause" String="FACET" insensitive="true"/>
<WordDetect attribute="Keyword" context="LabelClause" String="LABEL" 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