Andy Seaborne commented on JENA-1499:

If by a check for empty set, you mean in the TIM code, then that is OK by me 
because that Set is cheap for isEmpty (isn't it?)

In the general stack, no. What is expensive and what is cheap can be hard to 
know and sometimes varies wildly across implementations. The checking would 
have to be in very deep and breaks the "hand out graph" design.

The explicitly link based on ({{createGeneral()}}), it makes sense and output 
in TriG is (a bit) useful.

The implicitly link based on ({{create()}}) it is more like history as it is 
now copy-in semantics, not link. There is a ghost in {{Dataset.listNames()}} 
and {{containsNamedModel}} and the TriG issue is fallout but it is consistent 
for "contains" and "in Trig".

We could add to the javadoc but an actual functional change looks to me like 
something that just as likely to cause the opposite issue. 

> The TIM dataset retains a memory of named graphs after deleting all quads.
> --------------------------------------------------------------------------
>                 Key: JENA-1499
>                 URL: https://issues.apache.org/jira/browse/JENA-1499
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.6.0
>            Reporter: Andy Seaborne
>            Priority: Major
> Illustration:
> {noformat}
>         DatasetGraph dsg = DatasetGraphFactory.createTxnMem();
>         Quad q = SSE.parseQuad("(:g :s :p :o)");
>         dsg.add(q);
>         dsg.delete(q);
>         Iter.print(dsg.listGraphNodes());
> {noformat}
> prints {{http://example/g}}.

This message was sent by Atlassian JIRA

Reply via email to