Strabon

changeset 737:47bac570d9ea temporals

changes in filter(StatementPattern) method of GeneralDBSelectQueryOptimizer
author Konstantina
date Mon Nov 26 01:52:09 2012 +0200 (2012-11-26)
parents 5a75cb827014
children 0c901336e803
files evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java
line diff
     1.1 --- a/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Sat Nov 24 00:33:50 2012 +0200
     1.2 +++ b/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Mon Nov 26 01:52:09 2012 +0200
     1.3 @@ -78,8 +78,6 @@
     1.4  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeaturesOverlapsFunc
     1.5  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeaturesWithinFunc
     1.6  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeatureTouchesFunc
     1.7 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.construct.TemporalConstructFunc
     1.8 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc
     1.9  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.construct.PeriodIntersectionFunc
    1.10  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.construct.PeriodMinusFunc
    1.11  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.construct.periodUnionFunc
    1.12 @@ -92,5 +90,4 @@
    1.13  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.OverrightPeriodFunc
    1.14  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainedByFunc
    1.15  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainsFunc
    1.16 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc
    1.17  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc
    1.18 \ No newline at end of file
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java	Sat Nov 24 00:33:50 2012 +0200
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java	Mon Nov 26 01:52:09 2012 +0200
     2.3 @@ -157,6 +157,10 @@
     2.4  	 * addition by constant
     2.5  	 */
     2.6  	private List<String> temporalVars = new ArrayList<String>(15);
     2.7 +	private GeneralDBColumnVar previousTemporalArg = null;
     2.8 +	private GeneralDBColumnVar previousTemporalAlias;
     2.9 +
    2.10 +
    2.11  	/**
    2.12  	 * 
    2.13  	 */
    2.14 @@ -456,6 +460,11 @@
    2.15  					//Re-initializing it so that no unwanted joins are created by accident!! my addition
    2.16  					previousSpatialArg = null;
    2.17  				}
    2.18 +				else if(var.getColumn().equals("obj")&&previousTemporalArg!=null) //do the same for the temporal case
    2.19 +				{
    2.20 +					from.addFilter(new GeneralDBSqlEq(new GeneralDBIdColumn(var), new GeneralDBIdColumn(previousTemporalArg)));
    2.21 +					previousTemporalArg = null;
    2.22 +				}
    2.23  			}
    2.24  
    2.25  
    2.26 @@ -471,6 +480,11 @@
    2.27  					//13/09/2011 my addition in order to create a spatial join in the meet(Filter) call that will follow
    2.28  					previousAlias = var;
    2.29  				}
    2.30 +				else if(temporalVars.contains(var.getName()))
    2.31 +				{
    2.32 +					proj.setStringValue(new GeneralDBLabelColumn(var));
    2.33 +					previousTemporalAlias = var;
    2.34 +				}
    2.35  				else
    2.36  				{
    2.37