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/12/05 04:36:27 UTC

svn commit: r1548008 - in /incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries: q00.xq q02.xq q04.xq q05.xq

Author: prestonc
Date: Thu Dec  5 03:36:26 2013
New Revision: 1548008

URL: http://svn.apache.org/r1548008
Log:
Update date in the query to work with the current supported XQuery functions.

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/q02.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/q05.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=1548008&r1=1548007&r2=1548008&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 Dec  5 03:36:26 2013
@@ -3,9 +3,9 @@
 (: the weather readings for December 25 over the last 10 years.               :)
 let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($collection)/dataCollection/data
-let $date := xs:date(fn:substring($r/date, 0, 11))
+let $date := xs:date(fn:substring(xs:string(fn:data($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:year-from-date($date) >= (2003) 
     and fn:month-from-date($date) eq 12 
     and fn:day-from-date($date) eq 25
 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=1548008&r1=1548007&r2=1548008&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 Dec  5 03:36:26 2013
@@ -4,7 +4,7 @@
 fn:sum(
     let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     for $r in collection($collection)/dataCollection/data
-    let $date := xs:date(fn:substring($r/date, 0, 11))
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
     where $r/station eq "GHCND:USW00024233" 
         and $r/dataType eq "PRCP" 
         and fn:year-from-date($date) eq 1999

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=1548008&r1=1548007&r2=1548008&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 Dec  5 03:36:26 2013
@@ -7,7 +7,7 @@ for $s in collection($collection1)/stati
 let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors/"
 for $r in collection($collection2)/dataCollection/data
     
-let $date := xs:date(fn:substring($r/date, 0, 11))
+let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
 where some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and $x/displayName eq "Los Angeles County, CA") 
     and $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/q05.xq
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq?rev=1548008&r1=1548007&r2=1548008&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq Thu Dec  5 03:36:26 2013
@@ -8,7 +8,7 @@ fn:min(
     let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors/"
     for $r in collection($collection2)/dataCollection/data
     
-    let $date := xs:date(fn:substring($r/date, 0, 11))
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
     where some $x in $s/locationLabels satisfies ($x/type eq "ST" and $x/displayName eq "Oregon") 
         and $r/dataType eq "TMIN" 
         and fn:year-from-date($date) eq 2001