You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/04/02 06:12:11 UTC
[31/50] [abbrv] git commit: Switched q06 and q07 to order by number
of records in the join.
Switched q06 and q07 to order by number of records in the join.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/c3a7ce20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/c3a7ce20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/c3a7ce20
Branch: refs/heads/prestonc/hash_join
Commit: c3a7ce204b34d222becf37ff4966278efad86b44
Parents: ef2f36a
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 31 09:18:07 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700
----------------------------------------------------------------------
.../resources/noaa-ghcn-daily/queries/q06.xq | 29 +++++++++-----------
.../noaa-ghcn-daily/queries/q06_sensor.xq | 10 +++++++
.../noaa-ghcn-daily/queries/q06_station.xq | 7 +++++
.../noaa-ghcn-daily/queries/q06_tmax.xq | 9 ------
.../noaa-ghcn-daily/queries/q06_tmin.xq | 9 ------
.../resources/noaa-ghcn-daily/queries/q07.xq | 29 +++++++++++---------
.../noaa-ghcn-daily/queries/q07_sensor.xq | 10 -------
.../noaa-ghcn-daily/queries/q07_station.xq | 7 -----
.../noaa-ghcn-daily/queries/q07_tmax.xq | 9 ++++++
.../noaa-ghcn-daily/queries/q07_tmin.xq | 9 ++++++
10 files changed, 64 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
index d8eb815..573a3a3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
@@ -1,16 +1,13 @@
-(: XQuery Self Join Query :)
-(: Self join with all stations finding the difference in min and max :)
-(: temperature and get the average. :)
-fn:avg(
- let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
- for $r_min in collection($sensor_collection_min)/dataCollection/data
-
- let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
- for $r_max in collection($sensor_collection_max)/dataCollection/data
-
- where $r_min/station eq $r_max/station
- and $r_min/date eq $r_max/date
- and $r_min/dataType eq "TMIN"
- and $r_max/dataType eq "TMAX"
- return $r_max/value - $r_min/value
-) div 10
\ No newline at end of file
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each :)
+(: day over the year 2000. :)
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)/dataCollection/data
+
+where $s/id eq $r/station
+ and $r/dataType eq "TMAX"
+ and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
new file mode 100644
index 0000000..e8eb64a
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
@@ -0,0 +1,10 @@
+(: XQuery Join Query :)
+(: Count max temperature (TMAX) readings for 2000-01-01. :)
+count(
+ let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+ for $r in collection($sensor_collection)/dataCollection/data
+
+ where $r/dataType eq "TMAX"
+ and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+ return $r
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
new file mode 100644
index 0000000..6212016
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the stations. :)
+count(
+ let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+ for $s in collection($station_collection)/stationCollection/station
+ return $s
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
deleted file mode 100644
index 43694ea..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
+++ /dev/null
@@ -1,9 +0,0 @@
-(: XQuery Join Query :)
-(: Find the all the records for TMAX. :)
-count(
- let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
- for $r_max in collection($sensor_collection_max)/dataCollection/data
-
- where $r_max/dataType eq "TMAX"
- return $r_max
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
deleted file mode 100644
index 51db7c3..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
+++ /dev/null
@@ -1,9 +0,0 @@
-(: XQuery Join Query :)
-(: Find the all the records for TMIN. :)
-count(
- let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
- for $r_min in collection($sensor_collection_min)/dataCollection/data
-
- where $r_min/dataType eq "TMIN"
- return $r_min
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
index 573a3a3..d8eb815 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -1,13 +1,16 @@
-(: XQuery Join Query :)
-(: Find the highest recorded temperature (TMAX) for each station for each :)
-(: day over the year 2000. :)
-let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-for $s in collection($station_collection)/stationCollection/station
-
-let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r in collection($sensor_collection)/dataCollection/data
-
-where $s/id eq $r/station
- and $r/dataType eq "TMAX"
- and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
-return ($s/displayName, $r/date, $r/value)
\ No newline at end of file
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max :)
+(: temperature and get the average. :)
+fn:avg(
+ let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+ for $r_min in collection($sensor_collection_min)/dataCollection/data
+
+ let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+ for $r_max in collection($sensor_collection_max)/dataCollection/data
+
+ where $r_min/station eq $r_max/station
+ and $r_min/date eq $r_max/date
+ and $r_min/dataType eq "TMIN"
+ and $r_max/dataType eq "TMAX"
+ return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
deleted file mode 100644
index e8eb64a..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
+++ /dev/null
@@ -1,10 +0,0 @@
-(: XQuery Join Query :)
-(: Count max temperature (TMAX) readings for 2000-01-01. :)
-count(
- let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
- for $r in collection($sensor_collection)/dataCollection/data
-
- where $r/dataType eq "TMAX"
- and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
- return $r
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
deleted file mode 100644
index 6212016..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
+++ /dev/null
@@ -1,7 +0,0 @@
-(: XQuery Join Query :)
-(: Count all the stations. :)
-count(
- let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
- for $s in collection($station_collection)/stationCollection/station
- return $s
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
new file mode 100644
index 0000000..43694ea
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMAX. :)
+count(
+ let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+ for $r_max in collection($sensor_collection_max)/dataCollection/data
+
+ where $r_max/dataType eq "TMAX"
+ return $r_max
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
new file mode 100644
index 0000000..51db7c3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMIN. :)
+count(
+ let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+ for $r_min in collection($sensor_collection_min)/dataCollection/data
+
+ where $r_min/dataType eq "TMIN"
+ return $r_min
+)
\ No newline at end of file