Query update to work with generated data on smaller data sizes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/ca8b4604 Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/ca8b4604 Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/ca8b4604 Branch: refs/heads/prestonc/benchmarks_staging Commit: ca8b4604e499d28de70b311a74d96b9f601c8ad2 Parents: 3e53bf3 Author: Preston Carman <[email protected]> Authored: Wed Mar 12 13:11:25 2014 -0700 Committer: Preston Carman <[email protected]> Committed: Wed Mar 12 13:11:25 2014 -0700 ---------------------------------------------------------------------- .../src/main/resources/noaa-ghcn-daily/queries/q04.xq | 12 ++++++------ .../src/main/resources/noaa-ghcn-daily/queries/q05.xq | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ca8b4604/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq index c20c973..174a9f7 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq @@ -1,14 +1,14 @@ (: XQuery Join Query :) -(: Find all the weather readings for Los Angeles county for a specific day :) +(: Find all the weather readings for King county for a specific day :) (: 1976/7/4. :) -let $collection1 := "/tmp/1.0_partition_ghcnd_all_xml/stations" -for $s in collection($collection1)/stationCollection/station +let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations" +for $s in collection($station_collection)/stationCollection/station -let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors" -for $r in collection($collection2)/dataCollection/data +let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors" +for $r in collection($sensor_collection)/dataCollection/data let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11)) where $s/id eq $r/station - and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and $x/displayName eq "Los Angeles County, CA")) + and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING"))) and $date eq xs:date("1976-07-04") return $r \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ca8b4604/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq index 3348d04..23bbaf4 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq @@ -2,15 +2,15 @@ (: Find the lowest recorded temperature (TMIN) in the state of Oregon for :) (: 2001. :) fn:min( - let $collection1 := "/tmp/1.0_partition_ghcnd_all_xml/stations" - for $s in collection($collection1)/stationCollection/station + let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations" + for $s in collection($station_collection)/stationCollection/station - let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors" - for $r in collection($collection2)/dataCollection/data + let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors" + for $r in collection($sensor_collection)/dataCollection/data let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11)) where $s/id eq $r/station - and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and $x/displayName eq "Oregon")) + and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON")) and $r/dataType eq "TMIN" and fn:year-from-date($date) eq 2001 return $r/value
