asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianf...@apache.org
Subject [07/11] incubator-asterixdb git commit: VariableSizeFrame(VSizeFrame) support for Asterix (Runtime Only)
Date Thu, 18 Jun 2015 04:23:17 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
index ad21dd1..a64f350 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
@@ -14,12 +14,9 @@
  */
 package edu.uci.ics.asterix.result;
 
-import java.nio.ByteBuffer;
-
-import edu.uci.ics.asterix.common.config.AsterixCompilerProperties;
-import edu.uci.ics.asterix.common.config.GlobalConfig;
 import edu.uci.ics.asterix.om.util.AsterixAppContextInfo;
 import edu.uci.ics.hyracks.api.client.IHyracksClientConnection;
+import edu.uci.ics.hyracks.api.comm.IFrame;
 import edu.uci.ics.hyracks.api.comm.IFrameTupleAccessor;
 import edu.uci.ics.hyracks.api.dataset.DatasetJobRecord.Status;
 import edu.uci.ics.hyracks.api.dataset.IHyracksDataset;
@@ -47,15 +44,15 @@ public class ResultReader {
 
     public void open(JobId jobId, ResultSetId resultSetId) throws HyracksDataException {
         reader = hyracksDataset.createReader(jobId, resultSetId);
-        frameTupleAccessor = new ResultFrameTupleAccessor(FRAME_SIZE);
+        frameTupleAccessor = new ResultFrameTupleAccessor();
     }
 
     public Status getStatus() {
         return reader.getResultStatus();
     }
 
-    public int read(ByteBuffer buffer) throws HyracksDataException {
-        return reader.read(buffer);
+    public int read(IFrame frame) throws HyracksDataException {
+        return reader.read(frame);
     }
 
     public IFrameTupleAccessor getFrameTupleAccessor() {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
index 326697f..3a4fd5f 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
@@ -20,7 +20,6 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.Map;
@@ -37,8 +36,11 @@ import edu.uci.ics.asterix.api.common.SessionConfig.OutputFormat;
 import edu.uci.ics.asterix.api.http.servlet.APIServlet;
 import edu.uci.ics.asterix.om.types.ARecordType;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.api.comm.IFrame;
 import edu.uci.ics.hyracks.api.comm.IFrameTupleAccessor;
+import edu.uci.ics.hyracks.api.comm.VSizeFrame;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.control.nc.resources.memory.FrameManager;
 import edu.uci.ics.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
 
 public class ResultUtils {
@@ -84,13 +86,14 @@ public class ResultUtils {
         conf.out().print("\r\n");
     }
 
+    public static FrameManager resultDisplayFrameMgr = new FrameManager(ResultReader.FRAME_SIZE);
+
     public static void displayResults(ResultReader resultReader, SessionConfig conf)
             throws HyracksDataException {
         IFrameTupleAccessor fta = resultReader.getFrameTupleAccessor();
 
-        ByteBuffer buffer = ByteBuffer.allocate(ResultReader.FRAME_SIZE);
-        buffer.clear();
-        int bytesRead = resultReader.read(buffer);
+        IFrame frame = new VSizeFrame(resultDisplayFrameMgr);
+        int bytesRead = resultReader.read(frame);
         ByteBufferInputStream bbis = new ByteBufferInputStream();
 
         // Whether we need to separate top-level ADM instances with commas
@@ -122,13 +125,13 @@ public class ResultUtils {
         if (bytesRead > 0) {
             do {
                 try {
-                    fta.reset(buffer);
+                    fta.reset(frame.getBuffer());
                     int last = fta.getTupleCount();
                     String result;
                     for (int tIndex = 0; tIndex < last; tIndex++) {
                         int start = fta.getTupleStartOffset(tIndex);
                         int length = fta.getTupleEndOffset(tIndex) - start;
-                        bbis.setByteBuffer(buffer, start);
+                        bbis.setByteBuffer(frame.getBuffer(), start);
                         byte[] recordBytes = new byte[length];
                         int numread = bbis.read(recordBytes, 0, length);
                         if (conf.fmt() == OutputFormat.CSV) {
@@ -146,7 +149,7 @@ public class ResultUtils {
                             conf.out().print("\r\n");
                         }
                     }
-                    buffer.clear();
+                    frame.getBuffer().clear();
                 } finally {
                     try {
                         bbis.close();
@@ -154,7 +157,7 @@ public class ResultUtils {
                         throw new HyracksDataException(e);
                     }
                 }
-            } while (resultReader.read(buffer) > 0);
+            } while (resultReader.read(frame) > 0);
         }
 
         conf.out().flush();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
b/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
index 4cfb8c6..4ee37ba 100644
--- a/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
+++ b/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
@@ -15,8 +15,7 @@
 
 package edu.uci.ics.hyracks.dataflow.std.misc;
 
-import java.nio.ByteBuffer;
-
+import edu.uci.ics.hyracks.api.comm.VSizeFrame;
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -41,14 +40,12 @@ public class ConstantTupleSourceOperatorNodePushable extends AbstractUnaryOutput
 
     @Override
     public void initialize() throws HyracksDataException {
-        ByteBuffer writeBuffer = ctx.allocateFrame();
-        FrameTupleAppender appender = new FrameTupleAppender(ctx.getFrameSize());
-        appender.reset(writeBuffer, true);
+        FrameTupleAppender appender = new FrameTupleAppender(new VSizeFrame(ctx));
         if (fieldSlots != null && tupleData != null && tupleSize > 0)
             appender.append(fieldSlots, tupleData, 0, tupleSize);
         writer.open();
         try {
-            FrameUtils.flushFrame(writeBuffer, writer);
+            appender.flush(writer, true);
         }
         finally {
             writer.close();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/main/resources/asterix-build-configuration.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/resources/asterix-build-configuration.xml b/asterix-app/src/main/resources/asterix-build-configuration.xml
index 03f2f0e..9ac89e7 100644
--- a/asterix-app/src/main/resources/asterix-build-configuration.xml
+++ b/asterix-app/src/main/resources/asterix-build-configuration.xml
@@ -47,15 +47,15 @@
 	</property>
 	<property>
 		<name>compiler.sortmemory</name>
-		<value>98304</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>compiler.groupmemory</name>
-		<value>98304</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>compiler.joinmemory</name>
-		<value>131072</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>storage.buffercache.pagesize</name>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
index 15f0c0a..d29f881 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
@@ -113,12 +113,21 @@ public class ExecutionTest {
 
     @Parameters
     public static Collection<Object[]> tests() throws Exception {
+        Collection<Object[]> testArgs = buildTestsInXml(TestCaseContext.ONLY_TESTSUITE_XML_NAME);
+        if (testArgs.size() == 0){
+            testArgs = buildTestsInXml(TestCaseContext.DEFAULT_TESTSUITE_XML_NAME);
+        }
+        return testArgs;
+    }
+
+    private static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception
{
         Collection<Object[]> testArgs = new ArrayList<Object[]>();
         TestCaseContext.Builder b = new TestCaseContext.Builder();
-        for (TestCaseContext ctx : b.build(new File(PATH_BASE))) {
+        for (TestCaseContext ctx : b.build(new File(PATH_BASE), xmlfile)) {
             testArgs.add(new Object[] { ctx });
         }
         return testArgs;
+
     }
 
     private TestCaseContext tcCtx;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/only.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/only.xml b/asterix-app/src/test/resources/runtimets/only.xml
new file mode 100644
index 0000000..a0cd439
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/only.xml
@@ -0,0 +1,23 @@
+<!--
+ ! 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.
+ !-->
+<test-suite
+    xmlns="urn:xml.testframework.asterix.ics.uci.edu"
+    ResultOffsetPath="results"
+    QueryOffsetPath="queries"
+    QueryFileExtension=".aql">
+    <test-group name="debug">
+
+    </test-group>
+</test-suite>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql
new file mode 100644
index 0000000..0584e28
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql
@@ -0,0 +1,66 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type LineType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+create external dataset Line(LineType)
+using localfs
+(("path"="nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Order(OrderType)
+using localfs
+(("path"="nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Customer(CustomerType)
+using localfs
+(("path"="nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql
new file mode 100644
index 0000000..8c04dcc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql
@@ -0,0 +1,7 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql
new file mode 100644
index 0000000..95b3837
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql
@@ -0,0 +1,16 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+
+use dataverse test;
+
+for $i in dataset('Line')
+group by $comment := $i.l_comment, $id := $i.l_orderkey with $i
+order by $id
+return {
+    "id": $id,
+    "length": string-length($comment),
+    "comment": $comment}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql
new file mode 100644
index 0000000..0584e28
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql
@@ -0,0 +1,66 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type LineType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+create external dataset Line(LineType)
+using localfs
+(("path"="nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Order(OrderType)
+using localfs
+(("path"="nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Customer(CustomerType)
+using localfs
+(("path"="nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql
new file mode 100644
index 0000000..8c04dcc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql
@@ -0,0 +1,7 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql
new file mode 100644
index 0000000..3fd4360
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql
@@ -0,0 +1,13 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+
+use dataverse test;
+
+for $i in dataset('Line')
+order by $i.l_partkey, $i.l_shipdate
+group by $partkey := $i.l_partkey with $i
+return { "partkey": $partkey, "lines": $i}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql
new file mode 100644
index 0000000..0584e28
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql
@@ -0,0 +1,66 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type LineType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+create external dataset Line(LineType)
+using localfs
+(("path"="nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Order(OrderType)
+using localfs
+(("path"="nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Customer(CustomerType)
+using localfs
+(("path"="nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql
new file mode 100644
index 0000000..8c04dcc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql
@@ -0,0 +1,7 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql
new file mode 100644
index 0000000..8b57b08
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql
@@ -0,0 +1,20 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+
+use dataverse test;
+
+for $c in dataset('Customer')
+for $o in dataset('Order')
+where $c.c_custkey = $o.o_custkey
+return {
+  "c_custkey": $c.c_custkey,
+  "o_orderkey": $o.o_orderkey,
+  "len_c_comment": string-length($c.c_comment),
+  "len_o_comment": string-length($o.o_comment),
+  "c_comment": $c.c_comment
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql
new file mode 100644
index 0000000..0584e28
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql
@@ -0,0 +1,66 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type LineType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+create external dataset Line(LineType)
+using localfs
+(("path"="nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Order(OrderType)
+using localfs
+(("path"="nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Customer(CustomerType)
+using localfs
+(("path"="nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql
new file mode 100644
index 0000000..8c04dcc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql
@@ -0,0 +1,7 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/65100727/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql
new file mode 100644
index 0000000..c8107ff
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql
@@ -0,0 +1,18 @@
+/*
+* Description  : Create an external dataset that contains long comments fields, 10% of the
records have a 32K size comments.
+                 This will trigger into the VSizeFrame path
+* Expected Res : Success
+* Date         : Jun 16 2015
+*/
+
+use dataverse test;
+
+for $o in dataset('Order')
+order by $o.o_custkey, $o.o_orderkey
+return {
+    "custkey": $o.o_custkey,
+    "orderkey": $o.o_orderkey,
+    "len-comment": string-length($o.o_comment),
+    "comment": $o.o_comment
+}
+


Mime
View raw message