From f1d5cead1a56860430af2c47286d4c1d0bbfd609 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 23 May 2026 10:29:31 +0200 Subject: [PATCH 1/2] SPARQL 1.2: Add a test to cover variable introduced by an earlier SELECT expression See https://github.com/w3c/sparql-query/pull/380 --- sparql/sparql12/grouping/manifest.ttl | 8 ++++++++ .../sparql12/grouping/select-variable-reuse.rq | 3 +++ .../sparql12/grouping/select-variable-reuse.srx | 17 +++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 sparql/sparql12/grouping/select-variable-reuse.rq create mode 100644 sparql/sparql12/grouping/select-variable-reuse.srx diff --git a/sparql/sparql12/grouping/manifest.ttl b/sparql/sparql12/grouping/manifest.ttl index eae3c68f..c216b1ee 100644 --- a/sparql/sparql12/grouping/manifest.ttl +++ b/sparql/sparql12/grouping/manifest.ttl @@ -10,6 +10,7 @@ mf:entries ( :group01 + :select-variable-reuse ) . @@ -23,3 +24,10 @@ mf:result ; mf:requires mf:NoCanonicalizationOfNumerics . + +:select-variable-reuse rdf:type mf:QueryEvaluationTest ; + mf:name "Reuse of SELECT variable"; + mf:action + [ qt:query ] ; + mf:result + . diff --git a/sparql/sparql12/grouping/select-variable-reuse.rq b/sparql/sparql12/grouping/select-variable-reuse.rq new file mode 100644 index 00000000..3709bb6e --- /dev/null +++ b/sparql/sparql12/grouping/select-variable-reuse.rq @@ -0,0 +1,3 @@ +SELECT (COUNT(?v) AS ?count) (?count + 1 AS ?countPlusOne) WHERE { + VALUES ?v { 0 1 2 3 } +} diff --git a/sparql/sparql12/grouping/select-variable-reuse.srx b/sparql/sparql12/grouping/select-variable-reuse.srx new file mode 100644 index 00000000..47915fdd --- /dev/null +++ b/sparql/sparql12/grouping/select-variable-reuse.srx @@ -0,0 +1,17 @@ + + + + + + + + + + 4 + + + 5 + + + + From b8bd6fca13ec995b7641b4f84abc8e7b3c6ae441 Mon Sep 17 00:00:00 2001 From: Thomas Tanon Date: Sat, 23 May 2026 19:19:49 +0200 Subject: [PATCH 2/2] Update sparql/sparql12/grouping/manifest.ttl Co-authored-by: Gregory Todd Williams --- sparql/sparql12/grouping/manifest.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparql/sparql12/grouping/manifest.ttl b/sparql/sparql12/grouping/manifest.ttl index c216b1ee..c735171e 100644 --- a/sparql/sparql12/grouping/manifest.ttl +++ b/sparql/sparql12/grouping/manifest.ttl @@ -26,7 +26,7 @@ . :select-variable-reuse rdf:type mf:QueryEvaluationTest ; - mf:name "Reuse of SELECT variable"; + mf:name "Reuse of SELECT variable in an aggregating query"; mf:action [ qt:query ] ; mf:result