Aklakan commented on PR #3753:
URL: https://github.com/apache/jena/pull/3753#issuecomment-3900352596
Meh, the patch can be further simplified by removing the inner try-catch
blocks in `StageGeneratorGeneric`:
```java
protected QueryIterator execute(BasicPattern pattern,
ReorderTransformation reorder,
QueryIterator input, ExecutionContext
execCxt) {
try {
Explain.explain(pattern, execCxt.getContext()) ;
if ( reorder != null && pattern.size() >= 2 ) {
// If pattern size is 0 or 1, nothing to do.
BasicPattern bgp2 = pattern ;
// Try to ground the pattern
if ( ! input.isJoinIdentity() ) {
QueryIterPeek peek = QueryIterPeek.create(input,
execCxt) ;
// And now use this one
input = peek ;
Binding b = peek.peek() ;
bgp2 = Substitute.substitute(pattern, b) ;
}
ReorderProc reorderProc = reorder.reorderIndexes(bgp2) ;
pattern = reorderProc.reorder(pattern) ;
} else {
if ( ! input.hasNext() )
return input ;
}
Explain.explain("Reorder/generic", pattern,
execCxt.getContext()) ;
return PatternMatchData.execute(execCxt.getActiveGraph(),
pattern, input, null, execCxt) ;
} catch (Exception e) {
return new QueryIterFailed(input, execCxt, e);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]