Re: sparql sample and undefined values

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