142 lines
5.2 KiB
Plaintext
142 lines
5.2 KiB
Plaintext
#This file is part of SECONDO.
|
|
#
|
|
#Copyright (C) 2004, University in Hagen, Department of Computer Science,
|
|
#Database Systems for New Applications.
|
|
#
|
|
#SECONDO is free software; you can redistribute it and/or modify
|
|
#it under the terms of the GNU General Public License as published by
|
|
#the Free Software Foundation; either version 2 of the License, or
|
|
#(at your option) any later version.
|
|
#
|
|
#SECONDO is distributed in the hope that it will be useful,
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
#GNU General Public License for more details.
|
|
#
|
|
#You should have received a copy of the GNU General Public License
|
|
#along with SECONDO; if not, write to the Free Software
|
|
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
# a test for the relational algebra
|
|
# run with : Runner -c MyConfig.config <relalgtest
|
|
# (Runner can be found in directory UserInterfaces)
|
|
|
|
#setup
|
|
restore database rtreetestb from '$(SECONDO_BUILD_DIR)/bin/berlintest';
|
|
|
|
#open database rtreetestb;
|
|
|
|
let strassen_GeoData_1 = strassen creatertree[GeoData];
|
|
let strassen_GeoData_2 = strassen feed extend[Id: tupleid(.)] creatertree[GeoData];
|
|
|
|
let fluss_FVerlauf_1 = WStrassen creatertree[GeoData];
|
|
let fluss_FVerlauf_2 = WStrassen feed extend[Id: tupleid(.)] creatertree[GeoData];
|
|
|
|
let kreis_Gebiet_1 = Flaechen creatertree[GeoData];
|
|
let kreis_Gebiet_2 = Flaechen feed extend[Id: tupleid(.)] creatertree[GeoData];
|
|
|
|
|
|
#testcase test1
|
|
#yields (int 42)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) WStrassen feed filter[bbox(.GeoData) intersects bbox(attr(t, GeoData_a))]] count;
|
|
|
|
#testcase test2
|
|
#yields (int 42)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_1 WStrassen windowintersects[attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test3
|
|
#yields (int 42)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_2 WStrassen windowintersects[attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test4
|
|
#yields (int 42)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_1 windowintersectsS[attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test5
|
|
#yields (int 42)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_2 windowintersectsS[attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test6
|
|
#yields (int 17)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) WStrassen feed filter[.GeoData intersects attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test7
|
|
#yields (int 17)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_1 WStrassen windowintersects[attr(t, GeoData_a)]
|
|
filter[.GeoData intersects attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test8
|
|
#yields (int 17)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_2 WStrassen windowintersects[attr(t, GeoData_a)]
|
|
filter[.GeoData intersects attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test9
|
|
#yields (int 17)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_1 windowintersectsS[attr(t, GeoData_a)]
|
|
WStrassen gettuples filter[.GeoData intersects attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test10
|
|
#yields (int 17)
|
|
query RBahn feed {a} loopjoin[fun(t:TUPLE) fluss_FVerlauf_2 windowintersectsS[attr(t, GeoData_a)]
|
|
WStrassen gettuples filter[.GeoData intersects attr(t, GeoData_a)]] count;
|
|
|
|
#testcase test11
|
|
#yields (int 244)
|
|
query Flaechen feed {X} loopjoin[fun(t: TUPLE) Flaechen feed filter[bbox(.GeoData) intersects bbox(attr(t, GeoData_X))]] count;
|
|
|
|
#testcase test12
|
|
#yields (int 244)
|
|
query Flaechen feed {X} loopjoin[fun(t: TUPLE) kreis_Gebiet_1 Flaechen windowintersects[attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test13
|
|
#yields (int 244)
|
|
query Flaechen feed {X} loopjoin[fun(t: TUPLE) kreis_Gebiet_2 Flaechen windowintersects[attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test14
|
|
#yields (int 244)
|
|
query Flaechen feed {X} loopjoin[fun(t: TUPLE) kreis_Gebiet_1 windowintersectsS[attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test15
|
|
#yields (int 244)
|
|
query Flaechen feed {X} loopjoin[fun(t: TUPLE) kreis_Gebiet_2 windowintersectsS[attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test16
|
|
#yields (int 10)
|
|
query Flaechen feed {X} filter[.GeoData_X intersects koepenick]
|
|
loopjoin[fun(t: TUPLE) Flaechen feed filter[bbox(.GeoData) intersects bbox(attr(t, GeoData_X))]
|
|
filter[.GeoData intersects attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test17
|
|
#yields (int 10)
|
|
query Flaechen feed {X} filter[.GeoData_X intersects koepenick]
|
|
loopjoin[fun(t: TUPLE) kreis_Gebiet_1 Flaechen windowintersects[attr(t, GeoData_X)]
|
|
filter[.GeoData intersects attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test18
|
|
#yields (int 10)
|
|
query Flaechen feed {X} filter[.GeoData_X intersects koepenick]
|
|
loopjoin[fun(t: TUPLE) kreis_Gebiet_2 Flaechen windowintersects[attr(t, GeoData_X)]
|
|
filter[.GeoData intersects attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test19
|
|
#yields (int 10)
|
|
query Flaechen feed {X} filter[.GeoData_X intersects koepenick]
|
|
loopjoin[fun(t: TUPLE) kreis_Gebiet_1 windowintersectsS[attr(t, GeoData_X)]
|
|
Flaechen gettuples filter[.GeoData intersects attr(t, GeoData_X)]] count;
|
|
|
|
#testcase test20
|
|
#yields (int 10)
|
|
query Flaechen feed {X} filter[.GeoData_X intersects koepenick]
|
|
loopjoin[fun(t: TUPLE) kreis_Gebiet_2 windowintersectsS[attr(t, GeoData_X)]
|
|
Flaechen gettuples filter[.GeoData intersects attr(t, GeoData_X)]] count;
|
|
|
|
#teardown
|
|
delete strassen_GeoData_1;
|
|
delete strassen_GeoData_2;
|
|
delete fluss_FVerlauf_1;
|
|
delete fluss_FVerlauf_2;
|
|
delete kreis_Gebiet_1;
|
|
delete kreis_Gebiet_2;
|
|
close database;
|
|
|