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 2013/11/17 21:33:07 UTC
svn commit: r1542806 - in
/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries:
q00.xq q01.xq q02.xq q03.xq
Author: prestonc
Date: Sun Nov 17 20:33:07 2013
New Revision: 1542806
URL: http://svn.apache.org/r1542806
Log:
First draft of the benchmark queries for filter, aggregation and join.
Added:
incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq (with props)
incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq (with props)
incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq (with props)
Modified:
incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
Modified: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq?rev=1542806&r1=1542805&r2=1542806&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq Sun Nov 17 20:33:07 2013
@@ -1,5 +1,3 @@
-let $collection := "/path/to/data"
-return
- for $r in collection($collection)/ghcnd_observation
- where $r/station_id = "AG000060390"
- return $r/name
\ No newline at end of file
+(: XQuery Test Query :)
+for $x in (1, 2, 3)
+return $x
\ No newline at end of file
Added: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq?rev=1542806&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq (added)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq Sun Nov 17 20:33:07 2013
@@ -0,0 +1,6 @@
+(: XQuery Filter Query :)
+(: Select all the sensor readings for 1951 :)
+let $collection := "/tmp/test/1.0_partition_ghcnd_gsn_xml_gz/sensors"
+for $r in collection($collection)/dataCollection/data
+where fn:starts-with($r/date, "1951")
+return $r
\ No newline at end of file
Propchange: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq?rev=1542806&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq (added)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq Sun Nov 17 20:33:07 2013
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the total precipitation recorded :)
+let $collection := "/tmp/test/1.0_partition_ghcnd_gsn_xml_gz/sensors"
+return fn:sum(
+ for $r in collection($collection)/dataCollection/data
+ where $r/dataType eq "PRCP"
+ return $r/value
+)
\ No newline at end of file
Propchange: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq?rev=1542806&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq (added)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq Sun Nov 17 20:33:07 2013
@@ -0,0 +1,11 @@
+(: XQuery Join Query :)
+(: Get each stations highest temperature :)
+let $collection1 := "/tmp/test/1.0_partition_ghcnd_gsn_xml_gz/sensors"
+for $r in collection($collection1)/dataCollection/data
+where $r/dataType eq "TMAX"
+
+let $collection2 := "/tmp/test/1.0_partition_ghcnd_gsn_xml_gz/stations"
+for $s in collection($collection2)/dataCollection/data
+
+where data($r/station_id) eq data($s/station_id)
+return ($s/name, fn:max($r/value))
\ No newline at end of file
Propchange: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq
------------------------------------------------------------------------------
svn:eol-style = native