W3C home > Mailing lists > Public > public-sparql-dev@w3.org > January to March 2016

Re: sparql sample and undefined values

From: Jörn Hees <j_hees@cs.uni-kl.de>
Date: Sat, 30 Jan 2016 15:24:58 +0100
To: public-sparql-dev@w3.org
Message-Id: <EB33B8B1-35E6-4242-B37A-2B4BA34760E9@cs.uni-kl.de>
Hi,

> What was RDFLib producing?

VALUES (?x ?ys ?zs) {
  (3 UNDEF 15)
  (5 UNDEF 25)
  (2 6 UNDEF)
}


> Both are right, though the Virtuoso one is pragmatically more useful in this specific case. There is no one "right" in general when SAMPLE is involved. Aggregation calculation retains errors and ?z of UNDEF is an error. SAMPLE picks any value from the choices, and at that point, errors are "values". See ListEval.

I understand that sample can pick an arbitrary value from its choices.
When it comes to error cases though, it seems this causes confusion as people might not expect an UNDEF to be a solution if there are other values to pick from... (undef has to be picked: (5 UNDEF 25) vs. can pick an actual value: (2 6 10)).

As you put it yourself it's pragmatically more useful, so would it hurt to put a preference like that into the standard?

In any case it would be cool if there was a small example (like the one above) that clarifies the behaviour.

Jörn
Received on Saturday, 30 January 2016 14:25:24 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 30 January 2016 14:25:25 UTC