-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems generating or using empty HDT files #31
Comments
this seams to work in the current version |
So for the direction
hdt-java/hdt-java-core/src/main/java/org/rdfhdt/hdt/triples/impl/BitmapTriples.java Line 214 in 594e5f6
the seqY has length zero but bitmapY has length 1. I'm 90% sure this is encoded in the HDT file wrongly. Why then it opens in c++ and not in java? The c++ version is not making the same check as java hdt-java/hdt-java-core/src/main/java/org/rdfhdt/hdt/compact/bitmap/AdjacencyList.java Line 49 in 594e5f6
that is why in c++ we can search over it and not in java. Moreover if we remove the check in java we can open the file and it contains no triples. @mielvds : should I open an issue in the c++ version? |
For the direction:
I think the best is to debug it in the c++ version. |
Nice findings @D063520 ! Yes, let's bounce this over to the C++ version. and close this issue |
Ok, I'm moving the first issue .... |
I noticed that the hdt-java tools cannot handle empty HDT files i.e. files with zero triples.
Trying to generate a HDT file based on an empty N-Triple file fails:
Another way of triggering the same exception is to generate the zero-triple HDT file using hdt-cpp (which works) and then attempt to use it using hdtsparql.sh:
While one can argue about the usefulness of empty (i.e. zero triples) HDT files, I don't think this special case should trigger an exception. I noticed this while writing unit tests for my application; the tests exercise some special situations, and one of them happens to generate an empty NT file which will then be converted to HDT and queried using hdtsparql.sh.
The text was updated successfully, but these errors were encountered: