diff --git a/Makefile b/Makefile index ba010e7ad..b88866acf 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ RECORDER ?= 1 EVIDENCE_BASE ?= origin/main # The DuckShop benchmarks and the SQLBuild release that compiles them, pinned together as in CI. SQLBUILD_REF ?= a7bc60e0abee5bb19d67e5bdc948e048a1df82e0 -SQLBUILD_VERSION ?= 0.187.2 +SQLBUILD_VERSION ?= 0.231.0 DUCKSHOP_DIR ?= target/duckshop # Compiled DuckShop projects the exact parser check reads; `make duckshop-compiled` builds them. DUCKSHOP_COMPILED ?= $(DUCKSHOP_DIR)/sqlbuild/benchmarks/duckshop/project/target/compiled $(DUCKSHOP_DIR)/duckshop-10k/target/compiled diff --git a/tests/unit/scripts/grammar_obligations/test_cases.py b/tests/unit/scripts/grammar_obligations/test_cases.py index 8cde57f60..636c92012 100644 --- a/tests/unit/scripts/grammar_obligations/test_cases.py +++ b/tests/unit/scripts/grammar_obligations/test_cases.py @@ -17,8 +17,13 @@ run_database_setups, settled_cases, ) -from scripts.grammar_obligations.constants import CASE_CAPTURE_RUN_DATABASE -from scripts.grammar_obligations.models import ReceiptView +from scripts.grammar_obligations._helpers.obligations import family_obligations +from scripts.grammar_obligations.constants import ( + CASE_CAPTURE_RUN_DATABASE, + KIND_INTERACTION_ALL, + KIND_OPTION_PRESENT, +) +from scripts.grammar_obligations.models import Draft, ReceiptView from scripts.grammar_obligations.types import Row from tests.unit.scripts.grammar_obligations._test_types import ( DisprovedExpectationTestCase, @@ -459,8 +464,12 @@ def test_given_a_refused_case_with_every_option_when_building_cases_then_each_op for case in cases: by_obligation |= dict.fromkeys(case["obligations"], str(case["sql"])) all_options: Row = {case["sql"]: case for case in cases}[ALL_OPTIONS_SQL] + numbered: list[tuple[str, Draft]] = family_obligations(root=tmp_path, family="ddl")[0] + by_kind: dict[str, list[str]] = {} + for found, draft in numbered: + by_kind.setdefault(draft.kind, []).append(found) assert ( - by_obligation["sf.ddl.alter-widget.set.o005"], - by_obligation["sf.ddl.alter-widget.set.o010"], - "sf.ddl.alter-widget.set.o016" in all_options["obligations"], + by_obligation[by_kind[KIND_OPTION_PRESENT][0]], + by_obligation[by_kind[KIND_OPTION_PRESENT][1]], + by_kind[KIND_INTERACTION_ALL][0] in all_options["obligations"], ) == (*test_case.expected_option_sql, True), test_case.description