Inconsistent handling of typed literals in sparql-update
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
Línea de trabajo
El payload no menciona archivos fuente ni pruebas; empieza reproduciendo la secuencia SPARQL UPDATE PATCH contra un recurso vacío e inspecciona el manejo de actualizaciones SPARQL y literales RDF del servidor. Se considera terminado cuando solicitudes equivalentes INSERT DATA y DELETE DATA con los literales double tipados indicados se ejecuten correctamente de forma consistente, con una prueba de regresión que cubra el caso.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
TL;DR
Subsequent INSERT DATA and DELETE DATA of the same triple with object "1234.56789e0"^^<http://www.w3.org/2001/XMLSchema#double> leads to response status 409 Conflict.
edit: The first request actually contained "1234.56789"^^<http://www.w3.org/2001/XMLSchema#double>, and the second one contained "1234.56789e0"^^<http://www.w3.org/2001/XMLSchema#double>. Please notice the e0 difference.
actual behavior
I send a patch request on an empty or non-existent resource (newlines added for easier readability):
curl 'https://testuser.solidcommunity.net/path/to/resource' \
-X PATCH \
[...]
-H 'content-type: application/sparql-update' \
-H 'authorization: DPoP [...]' \
-H 'dpop: [...]' \
[...]
--data-raw $'INSERT DATA {
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/2003/01/geo/wgs84_pos#lat>
"60.235039190740146"^^<http://www.w3.org/2001/XMLSchema#double> .
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/2003/01/geo/wgs84_pos#long>
"24.941368103027344"^^<http://www.w3.org/2001/XMLSchema#double> .
}'
And a resource with the following content is produced:
@prefix : <#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
:location
a geo:Point; geo:lat 60.235039190740146e0; geo:long 24.941368103027344e0 .
Please note that typed literals were replaced with numbers.
Then i send another request (INSERT DATA changed to DELETE DATA):
edit: actually, there is additional small difference, the numbers also end with e0. when the e0 is removed, the request passes with 200 and data get deleted correctly. So NSS may behave consistently after all.
curl 'https://testuser.solidcommunity.net/path/to/resource' \
-X PATCH \
[...]
-H 'content-type: application/sparql-update' \
-H 'authorization: DPoP [...]' \
-H 'dpop: [...]' \
[...]
--data-raw $'DELETE DATA {
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/2003/01/geo/wgs84_pos#lat>
"60.235039190740146e0"^^<http://www.w3.org/2001/XMLSchema#double> .
<https://testuser.solidcommunity.net/path/to/resource#location>
<http://www.w3.org/2003/01/geo/wgs84_pos#long>
"24.941368103027344e0"^^<http://www.w3.org/2001/XMLSchema#double> .
}'
and the request fails with status code 409 Conflict and body
The patch could not be applied. Could not find to delete: <https://testuser.solidcommunity.net/path/to/resource#location> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "60.235039190740146e0"^^<http://www.w3.org/2001/XMLSchema#double> .
or <https://testuser.solidcommunity.net/path/to/resource#location> <http://www.w3.org/2003/01/geo/wgs84_pos#long> "24.941368103027344e0"^^<http://www.w3.org/2001/XMLSchema#double> .
When typed literals are changed to numbers, response is 200.
expected behavior
Sending subsequent INSERT DATA {} and DELETE DATA {} with identical body should succeed.
Either the server should save the typed literal as typed literal, or it should treat typed literal "double" and number as identical for the purposes of DELETE DATA. Intuitively, the former feels more correct.
NSS version
Account on https://solidcommunity.net (2023-03-17)
Name
solidcommunity.net
Description
An experimental solid server run by the community
Details
Running on [Node Solid Server 5.7.6](https://github.com/solid/node-solid-server/releases/tag/v5.7.6)
further note
Both requests were produced by Comunica. If we want to keep using the library, we have little control over the queries produced.
This may also be an issue with Comunica itself, since it might be creating incorrect DELETE DATA query - with typed literals, not numbers.
All depends on whether "1234.56789e0"^^http://www.w3.org/2001/XMLSchema#double and 1234.56789e0 are equivalent in RDF. idk whether they are.
Regardless, this is an issue with NSS.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.8k
- Forks
- 308
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nodeSolidServer/node-solid-server
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
nodeSolidServer/node-solid-server#1848 · 2 comentarios · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nodeSolidServer/node-solid-server#1841 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nodeSolidServer/node-solid-server#1147 ·
-
remove bootstrap dependency Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
nodeSolidServer/node-solid-server#1867 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
nodeSolidServer/node-solid-server#1853 ·
Todos los issues de nodeSolidServer/node-solid-server
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Seeed-Studio/wiki-documents#5655 · 2 comentarios ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
capricorn86/happy-dom#2435 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Edit: CW+ Abiertochannels:edit check:passed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100