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 2016/07/18 22:21:18 UTC
vxquery git commit: Editing fn:collection for json and testing
Repository: vxquery
Updated Branches:
refs/heads/master 247300977 -> bd27eb084
Editing fn:collection for json and testing
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/bd27eb08
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/bd27eb08
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/bd27eb08
Branch: refs/heads/master
Commit: bd27eb0845d973231158e190539af131b8e7207b
Parents: 2473009
Author: Christina Pavlopoulou <cp...@ucr.edu>
Authored: Thu Jul 14 13:51:14 2016 -0700
Committer: Christina Pavlopoulou <cp...@ucr.edu>
Committed: Mon Jul 18 14:30:39 2016 -0700
----------------------------------------------------------------------
.../apache/vxquery/jsonparser/JSONParser.java | 3 +-
.../VXQueryCollectionOperatorDescriptor.java | 35 +++++++++++++++++---
.../vxquery/metadata/VXQueryIOFileFilter.java | 3 +-
.../Json/Parser/Partition-1/q14_parser.txt | 3 ++
.../Json/Parser/Partition-2/q15_parser.txt | 3 ++
.../Json/Parser/Partition-4/q16_parser.txt | 3 ++
.../Json/Parser/Partition-1/q14_parser.xq | 25 ++++++++++++++
.../Json/Parser/Partition-2/q15_parser.xq | 25 ++++++++++++++
.../Json/Parser/Partition-4/q16_parser.xq | 25 ++++++++++++++
.../quarter_1/sensors/US000000001_200101_0.json | 29 ++++++++++++++++
.../quarter_2/sensors/US000000002_200202_0.json | 29 ++++++++++++++++
.../quarter_3/sensors/AS000000003_200303_0.json | 22 ++++++++++++
.../quarter_4/sensors/US000000004_200404_0.json | 22 ++++++++++++
.../src/test/resources/VXQueryCatalog.xml | 21 ++++++++++++
.../test/resources/cat/JsonParserQueries.xml | 15 +++++++++
15 files changed, 255 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-core/src/main/java/org/apache/vxquery/jsonparser/JSONParser.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/jsonparser/JSONParser.java b/vxquery-core/src/main/java/org/apache/vxquery/jsonparser/JSONParser.java
index 71220cf..68fbb82 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/jsonparser/JSONParser.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/jsonparser/JSONParser.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.htrace.fasterxml.jackson.core.JsonFactory;
-import org.apache.htrace.fasterxml.jackson.core.JsonParseException;
import org.apache.htrace.fasterxml.jackson.core.JsonParser;
import org.apache.htrace.fasterxml.jackson.core.JsonToken;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -56,7 +55,7 @@ public class JSONParser implements IParser {
protected final List<itemType> itemStack;
- public JSONParser() throws JsonParseException {
+ public JSONParser() {
factory = new JsonFactory();
atomic = new ArrayBackedValueStorage();
abStack = new ArrayList<ArrayBuilder>();
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/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 acd74b1..7736edd 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
@@ -18,7 +18,11 @@ package org.apache.vxquery.metadata;
import java.io.ByteArrayInputStream;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
@@ -52,14 +56,17 @@ import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
+import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
import org.apache.hyracks.dataflow.common.comm.io.FrameFixedFieldTupleAppender;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
+import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
import org.apache.hyracks.dataflow.std.base.AbstractUnaryInputUnaryOutputOperatorNodePushable;
import org.apache.hyracks.hdfs.ContextFactory;
import org.apache.hyracks.hdfs2.dataflow.FileSplitsFactory;
import org.apache.vxquery.context.DynamicContext;
import org.apache.vxquery.hdfs2.HDFSFunctions;
+import org.apache.vxquery.jsonparser.JSONParser;
import org.apache.vxquery.xmlparser.ITreeNodeIdProvider;
import org.apache.vxquery.xmlparser.TreeNodeIdProvider;
import org.apache.vxquery.xmlparser.XMLParser;
@@ -102,10 +109,11 @@ public class VXQueryCollectionOperatorDescriptor extends AbstractSingleActivityO
final ITreeNodeIdProvider nodeIdProvider = new TreeNodeIdProvider(partitionId, dataSourceId, totalDataSources);
final String nodeId = ctx.getJobletContext().getApplicationContext().getNodeId();
final DynamicContext dCtx = (DynamicContext) ctx.getJobletContext().getGlobalJobData();
-
+ final ArrayBackedValueStorage jsonAbvs = new ArrayBackedValueStorage();
final String collectionName = collectionPartitions[partition % collectionPartitions.length];
final XMLParser parser = new XMLParser(false, nodeIdProvider, nodeId, appender, childSeq,
dCtx.getStaticContext());
+ final JSONParser jparser = new JSONParser();
return new AbstractUnaryInputUnaryOutputOperatorNodePushable() {
@Override
@@ -119,6 +127,7 @@ public class VXQueryCollectionOperatorDescriptor extends AbstractSingleActivityO
public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
fta.reset(buffer);
String collectionModifiedName = collectionName.replace("${nodeId}", nodeId);
+ Reader input;
if (!collectionModifiedName.contains("hdfs:/")) {
File collectionDirectory = new File(collectionModifiedName);
//check if directory is in the local file system
@@ -129,11 +138,27 @@ public class VXQueryCollectionOperatorDescriptor extends AbstractSingleActivityO
Iterator<File> it = FileUtils.iterateFiles(collectionDirectory,
new VXQueryIOFileFilter(), TrueFileFilter.INSTANCE);
while (it.hasNext()) {
- File xmlDocument = it.next();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Starting to read XML document: " + xmlDocument.getAbsolutePath());
+ File file = it.next();
+ String fileName = file.getName().toLowerCase();
+ if (fileName.endsWith(".xml")) {
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.fine("Starting to read XML document: " + file.getAbsolutePath());
+ }
+ parser.parseElements(file, writer, tupleIndex);
+ } else if (fileName.endsWith(".json")) {
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.fine("Starting to read JSON document: " + file.getAbsolutePath());
+ }
+ try {
+ jsonAbvs.reset();
+ input = new InputStreamReader(new FileInputStream(file));
+ jparser.parse(input, jsonAbvs);
+ FrameUtils.appendFieldToWriter(writer, appender, jsonAbvs.getByteArray(),
+ jsonAbvs.getStartOffset(), jsonAbvs.getLength());
+ } catch (FileNotFoundException e) {
+ throw new HyracksDataException(e.toString());
+ }
}
- parser.parseElements(xmlDocument, writer, tupleIndex);
}
}
} else {
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryIOFileFilter.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryIOFileFilter.java b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryIOFileFilter.java
index 70070dc..9a68eec 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryIOFileFilter.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryIOFileFilter.java
@@ -29,7 +29,8 @@ public class VXQueryIOFileFilter implements IOFileFilter {
@Override
public boolean accept(final File file, final String name) {
- if (name.toLowerCase().endsWith(".xml") || name.toLowerCase().endsWith(".xml.gz")) {
+ String fileName = name.toLowerCase();
+ if (fileName.endsWith(".xml") || fileName.endsWith(".json")) {
return true;
}
return false;
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-1/q14_parser.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-1/q14_parser.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-1/q14_parser.txt
new file mode 100644
index 0000000..abbafea
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-1/q14_parser.txt
@@ -0,0 +1,3 @@
+{"date":"2001-01-01T00:00:00.000","datatype":"TMIN","station":"GHCND:US000000001","attributes":",,","value":11.25}
+{"date":"2001-01-01T00:00:00.000","datatype":"TMAX","station":"GHCND:US000000001","attributes":",,","value":31}
+{"date":"2001-01-01T00:00:00.000","datatype":"AWND","station":"GHCND:US000000001","attributes":",,","value":1000}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-2/q15_parser.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-2/q15_parser.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-2/q15_parser.txt
new file mode 100644
index 0000000..3ca741c
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-2/q15_parser.txt
@@ -0,0 +1,3 @@
+{"date":"2001-01-01T00:00:00.000","datatype":"TMIN","station":"GHCND:US000000001","attributes":",,","value":11.25}
+{"date":"2002-02-02T00:00:00.000","datatype":"TMIN","station":"GHCND:US000000002","attributes":",,","value":12.5}
+{"date":"2003-03-03T00:00:00.000","datatype":"TMIN","station":"GHCND:AS000000003","attributes":",,","value":13.75}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-4/q16_parser.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-4/q16_parser.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-4/q16_parser.txt
new file mode 100644
index 0000000..abbafea
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Json/Parser/Partition-4/q16_parser.txt
@@ -0,0 +1,3 @@
+{"date":"2001-01-01T00:00:00.000","datatype":"TMIN","station":"GHCND:US000000001","attributes":",,","value":11.25}
+{"date":"2001-01-01T00:00:00.000","datatype":"TMAX","station":"GHCND:US000000001","attributes":",,","value":31}
+{"date":"2001-01-01T00:00:00.000","datatype":"AWND","station":"GHCND:US000000001","attributes":",,","value":1000}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-1/q14_parser.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-1/q14_parser.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-1/q14_parser.xq
new file mode 100644
index 0000000..7bc86b6
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-1/q14_parser.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 at
+
+ 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. :)
+
+(: Json Parser Query :)
+(: parse a string with arrays :)
+let $x:="jsonCollection"
+for $r in collection($x)
+ let $z:=$r("results")()
+ for $i in $z()
+where $i("date")="2001-01-01T00:00:00.000"
+return $i
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-2/q15_parser.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-2/q15_parser.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-2/q15_parser.xq
new file mode 100644
index 0000000..b43ddc3
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-2/q15_parser.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 at
+
+ 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. :)
+
+(: Json Parser Query :)
+(: parse a string with arrays :)
+let $x:="json_half_1|json_half_2"
+for $r in collection($x)
+ let $z:=$r("results")()
+ for $i in $z()
+where $i("datatype")="TMIN"
+return $i
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-4/q16_parser.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-4/q16_parser.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-4/q16_parser.xq
new file mode 100644
index 0000000..4fabd06
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Json/Parser/Partition-4/q16_parser.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 at
+
+ 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. :)
+
+(: Json Parser Query :)
+(: parse a string with arrays :)
+let $x:="json_quarter_1|json_quarter_2|json_quarter_3|json_quarter_4"
+for $r in collection($x)
+ let $z:=$r("results")()
+ for $i in $z()
+where $i("station")="GHCND:US000000001"
+return $i
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_1/sensors/US000000001_200101_0.json
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_1/sensors/US000000001_200101_0.json b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_1/sensors/US000000001_200101_0.json
new file mode 100644
index 0000000..e16b964
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_1/sensors/US000000001_200101_0.json
@@ -0,0 +1,29 @@
+{
+ "metadata": {
+ "pageCount": 1,
+ "count": 3
+ },
+ "results": [
+ {
+ "date": "2001-01-01T00:00:00.000",
+ "datatype": "TMIN",
+ "station": "GHCND:US000000001",
+ "attributes": ",,",
+ "value": 11.25
+ },
+ {
+ "date": "2001-01-01T00:00:00.000",
+ "datatype": "TMAX",
+ "station": "GHCND:US000000001",
+ "attributes": ",,",
+ "value": 31
+ },
+ {
+ "date": "2001-01-01T00:00:00.000",
+ "datatype": "AWND",
+ "station": "GHCND:US000000001",
+ "attributes": ",,",
+ "value": 1000
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_2/sensors/US000000002_200202_0.json
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_2/sensors/US000000002_200202_0.json b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_2/sensors/US000000002_200202_0.json
new file mode 100644
index 0000000..59a82ea
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_1/quarter_2/sensors/US000000002_200202_0.json
@@ -0,0 +1,29 @@
+{
+ "metadata": {
+ "pageCount": 1,
+ "count": 3
+ },
+ "results": [
+ {
+ "date": "2002-02-02T00:00:00.000",
+ "datatype": "TMIN",
+ "station": "GHCND:US000000002",
+ "attributes": ",,",
+ "value": 12.5
+ },
+ {
+ "date": "2002-02-02T00:00:00.000",
+ "datatype": "TMAX",
+ "station": "GHCND:US000000002",
+ "attributes": ",,",
+ "value": 32
+ },
+ {
+ "date": "2002-02-02T00:00:00.000",
+ "datatype": "PRCP",
+ "station": "GHCND:US000000002",
+ "attributes": ",,",
+ "value": 20
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_3/sensors/AS000000003_200303_0.json
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_3/sensors/AS000000003_200303_0.json b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_3/sensors/AS000000003_200303_0.json
new file mode 100644
index 0000000..221de5f
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_3/sensors/AS000000003_200303_0.json
@@ -0,0 +1,22 @@
+{
+ "metadata": {
+ "pageCount": 1,
+ "count": 2
+ },
+ "results": [
+ {
+ "date": "2003-03-03T00:00:00.000",
+ "datatype": "TMIN",
+ "station": "GHCND:AS000000003",
+ "attributes": ",,",
+ "value": 13.75
+ },
+ {
+ "date": "2003-03-03T00:00:00.000",
+ "datatype": "TMAX",
+ "station": "GHCND:AS000000003",
+ "attributes": ",,",
+ "value": 33
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_4/sensors/US000000004_200404_0.json
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_4/sensors/US000000004_200404_0.json b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_4/sensors/US000000004_200404_0.json
new file mode 100644
index 0000000..98493ce
--- /dev/null
+++ b/vxquery-xtest/src/test/resources/TestSources/jsonCollection/half_2/quarter_4/sensors/US000000004_200404_0.json
@@ -0,0 +1,22 @@
+{
+ "metadata": {
+ "pageCount": 1,
+ "count": 2
+ },
+ "results": [
+ {
+ "date": "2004-04-04T00:00:00.000",
+ "datatype": "PRCP",
+ "station": "GHCND:US000000004",
+ "attributes": ",,",
+ "value": 40
+ },
+ {
+ "date": "2003-03-03T00:00:00.000",
+ "datatype": "AWND",
+ "station": "GHCND:US000000004",
+ "attributes": ",,",
+ "value": 4
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/VXQueryCatalog.xml b/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
index 8ef09a6..f678fba 100644
--- a/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
+++ b/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
@@ -94,6 +94,27 @@
<source ID="ghcnd_quarter_4" FileName="TestSources/ghcnd/half_2/quarter_4" Creator="Preston Carman">
<description last-mod="2014-04-02">Collection of files</description>
</source>
+ <source ID="jsonCollection" FileName="TestSources/jsonCollection" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_half_1" FileName="TestSources/jsonCollection/half_1" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_half_2" FileName="TestSources/jsonCollection/half_2" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_quarter_1" FileName="TestSources/jsonCollection/half_1/quarter_1" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_quarter_2" FileName="TestSources/jsonCollection/half_1/quarter_2" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_quarter_3" FileName="TestSources/jsonCollection/half_2/quarter_3" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
+ <source ID="json_quarter_4" FileName="TestSources/jsonCollection/half_2/quarter_4" Creator="Christina Pavlopoulou">
+ <description last-mod="2016-07-12">Collection of files</description>
+ </source>
<source ID="station_xml_file" FileName="TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml"
Creator="Shivani Mall">
<description last-mod="2015-06-26">File</description>
http://git-wip-us.apache.org/repos/asf/vxquery/blob/bd27eb08/vxquery-xtest/src/test/resources/cat/JsonParserQueries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/test/resources/cat/JsonParserQueries.xml b/vxquery-xtest/src/test/resources/cat/JsonParserQueries.xml
index 74f7b00..795ab9b 100644
--- a/vxquery-xtest/src/test/resources/cat/JsonParserQueries.xml
+++ b/vxquery-xtest/src/test/resources/cat/JsonParserQueries.xml
@@ -70,4 +70,19 @@
<query name="q13_parser" date="2016-07-12"/>
<expected-error>JNDY0021</expected-error>
</test-case>
+ <test-case name="json-parser-q14" FilePath="Json/Parser/Partition-1" Creator="Christina Pavlopoulou">
+ <description>Parsing a collection of json files.</description>
+ <query name="q14_parser" date="2016-07-12"/>
+ <output-file compare="Text">q14_parser.txt</output-file>
+ </test-case>
+ <test-case name="json-parser-q15" FilePath="Json/Parser/Partition-2" Creator="Christina Pavlopoulou">
+ <description>Parsing a collection of json files.</description>
+ <query name="q15_parser" date="2016-07-15"/>
+ <output-file compare="Text">q15_parser.txt</output-file>
+ </test-case>
+ <test-case name="json-parser-q16" FilePath="Json/Parser/Partition-4" Creator="Christina Pavlopoulou">
+ <description>Parsing a collection of json files.</description>
+ <query name="q16_parser" date="2016-07-15"/>
+ <output-file compare="Text">q16_parser.txt</output-file>
+ </test-case>
</test-group>