Now also replaced URIs with bnodes.
On Thu, Jul 9, 2020 at 1:40 PM Martynas Jusevičius <marty...@atomgraph.com> wrote: > > I've simplified the test case: > https://github.com/namedgraph/jena-test/blob/master/src/test/java/WebIDCertTest.java > > Indeed it looks like the hexBinary length makes a difference - the > long literal leads to a failed test, the short one does not. > > On Thu, Jul 9, 2020 at 1:21 PM Andy Seaborne <a...@apache.org> wrote: > > > > Would it be possible to reduce the complexity? > > > > For example - > > > > Is it essential to use ParameterizedSparqlString? > > > > Use a short lexical form, not one that is 512 characters long. > > Or is it significant it is 512 characters long? > > Ditto subject and predicate. Do they need to be as shown? > > > > Andy > > > > On 09/07/2020 11:01, Martynas Jusevičius wrote: > > > I managed to create a test case that returns a result on 3.0.1 but not > > > on 3.16.0-SNAPSHOT: > > > https://issues.apache.org/jira/browse/JENA-1936 > > > > > > On Thu, Jul 9, 2020 at 12:36 AM Martynas Jusevičius > > > <marty...@atomgraph.com> wrote: > > >> > > >> I managed to reproduce something, I think - the BGP with an explicit > > >> ^^xsd:hexBinary fails to match: > > >> https://github.com/namedgraph/jena-test/blob/master/src/test/java/SPARQLTest.java > > >> > > >> However it fails on both 3.0.1 and 3.16.0-SNAPSHOT. > > >> In the actual code I'm observing a query with xsd:hexBinary which > > >> returns results on 3.0.1 and on 3.16.0-SNAPSHOT command line, but not > > >> in the 3.16.0-SNAPSHOT code. Does not make sense to me. > > >> > > >> On Wed, Jul 8, 2020 at 12:40 PM Martynas Jusevičius > > >> <marty...@atomgraph.com> wrote: > > >>> > > >>> After double checking, this does not return results with 3.0.1 either... > > >>> > > >>> On Wed, Jul 8, 2020 at 11:53 AM Martynas Jusevičius > > >>> <marty...@atomgraph.com> wrote: > > >>>> > > >>>> Hi, > > >>>> > > >>>> after the upgrade to 3.16.0-SNAPSHOT some queries that worked with > > >>>> 3.0.1 do not return results anymore. > > >>>> > > >>>> I tried to narrow it down to a test case: > > >>>> > > >>>> private final String data = > > >>>> "<https://localhost:4443/admin/acl/public-keys/09d7f482-6bc8-4bef-887f-6d63bc4ebc2a/#this> > > >>>> <http://www.w3.org/ns/auth/cert#modulus> > > >>>> \"a0a15887e44bab6c36862c54771324604d55bda36d2c015cbad2dc6528b5c33e01103cfbeb9c8b8a22e7d74c66fc950f0f82616412fc8c5028e9384651d4f40c7c1d40c9b861191894537d719a5098c1eea5521d2273613cdd91563205fa3e25f99ecacc04824b07449087499a6a53a81a6b1d838406a97a0f7d691257fd4cd10662afbdebdbddacb9631a255930470e866949b5e8684b38d82141263f5c6c029f716a026c31f139b3f1164cfc1865283256f75cad0ee23318ca2323bc37704124f4d17f77763314c2ed92a71b2df5a960be83acb83285e1eda6bfb5af6f3f1342487ef961cc96b3680f544626f88c611fbcb2e03c06b261b838f72ecac59831\"^^<http://www.w3.org/2001/XMLSchema#hexBinary> > > >>>> ."; > > >>>> private final Model model = ModelFactory.createDefaultModel(); > > >>>> private final String queryString = "PREFIX cert: > > >>>> <http://www.w3.org/ns/auth/cert#>\n" + > > >>>> "\n" + > > >>>> "SELECT *\n" + > > >>>> "WHERE\n" + > > >>>> " { ?key cert:modulus > > >>>> \"a0a15887e44bab6c36862c54771324604d55bda36d2c015cbad2dc6528b5c33e01103cfbeb9c8b8a22e7d74c66fc950f0f82616412fc8c5028e9384651d4f40c7c1d40c9b861191894537d719a5098c1eea5521d2273613cdd91563205fa3e25f99ecacc04824b07449087499a6a53a81a6b1d838406a97a0f7d691257fd4cd10662afbdebdbddacb9631a255930470e866949b5e8684b38d82141263f5c6c029f716a026c31f139b3f1164cfc1865283256f75cad0ee23318ca2323bc37704124f4d17f77763314c2ed92a71b2df5a960be83acb83285e1eda6bfb5af6f3f1342487ef961cc96b3680f544626f88c611fbcb2e03c06b261b838f72ecac59831\"^^<http://www.w3.org/2001/XMLSchema#hexBinary> > > >>>> .\n" + > > >>>> " }"; > > >>>> > > >>>> @Test > > >>>> public void testXsdHexBinary() > > >>>> { > > >>>> RDFDataMgr.read(model, new > > >>>> ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8)), null, > > >>>> Lang.NTRIPLES); > > >>>> > > >>>> Query query = QueryFactory.create(queryString); > > >>>> try (QueryExecution qex = QueryExecutionFactory.create(query, > > >>>> model)) > > >>>> { > > >>>> ResultSet resultSet = qex.execSelect(); > > >>>> assertTrue(resultSet.hasNext()); > > >>>> } > > >>>> } > > >>>> > > >>>> The test fails as there is no result. > > >>>> > > >>>> What baffles me is that if I save the data and the query into files > > >>>> and run sparql --data=test.nt --query=test.rq, I get the expected > > >>>> result: > > >>>> > > >>>> --------------------------------------------------------------------------------------------- > > >>>> | key > > >>>> | > > >>>> ============================================================================================= > > >>>> | > > >>>> <https://localhost:4443/admin/acl/public-keys/09d7f482-6bc8-4bef-887f-6d63bc4ebc2a/#this> > > >>>> | > > >>>> --------------------------------------------------------------------------------------------- > > >>>> > > >>>> test.nt: > > >>>> > > >>>> <https://localhost:4443/admin/acl/public-keys/09d7f482-6bc8-4bef-887f-6d63bc4ebc2a/#this> > > >>>> <http://www.w3.org/ns/auth/cert#modulus> > > >>>> "a0a15887e44bab6c36862c54771324604d55bda36d2c015cbad2dc6528b5c33e01103cfbeb9c8b8a22e7d74c66fc950f0f82616412fc8c5028e9384651d4f40c7c1d40c9b861191894537d719a5098c1eea5521d2273613cdd91563205fa3e25f99ecacc04824b07449087499a6a53a81a6b1d838406a97a0f7d691257fd4cd10662afbdebdbddacb9631a255930470e866949b5e8684b38d82141263f5c6c029f716a026c31f139b3f1164cfc1865283256f75cad0ee23318ca2323bc37704124f4d17f77763314c2ed92a71b2df5a960be83acb83285e1eda6bfb5af6f3f1342487ef961cc96b3680f544626f88c611fbcb2e03c06b261b838f72ecac59831"^^<http://www.w3.org/2001/XMLSchema#hexBinary> > > >>>> . > > >>>> > > >>>> test.rq: > > >>>> > > >>>> PREFIX cert: <http://www.w3.org/ns/auth/cert#> > > >>>> > > >>>> SELECT * > > >>>> WHERE > > >>>> { ?key cert:modulus > > >>>> "a0a15887e44bab6c36862c54771324604d55bda36d2c015cbad2dc6528b5c33e01103cfbeb9c8b8a22e7d74c66fc950f0f82616412fc8c5028e9384651d4f40c7c1d40c9b861191894537d719a5098c1eea5521d2273613cdd91563205fa3e25f99ecacc04824b07449087499a6a53a81a6b1d838406a97a0f7d691257fd4cd10662afbdebdbddacb9631a255930470e866949b5e8684b38d82141263f5c6c029f716a026c31f139b3f1164cfc1865283256f75cad0ee23318ca2323bc37704124f4d17f77763314c2ed92a71b2df5a960be83acb83285e1eda6bfb5af6f3f1342487ef961cc96b3680f544626f88c611fbcb2e03c06b261b838f72ecac59831"^^<http://www.w3.org/2001/XMLSchema#hexBinary> > > >>>> . > > >>>> } > > >>>> > > >>>> What is the explanation here? > > >>>> > > >>>> Thanks.