Issue with updating quadruples in Virtuoso quad store when changing object from `xsd:gYearMonth` to `xsd:date`
There appears to be a bug in Virtuoso quad store when attempting to update a quadruple where the object is a literal of type xsd:gYearMonth and the new object is a literal of type xsd:date with the same year and month, but adding the day as "01". The issue does not occur when the new literal is of a completely different date or when the day is set to any other value, such as "02".
Steps to Reproduce
- Insert a quadruple with a
xsd:gYearMonthliteral object. For example:
INSERT DATA {
GRAPH <https://w3id.org/oc/meta/br/09110435/graph> {
<https://w3id.org/oc/meta/br/09110435>
<http://prismstandard.org/namespaces/basic/2.0/publicationDate>
"2024-10"^^<http://www.w3.org/2001/XMLSchema#gYearMonth> .
}
}
- Try to update the quadruple by deleting the previous one and inserting a new one with a
xsd:dateliteral where the day is set to "01":
DELETE {
GRAPH <https://w3id.org/oc/meta/br/09110435/graph> {
<https://w3id.org/oc/meta/br/09110435>
<http://prismstandard.org/namespaces/basic/2.0/publicationDate>
"2024-10"^^<http://www.w3.org/2001/XMLSchema#gYearMonth> .
}
};
INSERT {
GRAPH <https://w3id.org/oc/meta/br/09110435/graph> {
<https://w3id.org/oc/meta/br/09110435>
<http://prismstandard.org/namespaces/basic/2.0/publicationDate>
"2024-10-01"^^<http://www.w3.org/2001/XMLSchema#date> .
}
};
Expected Behavior:
- The quadruple with the
gYearMonthliteral should be deleted. - The new quadruple with the
dateliteral should be inserted.
Actual Behavior:
- No changes are made to the quad store.
- The original quadruple remains unchanged, and the new quadruple is not inserted.
Additional Information:
- If the new literal is a
datewith a day other than "01" (e.g., "2024-10-02"), the update works as expected. - The issue appears to specifically affect the transition from
gYearMonthtodatewhen the day is set to "01".
Environment:
- virtuoso-opensource version 07.20.3240 on Linux (x86_64-ubuntu_focal-linux-gnu) Single Server Edition (480 GB total memory, 238 MB memory in use)
Your test case works for me following the steps provided, with the Virtuoso open source Version 07.20.3240-pthreads for Linux as of Jul 3 2024 (a4349d4df) build I have, with the following triple added to the database:
s p o
https://w3id.org/oc/meta/br/09110435 http://prismstandard.org/namespaces/basic/2.0/publicationDate
2024-10-01
What additional data might exist in the database as mine is pretty much an empty database ?
Was your Virtuoso binary compiled by yourself ?
You might want to try with our prebuilt Linux binary available at:
https://github.com/openlink/virtuoso-opensource/releases/download/v7.2.13/virtuoso-opensource.x86_64-generic_glibc25-linux-gnu.tar.gz
We have determined that this issue appears to be timezone related, as I can recreate with EDT timezone, whereas not with my default UTC timezone. We are looking into this...
I closed this issue by mistake