From: Bryan T. <br...@sy...> - 2015-04-20 19:14:50
|
Lee, How much of a blocker is this? You could replace * with the variables in the given query by hand. Or are your queries being generated such that you have less control over this? You could certainly try the following. It will also recurse into the annotations. @SuppressWarnings("unchecked") final Iterator<QueryBase> itr = (Iterator<QueryBase>) new Striterator( * BOpUtility.postOrderIteratorWithAnnotations((BOp) queryRoot* .getWhereClause())).addTypeFilter(QueryBase. class); Thanks, Bryan Bryan ---- Bryan Thompson Chief Scientist & Founder SYSTAP, LLC 4501 Tower Road Greensboro, NC 27410 br...@sy... http://blazegraph.com http://blog.bigdata.com <http://bigdata.com> http://mapgraph.io Blazegraph™ <http://www.blazegraph.com/> is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ <http://www.systap.com/mapgraph> is our disruptive new technology to use GPUs to accelerate data-parallel graph analytics. CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. On Mon, Apr 20, 2015 at 1:20 PM, Lee Kitching <le...@sw...> wrote: > Hi, > > We are currently evaluating using Blazegraph as our rdf database and have > run in the issue described at http://trac.bigdata.com/ticket/757. > The below query causes the AssertionError to be thrown: > > SELECT (COUNT(*) as ?c) { > SELECT ?uri ?graph where { > { > SELECT * WHERE { > GRAPH ?graph { > ?uri a <http://object> . > ?uri <http://purl.org/dc/terms/title> ?title . > } > MINUS { > ?uri a <http://other> > } > } > ORDER BY ?title > } > } > } > > Some debugging shows that the error is caused by the > ASTWildcardProjectionOptimizer failing to recurse into the subqueries to > rewrite the * projection. However this recursion is implemented in the > BOpUtility.postOrderIterator(BOp) method - this method uses the argIterator > to > find child operators and therefore only visits children for nodes with an > arity > 0. > > The root query node for the above query has an empty 'args' collection and > all the associated components of the top-level query are stored in the > annotations map. It looks like the iterator should search through the > annotations rather than the args for query nodes. > > As there are a lot of implementations of the BOp interface, it seems that > changing the postOrderIterator2(BOp) method is unlikely to be the correct > fix. It seems that either the AST query nodes should override the arity() > function to return the count of the annotations map, or the > ASTWildcardProjectionOptimizer should use its own iterator for the nodes of > the query. The latter option would be the least impactful change but I am > not familiar with the codebase to understand the correct fix. > > Any help in resolving the issue would be appreciated. > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live > exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > > |