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/08 01:42:54 UTC
[1/2] git commit: Updated testing suite for recent changes to masters.
Repository: incubator-vxquery
Updated Branches:
refs/heads/prestonc/hash_join 6512b0095 -> 98f95975a
Updated testing suite for recent changes to masters.
* changed result for empty tags
* added alternate results
* fixed the available processors command line option
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/215d9e10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/215d9e10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/215d9e10
Branch: refs/heads/prestonc/hash_join
Commit: 215d9e1027a11946272e6517c13fff7e7d3874ab
Parents: 6512b00
Author: Preston Carman <pr...@apache.org>
Authored: Mon Apr 7 09:45:23 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Mon Apr 7 09:45:23 2014 -0700
----------------------------------------------------------------------
vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java | 2 +-
.../resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt | 4 ++--
.../resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt | 2 +-
.../resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt | 6 +++---
.../resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt | 4 ++--
.../resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt | 2 +-
.../resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt | 6 +++---
.../resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt | 4 ++--
.../resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt | 2 +-
.../resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt | 6 +++---
.../GhcndRecords/Partition-1/q07_records-1.txt | 3 +++
.../GhcndRecords/Partition-1/q07_records-2.txt | 3 +++
.../GhcndRecords/Partition-1/q07_records-3.txt | 3 +++
.../GhcndRecords/Partition-1/q07_records-4.txt | 3 +++
.../GhcndRecords/Partition-1/q07_records-5.txt | 3 +++
.../GhcndRecords/Partition-2/q07_records-1.txt | 3 +++
.../GhcndRecords/Partition-2/q07_records-2.txt | 3 +++
.../GhcndRecords/Partition-2/q07_records-3.txt | 3 +++
.../GhcndRecords/Partition-2/q07_records-4.txt | 3 +++
.../GhcndRecords/Partition-2/q07_records-5.txt | 3 +++
.../GhcndRecords/Partition-4/q07_records-1.txt | 3 +++
.../GhcndRecords/Partition-4/q07_records-2.txt | 3 +++
.../GhcndRecords/Partition-4/q07_records-3.txt | 3 +++
.../GhcndRecords/Partition-4/q07_records-4.txt | 3 +++
.../GhcndRecords/Partition-4/q07_records-5.txt | 3 +++
.../src/test/resources/cat/GhcndRecordsPartition1Queries.xml | 5 +++++
.../src/test/resources/cat/GhcndRecordsPartition2Queries.xml | 5 +++++
.../src/test/resources/cat/GhcndRecordsPartition4Queries.xml | 5 +++++
28 files changed, 79 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
----------------------------------------------------------------------
diff --git a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
index f882899..ec3ed68 100644
--- a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
+++ b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
@@ -253,7 +253,7 @@ public class VXQuery {
};
start = opts.timing ? new Date() : null;
- XMLQueryCompiler compiler = new XMLQueryCompiler(listener, getNodeList(), opts.frameSize);
+ XMLQueryCompiler compiler = new XMLQueryCompiler(listener, getNodeList(), opts.frameSize, opts.availableProcessors);
resultSetId = createResultSetId();
CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(RootStaticContextImpl.INSTANCE),
resultSetId, null);
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
index e6116d0..28001eb 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
index ff4bc9b..82de09d 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
index c5b9925..e6134af 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
index e6116d0..28001eb 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
index ff4bc9b..82de09d 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
index c5b9925..e6134af 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
index e6116d0..28001eb 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
index ff4bc9b..82de09d 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
index c5b9925..e6134af 100644
--- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
-<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-1.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-1.txt
new file mode 100644
index 0000000..f72ff5e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-1.txt
@@ -0,0 +1,3 @@
+19.75
+19.25
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-2.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-2.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-2.txt
new file mode 100644
index 0000000..b95a51e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-2.txt
@@ -0,0 +1,3 @@
+19.5
+19.75
+19.25
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-3.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-3.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-3.txt
new file mode 100644
index 0000000..e5e2462
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-3.txt
@@ -0,0 +1,3 @@
+19.5
+19.25
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-4.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-4.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-4.txt
new file mode 100644
index 0000000..5225394
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-4.txt
@@ -0,0 +1,3 @@
+19.25
+19.75
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-5.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-5.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-5.txt
new file mode 100644
index 0000000..c1727b5
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-1/q07_records-5.txt
@@ -0,0 +1,3 @@
+19.25
+19.5
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-1.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-1.txt
new file mode 100644
index 0000000..f72ff5e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-1.txt
@@ -0,0 +1,3 @@
+19.75
+19.25
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-2.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-2.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-2.txt
new file mode 100644
index 0000000..b95a51e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-2.txt
@@ -0,0 +1,3 @@
+19.5
+19.75
+19.25
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-3.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-3.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-3.txt
new file mode 100644
index 0000000..e5e2462
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-3.txt
@@ -0,0 +1,3 @@
+19.5
+19.25
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-4.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-4.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-4.txt
new file mode 100644
index 0000000..5225394
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-4.txt
@@ -0,0 +1,3 @@
+19.25
+19.75
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-5.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-5.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-5.txt
new file mode 100644
index 0000000..c1727b5
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-2/q07_records-5.txt
@@ -0,0 +1,3 @@
+19.25
+19.5
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-1.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-1.txt
new file mode 100644
index 0000000..f72ff5e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-1.txt
@@ -0,0 +1,3 @@
+19.75
+19.25
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-2.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-2.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-2.txt
new file mode 100644
index 0000000..b95a51e
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-2.txt
@@ -0,0 +1,3 @@
+19.5
+19.75
+19.25
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-3.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-3.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-3.txt
new file mode 100644
index 0000000..e5e2462
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-3.txt
@@ -0,0 +1,3 @@
+19.5
+19.25
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-4.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-4.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-4.txt
new file mode 100644
index 0000000..5225394
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-4.txt
@@ -0,0 +1,3 @@
+19.25
+19.75
+19.5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-5.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-5.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-5.txt
new file mode 100644
index 0000000..c1727b5
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/GhcndRecords/Partition-4/q07_records-5.txt
@@ -0,0 +1,3 @@
+19.25
+19.5
+19.75
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition1Queries.xml b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition1Queries.xml
index 31f6a13..2a77991 100644
--- a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition1Queries.xml
+++ b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition1Queries.xml
@@ -22,5 +22,10 @@
<description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
<query name="q07_records" date="2014-04-01"/>
<output-file compare="Text">q07_records.txt</output-file>
+ <output-file compare="Text">q07_records-1.txt</output-file>
+ <output-file compare="Text">q07_records-2.txt</output-file>
+ <output-file compare="Text">q07_records-3.txt</output-file>
+ <output-file compare="Text">q07_records-4.txt</output-file>
+ <output-file compare="Text">q07_records-5.txt</output-file>
</test-case>
</test-group>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition2Queries.xml b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition2Queries.xml
index 41b1966..e3a53cf 100644
--- a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition2Queries.xml
+++ b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition2Queries.xml
@@ -22,5 +22,10 @@
<description>Count records returned for q07 from the weather benchmark with 2 partitions.</description>
<query name="q07_records" date="2014-04-01"/>
<output-file compare="Text">q07_records.txt</output-file>
+ <output-file compare="Text">q07_records-1.txt</output-file>
+ <output-file compare="Text">q07_records-2.txt</output-file>
+ <output-file compare="Text">q07_records-3.txt</output-file>
+ <output-file compare="Text">q07_records-4.txt</output-file>
+ <output-file compare="Text">q07_records-5.txt</output-file>
</test-case>
</test-group>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/215d9e10/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition4Queries.xml b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition4Queries.xml
index f1b99ed..f2707f3 100644
--- a/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition4Queries.xml
+++ b/vxquery-xtest/src/test/resources/cat/GhcndRecordsPartition4Queries.xml
@@ -22,5 +22,10 @@
<description>Count records returned for q07 from the weather benchmark with 4 partitions.</description>
<query name="q07_records" date="2014-04-01"/>
<output-file compare="Text">q07_records.txt</output-file>
+ <output-file compare="Text">q07_records-1.txt</output-file>
+ <output-file compare="Text">q07_records-2.txt</output-file>
+ <output-file compare="Text">q07_records-3.txt</output-file>
+ <output-file compare="Text">q07_records-4.txt</output-file>
+ <output-file compare="Text">q07_records-5.txt</output-file>
</test-case>
</test-group>
\ No newline at end of file
[2/2] git commit: Updated the parser exceptions to give more details.
Posted by pr...@apache.org.
Updated the parser exceptions to give more details.
* Now the VXQueryCollectionOperatorDescriptor adds the file and node to the exception message.
* Re-architected the exceptions in the XMLParser to help with new exception messages.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/98f95975
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/98f95975
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/98f95975
Branch: refs/heads/prestonc/hash_join
Commit: 98f95975adee9ab975a76ca15ba20fc89c6c40cf
Parents: 215d9e1
Author: Preston Carman <pr...@apache.org>
Authored: Mon Apr 7 16:11:47 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Mon Apr 7 16:11:47 2014 -0700
----------------------------------------------------------------------
.../VXQueryFileNotFoundException.java | 35 ++++++++++++++++++++
.../exceptions/VXQueryParseException.java | 35 ++++++++++++++++++++
.../VXQueryCollectionOperatorDescriptor.java | 24 +++++++++++---
.../runtime/functions/util/FunctionHelper.java | 30 +++++------------
.../org/apache/vxquery/xmlparser/XMLParser.java | 27 +++++++++++++--
5 files changed, 122 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/98f95975/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryFileNotFoundException.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryFileNotFoundException.java b/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryFileNotFoundException.java
new file mode 100644
index 0000000..27a0a2e
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryFileNotFoundException.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.exceptions;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+
+public class VXQueryFileNotFoundException extends HyracksDataException {
+
+ private static final long serialVersionUID = 1L;
+
+ public VXQueryFileNotFoundException() {
+ super();
+ }
+
+ public VXQueryFileNotFoundException(Exception ex) {
+ super(ex);
+ }
+
+ public VXQueryFileNotFoundException(String msg) {
+ super(msg);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/98f95975/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryParseException.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryParseException.java b/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryParseException.java
new file mode 100644
index 0000000..f1b4155
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/exceptions/VXQueryParseException.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.exceptions;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+
+public class VXQueryParseException extends HyracksDataException {
+
+ private static final long serialVersionUID = 1L;
+
+ public VXQueryParseException() {
+ super();
+ }
+
+ public VXQueryParseException(Exception ex) {
+ super(ex);
+ }
+
+ public VXQueryParseException(String msg) {
+ super(msg);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/98f95975/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
index 5cc2276..54007c8 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
@@ -27,8 +27,9 @@ import org.apache.vxquery.datamodel.accessors.PointablePool;
import org.apache.vxquery.datamodel.accessors.PointablePoolFactory;
import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
import org.apache.vxquery.exceptions.SystemException;
+import org.apache.vxquery.exceptions.VXQueryFileNotFoundException;
+import org.apache.vxquery.exceptions.VXQueryParseException;
import org.apache.vxquery.runtime.functions.step.ChildPathStepOperatorDescriptor;
-import org.apache.vxquery.runtime.functions.util.FunctionHelper;
import org.apache.vxquery.xmlparser.ITreeNodeIdProvider;
import org.apache.vxquery.xmlparser.TreeNodeIdProvider;
import org.apache.vxquery.xmlparser.XMLParser;
@@ -121,9 +122,24 @@ public class VXQueryCollectionOperatorDescriptor extends AbstractSingleActivityO
// Now add new field.
abvsFileNode.reset();
try {
- FunctionHelper.readInDocFromString(file, in, abvsFileNode, parser);
- } catch (Exception e) {
- throw new HyracksDataException(e);
+ parser.parseFile(file, in, abvsFileNode);
+ } catch (VXQueryFileNotFoundException e) {
+ String message = "The file (" + nodeId + ":" + file.getAbsolutePath() + ") can not be found.";
+ HyracksDataException hde = new HyracksDataException(message, e.getCause());
+ hde.setNodeId(nodeId);
+ throw hde;
+ } catch (VXQueryParseException e) {
+ String message = "The file (" + nodeId + ":" + file.getAbsolutePath()
+ + ") throw a SAXException durring parsing.";
+ HyracksDataException hde = new HyracksDataException(message, e.getCause());
+ hde.setNodeId(nodeId);
+ throw hde;
+ } catch (HyracksDataException e) {
+ String message = "The file (" + nodeId + ":" + file.getAbsolutePath()
+ + ") throw the following error during parsing: " + e.getMessage();
+ HyracksDataException hde = new HyracksDataException(message, e.getCause());
+ hde.setNodeId(nodeId);
+ throw hde;
}
TaggedValuePointable tvp = ppool.takeOne(TaggedValuePointable.class);
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/98f95975/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
index a7d7186..d732145 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
@@ -19,13 +19,9 @@ package org.apache.vxquery.runtime.functions.util;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStreamReader;
import java.nio.ByteBuffer;
import java.util.Arrays;
-import java.util.zip.GZIPInputStream;
import org.apache.vxquery.context.DynamicContext;
import org.apache.vxquery.datamodel.accessors.SequencePointable;
@@ -60,6 +56,7 @@ import org.apache.vxquery.types.BuiltinTypeRegistry;
import org.apache.vxquery.xmlparser.XMLParser;
import org.xml.sax.InputSource;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.data.std.api.IPointable;
import edu.uci.ics.hyracks.data.std.primitive.BooleanPointable;
import edu.uci.ics.hyracks.data.std.primitive.BytePointable;
@@ -1237,26 +1234,15 @@ public class FunctionHelper {
}
public static void readInDocFromPointable(UTF8StringPointable stringp, InputSource in, ByteBufferInputStream bbis,
- DataInputStream di, ArrayBackedValueStorage abvs, XMLParser parser) throws SystemException {
- String fName = getStringFromPointable(stringp, bbis, di);
- File file = new File(fName);
- readInDocFromString(file, in, abvs, parser);
- }
-
- public static void readInDocFromString(File file, InputSource in, ArrayBackedValueStorage abvs, XMLParser parser)
- throws SystemException {
+ DataInputStream di, ArrayBackedValueStorage abvs, XMLParser parser) throws HyracksDataException {
+ String fName;
try {
- if (file.getName().toLowerCase().endsWith(".xml.gz")) {
- in.setCharacterStream(new InputStreamReader(new GZIPInputStream(new FileInputStream(file))));
- } else {
- in.setCharacterStream(new InputStreamReader(new FileInputStream(file)));
- }
- parser.parseInputSource(in, abvs);
- } catch (FileNotFoundException e) {
- throw new RuntimeException("The file (" + file.getName() + ") does not exist.");
- } catch (IOException e) {
- throw new SystemException(ErrorCode.SYSE0001, e);
+ fName = getStringFromPointable(stringp, bbis, di);
+ } catch (SystemException e) {
+ throw new HyracksDataException(e);
}
+ File file = new File(fName);
+ parser.parseFile(file, in, abvs);
}
public static boolean transformThenCompareMinMaxTaggedValues(AbstractValueComparisonOperation aOp,
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/98f95975/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
index d73dd12..125557b 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
@@ -14,7 +14,17 @@
*/
package org.apache.vxquery.xmlparser;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.zip.GZIPInputStream;
+
+import org.apache.vxquery.exceptions.VXQueryFileNotFoundException;
+import org.apache.vxquery.exceptions.VXQueryParseException;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
@@ -36,12 +46,23 @@ public class XMLParser {
}
}
- public void parseInputSource(InputSource in, ArrayBackedValueStorage abvs) throws HyracksDataException {
+
+ public void parseFile(File file, InputSource in, ArrayBackedValueStorage abvs) throws HyracksDataException {
try {
+ if (file.getName().toLowerCase().endsWith(".xml.gz")) {
+ in.setCharacterStream(new InputStreamReader(new GZIPInputStream(new FileInputStream(file))));
+ } else {
+ in.setCharacterStream(new InputStreamReader(new FileInputStream(file)));
+ }
parser.parse(in);
handler.write(abvs);
- } catch (Exception e) {
- throw new HyracksDataException(e.toString());
+ } catch (FileNotFoundException e) {
+ throw new VXQueryFileNotFoundException(e);
+ } catch (SAXException e) {
+ throw new VXQueryParseException(e);
+ } catch (IOException e) {
+ throw new HyracksDataException(e);
}
}
+
}
\ No newline at end of file