From 8b1ba6f5f77db0da02d6064eb481d4b9f5136350 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 11:41:59 -0800 Subject: [PATCH 01/11] Use macOS 26 for Apple Silicon PyPI wheel builds --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 22bc9c774..368b9fcfe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -236,7 +236,7 @@ jobs: target: aarch64 - os: macos-15-intel target: x86_64 - - os: macos-14 + - os: macos-26 target: aarch64 - os: windows-latest target: x86_64-pc-windows-msvc @@ -280,7 +280,7 @@ jobs: target: aarch64 - os: macos-15-intel target: x86_64 - - os: macos-14 + - os: macos-26 target: aarch64 - os: windows-latest target: x86_64-pc-windows-msvc From 24017948f2aa764f0b76a117a03bb579f9719acc Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 11:42:12 -0800 Subject: [PATCH 02/11] Move sidemantic-rs-wheels Apple Silicon job to macOS 26 --- .github/workflows/sidemantic-rs-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sidemantic-rs-wheels.yml b/.github/workflows/sidemantic-rs-wheels.yml index 4b2886e53..a9c2d1710 100644 --- a/.github/workflows/sidemantic-rs-wheels.yml +++ b/.github/workflows/sidemantic-rs-wheels.yml @@ -44,7 +44,7 @@ jobs: target: aarch64 - os: macos-15-intel target: x86_64 - - os: macos-14 + - os: macos-26 target: aarch64 - os: windows-latest target: x86_64-pc-windows-msvc From ae0d344d43642abd17a3166eb0b1465001c4a39e Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 11:42:16 -0800 Subject: [PATCH 03/11] Move rust-runtime-release Apple Silicon job to macOS 26 --- .github/workflows/rust-runtime-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-runtime-release.yml b/.github/workflows/rust-runtime-release.yml index 227204e92..35fb72cf6 100644 --- a/.github/workflows/rust-runtime-release.yml +++ b/.github/workflows/rust-runtime-release.yml @@ -89,7 +89,7 @@ jobs: artifact: linux-x86_64 - os: macos-15-intel artifact: macos-x86_64 - - os: macos-14 + - os: macos-26 artifact: macos-arm64 - os: windows-latest artifact: windows-x86_64 From cb2b75f03235239ccf24170a89f050365ca74b08 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 11:42:38 -0800 Subject: [PATCH 04/11] Smoke Apple Silicon DAX wheel in pull requests without publishing --- .github/workflows/sidemantic-rs-wheels.yml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/sidemantic-rs-wheels.yml b/.github/workflows/sidemantic-rs-wheels.yml index a9c2d1710..188838456 100644 --- a/.github/workflows/sidemantic-rs-wheels.yml +++ b/.github/workflows/sidemantic-rs-wheels.yml @@ -21,6 +21,7 @@ on: paths: - ".github/actions/**" - ".github/workflows/sidemantic-rs-wheels.yml" + - ".github/workflows/publish.yml" - "sidemantic-rs/pyproject.toml" - "sidemantic-rs/tests/python_wheel_smoke.py" @@ -115,6 +116,35 @@ jobs: rust-key: ${{ steps.rust-cache.outputs.key }} uv-key: ${{ steps.uv.outputs.cache-key }} + build-dax-macos-arm: + name: Build and smoke DAX wheel (macOS ARM) + if: github.event_name == 'pull_request' + runs-on: macos-26 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Build DAX abi3 wheel + uses: PyO3/maturin-action@v1 + with: + command: build + args: --release --manifest-path crates/dax-pyo3/Cargo.toml --out crates/dax-pyo3/dist + manylinux: auto + target: aarch64 + + - uses: astral-sh/setup-uv@v5 + with: + enable-cache: false + + - name: Smoke DAX wheel on Apple Silicon + shell: bash + run: | + [[ "$(uname -m)" == arm64 ]] + uv run --no-project --python 3.12 --with crates/dax-pyo3/dist/*.whl python -c 'from sidemantic_dax import parse_expression_raw; assert parse_expression_raw("1 + 2")' + build-sdist: name: Build sdist runs-on: ubuntu-latest From c43b9a1609ebf6aa52e603c1fb737880269c6b1b Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 11:52:16 -0800 Subject: [PATCH 05/11] Remove temporary DAX validation after green macOS 26 smoke --- .github/workflows/sidemantic-rs-wheels.yml | 30 ---------------------- 1 file changed, 30 deletions(-) diff --git a/.github/workflows/sidemantic-rs-wheels.yml b/.github/workflows/sidemantic-rs-wheels.yml index 188838456..a9c2d1710 100644 --- a/.github/workflows/sidemantic-rs-wheels.yml +++ b/.github/workflows/sidemantic-rs-wheels.yml @@ -21,7 +21,6 @@ on: paths: - ".github/actions/**" - ".github/workflows/sidemantic-rs-wheels.yml" - - ".github/workflows/publish.yml" - "sidemantic-rs/pyproject.toml" - "sidemantic-rs/tests/python_wheel_smoke.py" @@ -116,35 +115,6 @@ jobs: rust-key: ${{ steps.rust-cache.outputs.key }} uv-key: ${{ steps.uv.outputs.cache-key }} - build-dax-macos-arm: - name: Build and smoke DAX wheel (macOS ARM) - if: github.event_name == 'pull_request' - runs-on: macos-26 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Build DAX abi3 wheel - uses: PyO3/maturin-action@v1 - with: - command: build - args: --release --manifest-path crates/dax-pyo3/Cargo.toml --out crates/dax-pyo3/dist - manylinux: auto - target: aarch64 - - - uses: astral-sh/setup-uv@v5 - with: - enable-cache: false - - - name: Smoke DAX wheel on Apple Silicon - shell: bash - run: | - [[ "$(uname -m)" == arm64 ]] - uv run --no-project --python 3.12 --with crates/dax-pyo3/dist/*.whl python -c 'from sidemantic_dax import parse_expression_raw; assert parse_expression_raw("1 + 2")' - build-sdist: name: Build sdist runs-on: ubuntu-latest From 8f61426e93cb355ba995e2be44ac084262669c3a Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:16:46 -0800 Subject: [PATCH 06/11] Fix Windows Cargo build-script caching with MBX 1.27.0 --- .github/actions/setup-rust-cache/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-rust-cache/action.yml b/.github/actions/setup-rust-cache/action.yml index 800e24a8b..66c30dde1 100644 --- a/.github/actions/setup-rust-cache/action.yml +++ b/.github/actions/setup-rust-cache/action.yml @@ -44,9 +44,10 @@ runs: MBX_CACHE_DIR: ${{ github.workspace }}/.ci-mbx MBX_TARGET_VIEWS: '0' with: - version: ${{ (runner.os != 'macOS' || runner.arch != 'X64') && '1.11.0' || '' }} + # MBX 1.27.0 fixes native Windows Cargo build-script dispatch (upstream #787). + version: ${{ runner.os == 'Windows' && '1.27.0' || (runner.os != 'macOS' || runner.arch != 'X64') && '1.11.0' || '' }} github-cache-mode: objects - cache-generation: sidemantic-v1-${{ inputs.suffix }} + cache-generation: ${{ runner.os == 'Windows' && 'sidemantic-windows-mbx-1.27.0' || 'sidemantic-v1' }}-${{ inputs.suffix }} - name: Remove imported Rust cache archive env: From 6459701d5397a1aec01cc315ec7ee2d2d8457cb6 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:34:55 -0800 Subject: [PATCH 07/11] Replay portable SQL from Yardstick's native definition-store fixture --- .../queries/test_yardstick_measures_replay.py | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/tests/queries/test_yardstick_measures_replay.py b/tests/queries/test_yardstick_measures_replay.py index 8604c85e1..daaa80941 100644 --- a/tests/queries/test_yardstick_measures_replay.py +++ b/tests/queries/test_yardstick_measures_replay.py @@ -2,6 +2,7 @@ from __future__ import annotations +import hashlib import os import re import subprocess @@ -800,11 +801,35 @@ def _apply_statement(layer: SemanticLayer, adapter: YardstickAdapter, statement: ) -def _replay_yardstick_sql_test(path: Path) -> None: +# Yardstick #72 added a mixed fixture to the legacy (non-PEG) corpus. Its +# attached-store metadata, session/transaction behavior, and implicit measures +# are native extension integration checks, not Sidemantic query capabilities. +# Require review of any changed fixture so no new assertions disappear silently. +_DEFINITION_STORE_FIXTURE_SHA256 = "8301ba931eee4043223d37efb30e819a2b957a4d1e9e93f92cf984fd33da6e82" +_DEFINITION_STORE_PORTABLE_STATEMENTS = {13, 16, 28, 72} +_DEFINITION_STORE_PORTABLE_QUERIES = {23, 42, 54, 75} + + +def _portable_definition_store_records(path: Path) -> tuple[list[_StatementBlock], list[_QueryBlock]]: + digest = hashlib.sha256(path.read_text().rstrip("\n").encode()).hexdigest() + assert digest == _DEFINITION_STORE_FIXTURE_SHA256, ( + f"{path}: upstream definition-store fixture changed; review the native/portable replay boundary" + ) + statements, queries = _parse_measures_test(path) + portable_statements = [record for record in statements if record.line in _DEFINITION_STORE_PORTABLE_STATEMENTS] + portable_queries = [record for record in queries if record.line in _DEFINITION_STORE_PORTABLE_QUERIES] + assert {record.line for record in portable_statements} == _DEFINITION_STORE_PORTABLE_STATEMENTS + assert {record.line for record in portable_queries} == _DEFINITION_STORE_PORTABLE_QUERIES + return portable_statements, portable_queries + + +def _replay_yardstick_sql_test( + path: Path, records: tuple[list[_StatementBlock], list[_QueryBlock]] | None = None +) -> None: if not path.exists(): pytest.skip(f"Yardstick SQL test file not found: {path}") - statements, queries = _parse_measures_test(path) + statements, queries = _parse_measures_test(path) if records is None else records assert queries, f"No query blocks parsed from Yardstick SQL test: {path}" layer = SemanticLayer(connection="duckdb:///:memory:") @@ -856,7 +881,18 @@ def test_yardstick_upstream_create_view_definitions(): @pytest.mark.yardstick_upstream def test_yardstick_upstream_sql_replay(): for path in _yardstick_upstream_sql_test_paths(): - _replay_yardstick_sql_test(path) + if path.name == "definition_store.test": + _replay_yardstick_sql_test(path, _portable_definition_store_records(path)) + else: + _replay_yardstick_sql_test(path) + + +def test_changed_definition_store_fixture_requires_review(tmp_path): + path = tmp_path / "definition_store.test" + path.write_text("query I\nSELECT 123;\n----\n456\n") + + with pytest.raises(AssertionError, match="review the native/portable replay boundary"): + _portable_definition_store_records(path) def test_parse_statement_record_preserves_batch_and_unterminated_error(tmp_path): From 0cf38ca70820050fa1c45b7a3aa389b6ba50b36f Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:35:11 -0800 Subject: [PATCH 08/11] Document Yardstick live replay capability boundary --- docs/compatibility/yardstick.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/compatibility/yardstick.md b/docs/compatibility/yardstick.md index fbc944c10..abbf6de13 100644 --- a/docs/compatibility/yardstick.md +++ b/docs/compatibility/yardstick.md @@ -161,7 +161,15 @@ The live replay fetches `https://github.com/sidequery/yardstick.git` at `main` b | Facet | Coverage | |-------|----------| | Model/metric definitions | Checks every parsed `CREATE VIEW ... AS MEASURE`, including definitions within batches, asserting model name, source table/base SQL, primary key, Yardstick metadata, dimension SQL/type/granularity, and metric `agg`/`sql`/`filters`/`type` | -| Query execution | Replays every upstream query block against Sidemantic's Yardstick rewriter and compares result rows | +| Query execution | Replays portable upstream SQL against Sidemantic's Yardstick rewriter and compares result rows | + +The upstream `definition_store.test` includes native attachment storage, session +isolation, and concurrent mutation checks that are not Sidemantic APIs. The +definition check still processes that fixture. Replay runs its portable table +setup, measure creation and replacement, grouped aggregation, and `AT (ALL)` +assertions. A fixture checksum makes changes fail the replay until the boundary +is reviewed. Native storage assertions belong to the upstream extension suite +and are not exercised by this workflow. The live definition check covers the `CREATE VIEW ... AS MEASURE` definitions used by Yardstick's SQL tests. Sidemantic's native SQL definition parser owns `MODEL(...)`, `METRIC(...)`, and `DIMENSION(...)` files separately from the Yardstick adapter; the live upstream replay does not treat Yardstick's top-level `yardstick_definitions.sql` helper file as part of the SQL-test corpus. From 1f5cdb40efe1ae36f342b0bfa884278b60d2ebe6 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:37:22 -0800 Subject: [PATCH 09/11] Bind Yardstick measures to GROUP BY ALL projection grain --- sidemantic/sql/query_rewriter.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sidemantic/sql/query_rewriter.py b/sidemantic/sql/query_rewriter.py index cb28a1ba7..be1bb1736 100644 --- a/sidemantic/sql/query_rewriter.py +++ b/sidemantic/sql/query_rewriter.py @@ -3744,6 +3744,23 @@ def _rewrite_yardstick_select_scope( scalar_aggregate = True group_clause = select_scope.args.get("group") + if ( + group_clause + and group_clause.args.get("all") + and not any(projection.is_star for projection in select_scope.expressions) + ): + # Resolve the implicit grain before lowering measures to scalar subqueries. + # Otherwise a HAVING-only measure sees a grand total instead of its group. + group_expressions = [] + for projection, is_metric, is_literal in zip( + select_scope.expressions, projection_is_metric, projection_is_literal, strict=True + ): + expression = projection.this if isinstance(projection, exp.Alias) else projection + if not is_metric and not is_literal and not expression.find(exp.AggFunc, exp.Window): + group_expressions.append(expression.copy()) + if group_expressions: + group_clause = exp.Group(expressions=group_expressions) + select_scope.set("group", group_clause) if group_clause: self._resolve_yardstick_group_ordinals(group_clause, select_scope.expressions) if group_clause and default_alias and single_model_scope: From 5a914e0e107f4663ac50f54fd6dedc2acd4e3686 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:37:39 -0800 Subject: [PATCH 10/11] Regress GROUP BY ALL with a HAVING-only Yardstick measure --- tests/queries/test_yardstick_query_rewriter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/queries/test_yardstick_query_rewriter.py b/tests/queries/test_yardstick_query_rewriter.py index 0f2fa8e34..007b9e9fe 100644 --- a/tests/queries/test_yardstick_query_rewriter.py +++ b/tests/queries/test_yardstick_query_rewriter.py @@ -1585,6 +1585,21 @@ def test_yardstick_group_by_extra_spaces(yardstick_layer): } +def test_yardstick_group_by_all_uses_projection_grain_for_having(yardstick_layer): + result = fetch_dicts( + yardstick_layer.sql( + """ +SELECT year, UPPER(region) AS area, COUNT(*) AS n +FROM sales_v +GROUP BY ALL +HAVING AGGREGATE(revenue) > 110 +ORDER BY year, area +""" + ) + ) + assert result == [{"year": 2023, "area": "US", "n": 1}] + + def test_yardstick_group_by_positional_ordinal(yardstick_layer): result = fetch_dicts( yardstick_layer.sql( From 4002bf80697fbca1daf19c07173c95860c343cd3 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Mon, 23 Nov 2026 12:41:56 -0800 Subject: [PATCH 11/11] Move Yardstick parity work to its own branch --- docs/compatibility/yardstick.md | 10 +---- sidemantic/sql/query_rewriter.py | 17 -------- .../queries/test_yardstick_measures_replay.py | 42 ++----------------- .../queries/test_yardstick_query_rewriter.py | 15 ------- 4 files changed, 4 insertions(+), 80 deletions(-) diff --git a/docs/compatibility/yardstick.md b/docs/compatibility/yardstick.md index abbf6de13..fbc944c10 100644 --- a/docs/compatibility/yardstick.md +++ b/docs/compatibility/yardstick.md @@ -161,15 +161,7 @@ The live replay fetches `https://github.com/sidequery/yardstick.git` at `main` b | Facet | Coverage | |-------|----------| | Model/metric definitions | Checks every parsed `CREATE VIEW ... AS MEASURE`, including definitions within batches, asserting model name, source table/base SQL, primary key, Yardstick metadata, dimension SQL/type/granularity, and metric `agg`/`sql`/`filters`/`type` | -| Query execution | Replays portable upstream SQL against Sidemantic's Yardstick rewriter and compares result rows | - -The upstream `definition_store.test` includes native attachment storage, session -isolation, and concurrent mutation checks that are not Sidemantic APIs. The -definition check still processes that fixture. Replay runs its portable table -setup, measure creation and replacement, grouped aggregation, and `AT (ALL)` -assertions. A fixture checksum makes changes fail the replay until the boundary -is reviewed. Native storage assertions belong to the upstream extension suite -and are not exercised by this workflow. +| Query execution | Replays every upstream query block against Sidemantic's Yardstick rewriter and compares result rows | The live definition check covers the `CREATE VIEW ... AS MEASURE` definitions used by Yardstick's SQL tests. Sidemantic's native SQL definition parser owns `MODEL(...)`, `METRIC(...)`, and `DIMENSION(...)` files separately from the Yardstick adapter; the live upstream replay does not treat Yardstick's top-level `yardstick_definitions.sql` helper file as part of the SQL-test corpus. diff --git a/sidemantic/sql/query_rewriter.py b/sidemantic/sql/query_rewriter.py index be1bb1736..cb28a1ba7 100644 --- a/sidemantic/sql/query_rewriter.py +++ b/sidemantic/sql/query_rewriter.py @@ -3744,23 +3744,6 @@ def _rewrite_yardstick_select_scope( scalar_aggregate = True group_clause = select_scope.args.get("group") - if ( - group_clause - and group_clause.args.get("all") - and not any(projection.is_star for projection in select_scope.expressions) - ): - # Resolve the implicit grain before lowering measures to scalar subqueries. - # Otherwise a HAVING-only measure sees a grand total instead of its group. - group_expressions = [] - for projection, is_metric, is_literal in zip( - select_scope.expressions, projection_is_metric, projection_is_literal, strict=True - ): - expression = projection.this if isinstance(projection, exp.Alias) else projection - if not is_metric and not is_literal and not expression.find(exp.AggFunc, exp.Window): - group_expressions.append(expression.copy()) - if group_expressions: - group_clause = exp.Group(expressions=group_expressions) - select_scope.set("group", group_clause) if group_clause: self._resolve_yardstick_group_ordinals(group_clause, select_scope.expressions) if group_clause and default_alias and single_model_scope: diff --git a/tests/queries/test_yardstick_measures_replay.py b/tests/queries/test_yardstick_measures_replay.py index daaa80941..8604c85e1 100644 --- a/tests/queries/test_yardstick_measures_replay.py +++ b/tests/queries/test_yardstick_measures_replay.py @@ -2,7 +2,6 @@ from __future__ import annotations -import hashlib import os import re import subprocess @@ -801,35 +800,11 @@ def _apply_statement(layer: SemanticLayer, adapter: YardstickAdapter, statement: ) -# Yardstick #72 added a mixed fixture to the legacy (non-PEG) corpus. Its -# attached-store metadata, session/transaction behavior, and implicit measures -# are native extension integration checks, not Sidemantic query capabilities. -# Require review of any changed fixture so no new assertions disappear silently. -_DEFINITION_STORE_FIXTURE_SHA256 = "8301ba931eee4043223d37efb30e819a2b957a4d1e9e93f92cf984fd33da6e82" -_DEFINITION_STORE_PORTABLE_STATEMENTS = {13, 16, 28, 72} -_DEFINITION_STORE_PORTABLE_QUERIES = {23, 42, 54, 75} - - -def _portable_definition_store_records(path: Path) -> tuple[list[_StatementBlock], list[_QueryBlock]]: - digest = hashlib.sha256(path.read_text().rstrip("\n").encode()).hexdigest() - assert digest == _DEFINITION_STORE_FIXTURE_SHA256, ( - f"{path}: upstream definition-store fixture changed; review the native/portable replay boundary" - ) - statements, queries = _parse_measures_test(path) - portable_statements = [record for record in statements if record.line in _DEFINITION_STORE_PORTABLE_STATEMENTS] - portable_queries = [record for record in queries if record.line in _DEFINITION_STORE_PORTABLE_QUERIES] - assert {record.line for record in portable_statements} == _DEFINITION_STORE_PORTABLE_STATEMENTS - assert {record.line for record in portable_queries} == _DEFINITION_STORE_PORTABLE_QUERIES - return portable_statements, portable_queries - - -def _replay_yardstick_sql_test( - path: Path, records: tuple[list[_StatementBlock], list[_QueryBlock]] | None = None -) -> None: +def _replay_yardstick_sql_test(path: Path) -> None: if not path.exists(): pytest.skip(f"Yardstick SQL test file not found: {path}") - statements, queries = _parse_measures_test(path) if records is None else records + statements, queries = _parse_measures_test(path) assert queries, f"No query blocks parsed from Yardstick SQL test: {path}" layer = SemanticLayer(connection="duckdb:///:memory:") @@ -881,18 +856,7 @@ def test_yardstick_upstream_create_view_definitions(): @pytest.mark.yardstick_upstream def test_yardstick_upstream_sql_replay(): for path in _yardstick_upstream_sql_test_paths(): - if path.name == "definition_store.test": - _replay_yardstick_sql_test(path, _portable_definition_store_records(path)) - else: - _replay_yardstick_sql_test(path) - - -def test_changed_definition_store_fixture_requires_review(tmp_path): - path = tmp_path / "definition_store.test" - path.write_text("query I\nSELECT 123;\n----\n456\n") - - with pytest.raises(AssertionError, match="review the native/portable replay boundary"): - _portable_definition_store_records(path) + _replay_yardstick_sql_test(path) def test_parse_statement_record_preserves_batch_and_unterminated_error(tmp_path): diff --git a/tests/queries/test_yardstick_query_rewriter.py b/tests/queries/test_yardstick_query_rewriter.py index 007b9e9fe..0f2fa8e34 100644 --- a/tests/queries/test_yardstick_query_rewriter.py +++ b/tests/queries/test_yardstick_query_rewriter.py @@ -1585,21 +1585,6 @@ def test_yardstick_group_by_extra_spaces(yardstick_layer): } -def test_yardstick_group_by_all_uses_projection_grain_for_having(yardstick_layer): - result = fetch_dicts( - yardstick_layer.sql( - """ -SELECT year, UPPER(region) AS area, COUNT(*) AS n -FROM sales_v -GROUP BY ALL -HAVING AGGREGATE(revenue) > 110 -ORDER BY year, area -""" - ) - ) - assert result == [{"year": 2023, "area": "US", "n": 1}] - - def test_yardstick_group_by_positional_ordinal(yardstick_layer): result = fetch_dicts( yardstick_layer.sql(