Open hurui200320 opened 5 days ago
Additional note: I applied the same test to the new SailRepository(new MemoryStore())
, and it has no issue with finishing all the tests. So the issue is likely related to the extensible store. The var == null
eliminate the NPE and the tests are passed, but I'm not sure if this really solves the issue.
Seems a bit strange that it's null to begin with. Should probably find out if it being null means either the union of all graphs or the default unnamed graph.
Current Behavior
I'm currently implementing a storage sail based on the experimental extensible store. When applied the
RepositorySPARQLComplianceTestSuite
to it (usingnew SailRepository(new FooStore())
), two tests failed because of NPE. The stacktrace shows the method isExtensibleDynamicEvaluationStatistics$ExtensibleDynamicEvaluationStatisticsCardinalityCalculator.getContextCardinality
:The stacktrace:
Expected Behavior
The code should not throw NullPointerException. From this getter code, it looks like providing a default context if the var doesn't have one. So the following code will work:
The
var == null
will eliminate the NPE, but I'm not sure if that's the correct way to handle. Maybe the parametervar
should not be null at the first place?Steps To Reproduce
RepositorySPARQLComplianceTestSuite
(fromrdf4j-sparql-testsuite
) toElasticsearchStore
(fromrdf4j-sail-elasticsearch-store
)org.eclipse.rdf4j.testsuite.sparql.tests.BindTest#testBindError
should fail because of NPEA kotlin code for the test:
Version
5.0.2
Are you interested in contributing a solution yourself?
Perhaps?
Anything else?
https://github.com/eclipse-rdf4j/rdf4j/blob/main/core/sail/extensible-store/src/main/java/org/eclipse/rdf4j/sail/extensiblestore/evaluationstatistics/ExtensibleDynamicEvaluationStatistics.java#L229-L237