You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Commented) (JIRA)" <ji...@apache.org> on 2012/03/20 20:35:40 UTC

[jira] [Commented] (JENA-222) Graph.size() reports '0' for TDB "urn:x-arq:UnionGraph"

    [ https://issues.apache.org/jira/browse/JENA-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233683#comment-13233683 ] 

Andy Seaborne commented on JENA-222:
------------------------------------

Yes - countThis needs to be sensitive to the union graph.  It's also going to have to be sensitive to duplicates because multiple named graph can have duplicate triples.  It'll take an Iter.distinct to do that so it will be non-trivial additional cost but anything like counting does not make sense at scale anyway.

Implemented in TDB SVN and in a snapshot build tonight.


                
> Graph.size() reports '0' for TDB "urn:x-arq:UnionGraph"
> -------------------------------------------------------
>
>                 Key: JENA-222
>                 URL: https://issues.apache.org/jira/browse/JENA-222
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: TDB
>         Environment: tdb version 0.8.9 (via Apache Clerezza)
>            Reporter: Rupert Westenthaler
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: TDB 0.9.1
>
>
> using
>     Dataset dataset = TDBFactory.createDataset(dir);
>     Model model dataset.getNamedModel("urn:x-arq:UnionGraph");
>     Graph graph = model.getGraph();
>     int size = graph.size();
> size will always report zero regardless of the amount of triples stored in the different named models of the dataset.
> I think this is because com.hp.hpl.jena.tdb.store.GraphNamedTDB#countThis() would need special treatment in case of  "isQuadUnionGraph(graphNode) == true"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira