Hi Gustavo and Sergio, yes, fixing the SQL query seems the right solution to me. I can do it on the weekend if you like.
Sebastian Sergio Fernández <[email protected]> schrieb am Di., 6. Juni 2017 um 12:21 Uhr: > Hi Gustavo, > > that's a historic difference between pure Sesame and Marmotta. > > In the early days of KiWi there was not allowed the null context, but there > a default context where triples go when no context is specified. > > Therefore the semantic os null on query is a wildcard (i.e., in context). > > From the proposed solutions I'd prefer the first one. But maybe > Sebastian Schaffert may have a different point of view. > > Cheers, > > > On Tue, May 30, 2017 at 7:40 AM, Gustavo Mora <[email protected]> wrote: > > > In the test [1], the default context of Kiwi is set to null, which > implies > > that triples inserted into the data base will have a null context too. > > However, there is a new test in Sesame 2.8.11 that tests duplicated > triples > > and it is failing with null contexts. The problem is that Kiwi uses the > > following SQL to determine whether a triple is already stored or not. > > > > SELECT ID .... WHERE subject=# AND predicate=# AND object=# AND > > context=null ... > > > > This SQL always returns an empty result set, because the condition > > 'context = null' is not valid and should be replaced with 'context is > > null'. This causes that duplicated triples can be stored in Kiwi. > > > > So there are two solutions: > > > > 1) To keep allowing null context and modify SQL query. > > 2) Modify the test to work with a non-null context? > > > > Cheers, > > Gustavo. > > > > [1] > > https://github.com/gmora1223/marmotta/blob/MARMOTTA-659/ > > libraries/kiwi/kiwi-triplestore/src/test/java/org/ > > apache/marmotta/kiwi/test/sesame/repository/KiWiRepositoryConnectionTest. > > java > > >
