You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by ti...@apache.org on 2012/08/22 06:04:37 UTC

svn commit: r1375890 - /incubator/vxquery/site/development_tips.html

Author: tillw
Date: Wed Aug 22 04:04:36 2012
New Revision: 1375890

URL: http://svn.apache.org/viewvc?rev=1375890&view=rev
Log:
add missing file

Added:
    incubator/vxquery/site/development_tips.html

Added: incubator/vxquery/site/development_tips.html
URL: http://svn.apache.org/viewvc/incubator/vxquery/site/development_tips.html?rev=1375890&view=auto
==============================================================================
--- incubator/vxquery/site/development_tips.html (added)
+++ incubator/vxquery/site/development_tips.html Wed Aug 22 04:04:36 2012
@@ -0,0 +1,98 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Aug 21, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title></title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+    <meta name="Date-Revision-yyyymmdd" content="20120821" />
+    <meta http-equiv="Content-Language" content="en" />
+        
+        </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="./" id="bannerLeft">
+                                                <img src="images/VXQuery.png" alt="VXQuery" />
+                </a>
+                                            <a href="../" id="bannerRight">
+                                                <img src="images/apache-incubator-logo.png" alt="Apache Incubator" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+        
+                <div class="xleft">
+        <span id="publishDate">Last Published: 2012-08-21</span>
+                  &nbsp;| <span id="projectVersion">Version: 0.1-SNAPSHOT</span>
+                      </div>
+            <div class="xright">        
+        
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+        
+                                <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                                                                                <li class="collapsed">
+                          <a href="project-info.html" title="Project Information">Project Information</a>
+                  </li>
+          </ul>
+                       <h5>Modules</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="vxquery-core/index.html" title="VXQuery Core">VXQuery Core</a>
+            </li>
+                  <li class="none">
+                          <a href="vxquery-xtest/index.html" title="VXQuery XTest">VXQuery XTest</a>
+            </li>
+                  <li class="none">
+                          <a href="vxquery-cli/index.html" title="VXQuery CLI">VXQuery CLI</a>
+            </li>
+          </ul>
+                       <h5>For Developers</h5>
+                  <ul>
+                  <li class="none">
+            <strong>Development Tips</strong>
+          </li>
+          </ul>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
+      </a>
+                   
+        
+            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <!-- 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. --><div class="section"><h2>Developer Tips<a name="Developer_Tips"></a></h2><div class="section"><h3>Installation<a name=
 "Installation"></a></h3><p>Install instructions can be found in the <a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/docs/README">README file</a>.</p></div><div class="section"><h3>Hyracks Data Mapping<a name="Hyracks_Data_Mapping"></a></h3><p>Hyracks supports several basic data types stored in byte arrays. The byte arrays can be accessed through objects referred to as pointables. The pointable helps with tracking the bytes stored in a larger storage array. Some pointables support converting the byte array into a desired format such as for numeric type. The most basic pointable has three values stored in the object.</p><ul><li>byte array</li><li>starting offset</li><li>length</li></ul><p>In VXQuery the TaggedValuePointable is used to read a result from this byte array. The first byte defines the data type and alerts us to what pointable to use for reading the rest of the data.</p><div class="section"><h4>Fixed Length Data<a name=
 "Fixed_Length_Data"></a></h4><p>Fixed length data types can be stored in a set field size. The following outlines the Hyracks data type or custom VXQuery definition with the details about the implementation.</p><table border="1" class="bodyTable"><tr class="a"><td align="left"><b>Data Type</b></td><td align="left"><b>Pointable Name</b></td><td align="left"><b>Data Size</b></td></tr><tr class="b"><td align="left">xs:boolean</td><td align="left">BooleanPointable</td><td align="right">1</td></tr><tr class="a"><td align="left">xs:byte</td><td align="left">BytePointable</td><td align="right">1</td></tr><tr class="b"><td align="left">xs:date</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="a"><td align="left">xs:dateTime</td><td align="left"><a class="externa
 lLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java">XSDateTimePointable</a></td><td align="right">12</td></tr><tr class="b"><td align="left">xs:dayTimeDuration</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="a"><td align="left">xs:decimal</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java">XSDecimalPointable</a></td><td align="right">9</td></tr><tr class="b"><td align="left">xs:double</td><td align="left">DoublePointable</td><td align="right">8</td></tr><tr class="a"><td align="left">xs:duration</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamode
 l/accessors/atomic/XSDurationPointable.java">XSDurationPointable</a></td><td align="right">12</td></tr><tr class="b"><td align="left">xs:float</td><td align="left">FloatPointable</td><td align="right">4</td></tr><tr class="a"><td align="left">xs:gDay</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="b"><td align="left">xs:gMonth</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="a"><td align="left">xs:gMonthDay</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-c
 ore/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="b"><td align="left">xs:gYear</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="a"><td align="left">xs:gYearMonth</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDatePointable.java">XSDatePointable</a></td><td align="right">6</td></tr><tr class="b"><td align="left">xs:int</td><td align="left">IntegerPointable</td><td align="right">4</td></tr><tr class="a"><td align="left">xs:integer</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="b"><td 
 align="left">xs:negativeInteger</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="a"><td align="left">xs:nonNegativeInteger</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="b"><td align="left">xs:nonPositiveInteger</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="a"><td align="left">xs:positiveInteger</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="b"><td align="left">xs:short</td><td align="left">ShortPointable</td><td align="right">2</td></tr><tr class="a"><td align="left">xs:time</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSTimePointable.java">XSTimePointable</a></td><td align="right">8</td></tr><tr class="b"><td align="left">xs:unsignedByte</td><td align="left">ShortPointable</td><td align="right">2</td></tr><
 tr class="a"><td align="left">xs:unsignedInt</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="b"><td align="left">xs:unsignedLong</td><td align="left">LongPointable</td><td align="right">8</td></tr><tr class="a"><td align="left">xs:unsignedShort</td><td align="left">IntegerPointable</td><td align="right">4</td></tr><tr class="b"><td align="left">xs:yearMonthDuration</td><td align="left">IntegerPointable</td><td align="right">4</td></tr></table></div><div class="section"><h4>Variable Length Data<a name="Variable_Length_Data"></a></h4><p>Some information can not be stored in a fixed length value. The following data types are stored in variable length values. Because the size varies, the first two bytes are used to store the length of the total value in bytes. QName is one exception to this rule because the QName field has three distinct variable length fields. In this case we basically are storing three strings right after each other.</p><p>Please
  note that all strings are stored in UTF8. The UTF8 characters range in size from one to three bytes. UTF8StringWriter supports writing a character sequence into the UTF8StringPointable format.</p><table border="1" class="bodyTable"><tr class="a"><td align="left"><b>Data Type</b></td><td align="left"><b>Pointable Name</b></td><td align="left"><b>Data Size</b></td></tr><tr class="b"><td align="left">xs:anyURI</td><td align="left">UTF8StringPointable</td><td align="right">2 + length</td></tr><tr class="a"><td align="left">xs:base64Binary</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSBinaryPointable.java">XSBinaryPointable</a></td><td align="right">2 + length</td></tr><tr class="b"><td align="left">xs:hexBinary</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-co
 re/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSBinaryPointable.java">XSBinaryPointable</a></td><td align="right">2 + length</td></tr><tr class="a"><td align="left">xs:NOTATION</td><td align="left">UTF8StringPointable</td><td align="right">2 + length</td></tr><tr class="b"><td align="left">xs:QName</td><td align="left"><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSQNamePointable.java">XSQNamePointable</a></td><td align="right">6 + length</td></tr><tr class="a"><td align="left">xs:string</td><td align="left">UTF8StringPointable</td><td align="right">2 + length</td></tr></table></div></div><div class="section"><h3>String Iterators<a name="String_Iterators"></a></h3><p>For many string functions, we have used string iterators to traverse the string. The iterator allows the user to ignore the details about the byte size and number of charact
 ers. The iterator returns the next character or an end of string value. Stacking iterators can be used to alter the string into a desired form.</p><ul><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/ICharacterIterator.java">ICharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/LowerCaseCharacterIterator.java">LowerCaseStringCharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/SubstringAfterCharacterIterator.java">SubstringAfterStringCharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src
 /main/java/org/apache/vxquery/runtime/functions/strings/SubstringBeforeCharacterIterator.java">SubstringBeforeStringCharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/SubstringCharacterIterator.java">SubstringStringCharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/UTF8StringCharacterIterator.java">UTF8StringCharacterIterator</a></li><li><a class="externalLink" href="https://svn.apache.org/repos/asf/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/UpperCaseCharacterIterator.java">UpperCaseStringCharacterIterator</a></li></ul></div><div class="section"><h3>Array Backed Value Store<a name="Array_Backed_Value_Store"></a></h3><p>The array
  back value store is a key design element of Hyracks. The object is used to manage an output array. The system creates an array large enough to hold your output. Adding to the result, if necessary. The array can be reused and can hold multiple pointable results due to the starting offset parameter in the pointable.</p></div></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+              Copyright &#169;                    2012
+                        <a href="http://www.apache.org/">Apache Software Foundation</a>.
+            All Rights Reserved.      
+        
+                  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>