Giter VIP home page Giter VIP logo

Comments (3)

osma avatar osma commented on May 9, 2024

This also happens with literals, e.g.

$ hdtsparql.sh example.hdt 'SELECT * { VALUES ?o { "Example2" }  ?s ?p ?o }'

gives the same exception but with ?o instead of ?s in the error message.

from hdt-java.

osma avatar osma commented on May 9, 2024

HDTSolverLib.java line 201 comment says: // Even put "does not exist" if it is null.
This suggests to me that being able to store a null value is expected.

But actually BindingHDTId.java line 78 checks for a null value and throws an exception.

Possible ways to fix:

  1. Change BindingHDTId to allow a null value. Possibly dangerous, since it may cause breakage elsewhere.
  2. Check for a null return value from the getID call and shortcut the loop with continue, as is done a few lines above in HDTSolverLib.

I'm unfamiliar with the codebase so I'm not sure about the consequences of these two options, but I can try to do a PR if it's useful. Hints welcome.

from hdt-java.

osma avatar osma commented on May 9, 2024

I tested both approaches (1 and 2 in the previous comment) but they both give invalid results - the queries should return nothing for the example queries and data in the original issue report, but instead they return a binding http://example.org/2,http://schema.org/name,Example.

from hdt-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.