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/28 05:12:05 UTC

svn commit: r1546280 - in /incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries: q00.xq q01.xq q02.xq q03.xq q04.xq q_test_01.xq q_test_02.xq

Author: prestonc
Date: Thu Nov 28 04:12:04 2013
New Revision: 1546280

URL: http://svn.apache.org/r1546280
Log:
Updated queries based on testing. Found some runtime issue.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_01.xq
    incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_02.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=1546280&r1=1546279&r2=1546280&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 Thu Nov 28 04:12:04 2013
@@ -1,8 +1,8 @@
 (: XQuery Filter Query :)
 (: See historical data for Riverside, CA (ASN00008113) station by selecting the weather readings for December 25 over the last 10 years. :)
-let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($collection)/dataCollection/data
-let $date := xs:date(data($r/date))
+let $date := xs:date(fn:substring($r/date, 0, 11))
 where $r/station eq "GHCND:ASN00008113" 
     and fn:year-from-date($date) >= (fn:year-from-date(fn:current-date()) - 10) 
     and fn:month-from-date($date) eq 12 

Modified: 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=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q01.xq Thu Nov 28 04:12:04 2013
@@ -1,6 +1,6 @@
 (: XQuery Filter Query :)
 (: Find all reading for hurricane force wind warning or extreme wind warning. The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744 meters per second). :)
-let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($collection)/dataCollection/data
 where $r/dataType eq "AWND" and $r/value > 491.744
 return $r
\ No newline at end of file

Modified: 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=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq Thu Nov 28 04:12:04 2013
@@ -1,9 +1,9 @@
 (: XQuery Aggregate Query :)
 (: Find the annual precipitation for a Seattle using the airport station (USW00024233) for 1999. :)
 fn:sum(
-    let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+    let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     for $r in collection($collection)/dataCollection/data
-    let $date := xs:date($r/date)
+    let $date := xs:date(fn:substring($r/date, 0, 11))
     where $r/station eq "GHCND:USW00024233" and $r/dataType eq "PRCP" and fn:year-from-date($date) eq 1999
     return $r/value
-)
\ No newline at end of file
+) div 10
\ No newline at end of file

Modified: 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=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q03.xq Thu Nov 28 04:12:04 2013
@@ -1,8 +1,8 @@
 (: XQuery Aggregate Query :)
-(: Find the highest recorded temperature (TMAX). :)
+(: Find the highest recorded temperature (TMAX) in Celsius. :)
 fn:max(
-    let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+    let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     for $r in collection($collection)/dataCollection/data
     where $r/dataType eq "TMAX"
     return $r/value
-)
\ No newline at end of file
+) div 10
\ No newline at end of file

Modified: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq?rev=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq Thu Nov 28 04:12:04 2013
@@ -7,5 +7,5 @@ let $collection2 := "/tmp/test/1.0_parti
 for $r in collection($collection2)/dataCollection/data
 
 where some $x in $s/locationLabels satisfies ($x/type eq "county" and $x/value eq "Los Angeles") 
-    and xs:date($r/date) eq xs:date("1976/7/4")
+    and xs:date($r/date) eq xs:date("1976-07-04")
 return $r
\ No newline at end of file

Modified: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_01.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_01.xq?rev=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_01.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_01.xq Thu Nov 28 04:12:04 2013
@@ -1,6 +1,6 @@
 (: XQuery Test Query :)
 (: Find a specific record GHCND:BB000078954 on 1944-02-29 for TMIN. :)
-let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($collection)/dataCollection/data
-where $r/station eq "GHCND:BB000078954" and $r/date eq "1944-02-29T00:00:00.000" and $r/dataType eq "TMIN"
+where data($r/station) eq "GHCND:ASN00008113" and data($r/date) eq "1944-02-29T00:00:00.000" and data($r/dataType) eq "PRCP"
 return $r
\ No newline at end of file

Modified: incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_02.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_02.xq?rev=1546280&r1=1546279&r2=1546280&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_02.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q_test_02.xq Thu Nov 28 04:12:04 2013
@@ -1,6 +1,6 @@
 (: XQuery Test Query :)
 (: Count all the XML documents. :)
 count( 
-    let $collection := "/tmp/test/1.0_partition_ghcnd_all_xml/sensors"
+    let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     return collection($collection) 
 )