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/13 19:27:11 UTC

svn commit: r1550791 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java

Author: prestonc
Date: Fri Dec 13 18:27:11 2013
New Revision: 1550791

URL: http://svn.apache.org/r1550791
Log:
Moved the check for XML file size, since we can produce tuple based on child path steps. This means we can handle larger files as long as the child steps fit into the tuple.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java?rev=1550791&r1=1550790&r2=1550791&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java Fri Dec 13 18:27:11 2013
@@ -112,16 +112,16 @@ public class VXQueryCollectionOperatorDe
                         abvsFileNode.reset();
                         try {
                             FunctionHelper.readInDocFromString(file.getPath(), in, abvsFileNode, nodeIdProvider);
-                            // Can not fit XML file into frame.
-                            if (frameSize <= (abvsFileNode.getLength() - abvsFileNode.getStartOffset())) {
-                                throw new HyracksDataException(
-                                        "XML node is to large for the current frame size (VXQueryCollectionOperatorDescriptor.addXmlFile).");
-                            }
                         } catch (Exception e) {
                             throw new HyracksDataException(e);
                         }
 
                         if (childSeq.isEmpty()) {
+                            // Can not fit XML file into frame.
+                            if (frameSize <= (abvsFileNode.getLength() - abvsFileNode.getStartOffset())) {
+                                throw new HyracksDataException(
+                                        "XML node is to large for the current frame size (VXQueryCollectionOperatorDescriptor.addXmlFile).");
+                            }
                             // Return the whole XML file.
                             tb.addField(abvsFileNode.getByteArray(), abvsFileNode.getStartOffset(),
                                     abvsFileNode.getLength());