Repository: incubator-rya Updated Branches: refs/heads/develop efc815edc -> d3323fac9
update so that regular expressions are applied in cases where the strategy is defaulted to SPO Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/a150595e Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/a150595e Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/a150595e Branch: refs/heads/develop Commit: a150595e2184caa57e93e6e1c18c4cac6477e8cb Parents: 358c13b Author: jej2003 <[email protected]> Authored: Thu Mar 17 14:04:01 2016 -0400 Committer: jej2003 <[email protected]> Committed: Thu Mar 17 14:04:01 2016 -0400 ---------------------------------------------------------------------- .../accumulo/query/AccumuloRyaQueryEngine.java | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/a150595e/dao/accumulo.rya/src/main/java/mvm/rya/accumulo/query/AccumuloRyaQueryEngine.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/mvm/rya/accumulo/query/AccumuloRyaQueryEngine.java b/dao/accumulo.rya/src/main/java/mvm/rya/accumulo/query/AccumuloRyaQueryEngine.java index 869a128..ba3ffd2 100644 --- a/dao/accumulo.rya/src/main/java/mvm/rya/accumulo/query/AccumuloRyaQueryEngine.java +++ b/dao/accumulo.rya/src/main/java/mvm/rya/accumulo/query/AccumuloRyaQueryEngine.java @@ -241,22 +241,24 @@ public class AccumuloRyaQueryEngine implements RyaQueryEngine<AccumuloRdfConfigu ByteRange byteRange = entry.getValue(); range = new Range(new Text(byteRange.getStart()), new Text(byteRange.getEnd())); - byte[] objectTypeInfo = null; - if (object != null) { - //TODO: Not good to serialize this twice - if (object instanceof RyaRange) { - objectTypeInfo = RyaContext.getInstance().serializeType(((RyaRange) object).getStart())[1]; - } else { - objectTypeInfo = RyaContext.getInstance().serializeType(object)[1]; - } - } - - tripleRowRegex = strategy.buildRegex(regexSubject, regexPredicate, regexObject, null, objectTypeInfo); } else { range = new Range(); layout = TABLE_LAYOUT.SPO; + strategy = ryaContext.retrieveStrategy(layout); } + byte[] objectTypeInfo = null; + if (object != null) { + //TODO: Not good to serialize this twice + if (object instanceof RyaRange) { + objectTypeInfo = RyaContext.getInstance().serializeType(((RyaRange) object).getStart())[1]; + } else { + objectTypeInfo = RyaContext.getInstance().serializeType(object)[1]; + } + } + + tripleRowRegex = strategy.buildRegex(regexSubject, regexPredicate, regexObject, null, objectTypeInfo); + //use range to set scanner //populate scanner based on authorizations, ttl String table = layoutToTable(layout, tableLayoutStrategy);
