Skip to content

Conversation

Tpt
Copy link
Contributor

@Tpt Tpt commented Sep 30, 2025

Close #293


Preview | Diff

@Tpt Tpt requested review from kasei, afs, rubensworks and hartig September 30, 2025 18:00
@Tpt Tpt changed the title Forbid repeated variables in VALUES Forbid duplicated variables in VALUES Sep 30, 2025
@Tpt Tpt force-pushed the tpt/duplicated-values branch from 78e11e5 to 0265296 Compare September 30, 2025 18:01
@Tpt Tpt force-pushed the tpt/duplicated-values branch from 0265296 to 19d00a7 Compare September 30, 2025 18:02
Co-authored-by: Olaf Hartig <olaf.hartig@liu.se>
Co-authored-by: Andy Seaborne <andy@apache.org>
@Tpt Tpt force-pushed the tpt/duplicated-values branch from 334e034 to bd32e3a Compare October 1, 2025 16:27
Tpt added a commit to w3c/rdf-tests that referenced this pull request Oct 1, 2025
Tpt added a commit to w3c/rdf-tests that referenced this pull request Oct 1, 2025
Tpt added a commit to w3c/rdf-tests that referenced this pull request Oct 1, 2025
@TallTed
Copy link
Member

TallTed commented Oct 2, 2025

VALUES blocks can occur in multiple locations:

<p>A <code>VALUES</code> block of data can appear in a query pattern or at the end of a
  <code>SELECT</code> query, including a <a href="#subqueries">subquery</a>.</p>

It has occurred to me to wonder whether there may be more than one VALUES block in the same query, and if so, whether the variables must be unique within each VALUES block or within the combination of all VALUES blocks.

I think the text should be adjusted to make plain whichever of the above is correct.

@hartig
Copy link
Contributor

hartig commented Oct 2, 2025

The variables must only be unique within each VALUES block. On the level of the algebraic syntax, each VALUES clause becomes a multiset of solution mappings that is joined with the result of other patterns. Hence, if there are two VALUES clauses their respective multiset of solution mappings are joined with one another.

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Tpt added a commit to w3c/rdf-tests that referenced this pull request Oct 2, 2025
Tpt added a commit to w3c/rdf-tests that referenced this pull request Oct 2, 2025
Co-authored-by: Andy Seaborne <andy@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify VALUES with repeated variable names
5 participants