Hi Ivan,

On Wed, Nov 2, 2016 at 12:32 PM, Ivan Mikhailov <imikhai...@openlinksw.com>
wrote:
>
> How do you know that FILTER (STRLEN(?literal) = 8) is executed before
> SUBSTR(?literal, 8, 1) ?


FILTER is placed before SUBSTR in the WHERE clause. SPARQL optimizer may
(incorrectly) switch that order.


> What's the full text of the query?


The original query is at https://github.com/jindrichmynarz/vvz-to-rdf/blob/
f8d421002eef19359ffd89b0d209b47e87b2ee0e/sparql/invalid_ico_revalidate.ru.

Virtuoso translates SPARQL to SQL and uses all allowed term rewritings
> and other tricks trying to get highest possible speed. As a side effect,
> the order of execution may be non-linear. So the simplest step of
> debugging is an additional test: what if
> SUBSTR(?literal, 8, 1)
> is replaced with
> IF (STRLEN(?literal) = 8), SUBSTR(?literal, 8, 1), "some fallback
> value")
> ?
>

I tried that (with fallback = 1) only to stumble upon another error:

Virtuoso 22023 Error SR553: Literal of type xsd:integer can not be created
from SQL value of type rdf (246): SR341: Invalid integer value converting
'A'

To my knowledge, there's no literal "A" to be casted to an integer.

- Jindřich

-- 
Jindřich Mynarz
http://mynarz.net/#jindrich
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to