/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }
assertFalse(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }
assertFalse(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertNotNull(construct); assertTrue(construct.isNativeDistinct());
/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
assertFalse(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertNotNull(construct); assertTrue(construct.isNativeDistinct());
/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertNotNull(construct); assertTrue(construct.isNativeDistinct());
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));
assertTrue(ASTConstructIterator.isObviouslyDistinct(store.isQuads(), getConstructTemplates(optimizedQuery), optimizedQuery.getWhereClause()));