W3C

– DRAFT –
RDF-Star WG SPARQL Task Force

18 July 2025

Attendees

Present
AndyS, gtw, james, pfps, TallTed, Tpt
Regrets
-
Chair
AndyS
Scribe
AndyS, Tpt

Meeting minutes

Discussion: subqueries -- LATERAL-like and parameterization-like behaviours

AndyS: Added sometests to exists-filter for filter inside {},and OPTIONAL

AndyS: Inside subqueries, a variable can be "hidden" by projection

Example 1

SELECT ?v WHERE {

BIND ( <ex:a> AS ?v )

FILTER EXISTS { SELECT ?v WHERE { FILTER (?v = <ex:a>) } }

}

Example 2

SELECT ?v WHERE {

BIND ( <ex:a> AS ?v )

FILTER EXISTS {

SELECT ?Z WHERE {

BIND("abc" AS ?Z)

FILTER (?v = <ex:a>)

} }

}

AndyS: parameterized-like vs LATERAL-like

james: pref like a parameterized query
… because have seen this on our services

<pfps> is there any definition of parameterized queries?

<pfps> how about in SHACL?

james: No there isn't
… one should tend have something as close as possible to parameterized queries

tpt: Maybe to 2 kinds and param query : SQL like is replace regardless
… and scoped considered defn

pfps: SHACL?

AndyS: SHACL has a similar mechanism .. a bit weak , e.g. can get into bad queries.

<pfps> does SQL have a mechanism for hiding interior variables?

AndyS: SHACL 1.2 does not use SPARQL so widely

<pfps> if not, then I don't see that experience from SQL is relevant

tpt: SQL -- Prepared queries

Tallted: no protection in ODBC/JDBC - but we(OpenLink) add defenses

<Tpt> SELECT employee_number, name

<Tpt> FROM employees emp

<Tpt> WHERE salary > (

<Tpt> SELECT AVG(salary)

<Tpt> FROM employees

<Tpt> WHERE department = emp.department);

james: Q to tpt -- dynamic scope vs parameterized queries

tpt: this SQL

james: what is the relation to parameters and whether they have scope of the query

tpt: we substitute in the subquery IFF variables exposed.

tpt: Correlated behavior

<AndyS> s/correated/correlated/

tpt: capture inside if in the project

james: there are case where the expecation is the opposite.

tpt: example SELECT ?x WHERE ... ?y ... and binding ?y
… do we have to use the same mechanism parameterized and LATERAL - seem like two similiar but different

james: maybe having one is easier to explain

AndyS: Looking at SQL has a distraction: we are talking at mechanism that works on SPARQL variables but SQL has no variable

Andy: In Tpt's example it's correlation, we need to be careful taking from SQL

AndyS: If I remember correctly you have to replace all parameters in the parametrized query

tpt: Agree SQL is different because parameterization and correlation are separate concepts
… SQL is an inspiration

AndyS: The renaming is a separate step, we can use it only on LATERAL but not in parameterized query while sharing execution

gtw: No strong feeling - slightly in favor of composability i.e. correlated
… which is a little further from SPARQL 1.1

<pfps> I prefer to have project hide here just like it does elsewhere

pfps: prefer that projection hides so hidden naming renaming is idempotent

FILTER EXISTS { SELECT ?v WHERE { FILTER (?v = <ex:a>) } }

<pfps> FILTER EXISTS { SELECT ?X WHERE { FILTER (?v = <ex:a> ) } }

<pfps> first affected, second not

pfps: latter case ?v is not affected

tallted: SQL - different parameterization syntax for the parameterization position.

james: in the back of my mind - there are cases where a variable in a filter regardless of position is intended to have an effect.

<AndyS> s/where having a variable/

<james> ... where the variable is intended to be a request parameter.

<TallTed> relatively recent documentation (last updated circa 2016) --

<TallTed> 16.2.5. SPARQL Inline in SQL

gtw: in AWS the open cypher style of different syntax for parameter points.

Topic for next time

<gtw> potential regrets for next week (some uncertainty).

<james> i would be here

Minutes manually created (not a transcript), formatted by scribe.perl version 244 (Thu Feb 27 01:23:09 2025 UTC).

Diagnostics

Succeeded: s/som /some/

Succeeded: s/agendum 3 -- Topic for next time -- taken up [from agendabot]//

Succeeded: s/varibale/variable/

Succeeded: s/Example/Example 1/

Succeeded: s/agendum 2 -- Discussion: subqueries -- LATERAL-like and parameterization-like behaviours -- taken up [from agendabot]//

Succeeded: s/agendum 1 -- Scribe? -- taken up [from agendabot]//

Succeeded: s/ BIND/ BIND/

Succeeded: s/present?//

Succeeded: s/SAHCL/SHACL/

Succeeded: s/tpt: do/tpt:/

Failed: s/correated/correlated/

Succeeded: s/Collerated/Correlated/

Succeeded: s/remind/remember/

Succeeded: s/is parametrized/in parameterized/

Succeeded: s/ is affected/is not affected/

Succeeded: s/?vis/?v is/

Failed: s/where having a variable/

Succeeded: s/position/position is intended to have an effect/

Maybe present: Andy

All speakers: Andy, AndyS, gtw, james, pfps, Tallted, tpt

Active on IRC: AndyS, gtw, james, pfps, TallTed, Tpt