You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ji...@apache.org on 2015/10/29 05:45:02 UTC

[11/15] incubator-asterixdb git commit: ASTERIXDB-1102: VarSize Encoding to store length of String and ByteArray

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/742aba85/asterix-app/src/test/resources/runtimets/queries/string/varlen-encoding/varlen-encoding.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/varlen-encoding/varlen-encoding.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/string/varlen-encoding/varlen-encoding.3.query.aql
new file mode 100644
index 0000000..d374536
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/varlen-encoding/varlen-encoding.3.query.aql
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+let $str127 := "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+let $str128 := string-concat([ "y", $str127 ])
+let $str256 := string-concat([ $str128, $str128 ])
+let $str1024 := string-concat([ $str256, $str256, $str256, $str256 ])
+let $str4096 := string-concat([ $str1024, $str1024, $str1024, $str1024])
+let $str16384 := string-concat([ $str4096, $str4096, $str4096, $str4096])                   // 16k
+let $str65536 := string-concat([ $str16384, $str16384, $str16384, $str16384])               // 64k
+let $str262144 := string-concat([ $str65536, $str65536, $str65536, $str65536])              // 256k
+let $str1048576 := string-concat([ $str262144, $str262144, $str262144, $str262144])         // 1M
+let $str4194304 := string-concat([ $str1048576, $str1048576, $str1048576, $str1048576])     // 4M
+let $str16777216 := string-concat([ $str4194304, $str4194304 , $str4194304, $str4194304])   // 16M
+
+return [ string-length($str127), string-length($str128), string-length($str256), 
+string-length($str1024), string-length($str4096), string-length($str16384),
+string-length($str65536), string-length($str262144), string-length($str1048576),
+string-length($str4194304), string-length($str16777216) ]