You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2016/03/08 07:44:07 UTC

svn commit: r1734024 - in /calcite/site: community/index.html docs/reference.html index.html

Author: jhyde
Date: Tue Mar  8 06:44:07 2016
New Revision: 1734024

URL: http://svn.apache.org/viewvc?rev=1734024&view=rev
Log:
[CALCITE-1124] Add TIMESTAMPADD, TIMESTAMPDIFF functions; add link to Avatica sub-project

Modified:
    calcite/site/community/index.html
    calcite/site/docs/reference.html
    calcite/site/index.html

Modified: calcite/site/community/index.html
URL: http://svn.apache.org/viewvc/calcite/site/community/index.html?rev=1734024&r1=1734023&r2=1734024&view=diff
==============================================================================
--- calcite/site/community/index.html (original)
+++ calcite/site/community/index.html Tue Mar  8 06:44:07 2016
@@ -104,6 +104,7 @@
 <h1 id="upcoming-talks">Upcoming talks</h1>
 
 <ul>
+  <li>2016/03/30 <a href="http://conferences.oreilly.com/strata/hadoop-big-data-ca/public/schedule/detail/48180">Strata + Hadoop World</a>, San Jose (developer showcase)</li>
   <li>2016/04/13 <a href="http://hadoopsummit.org/dublin/agenda/">Hadoop Summit</a>, Dublin</li>
   <li>2016/04/26 <a href="http://kafka-summit.org/schedule/">Kafka Summit</a>, San Francisco</li>
   <li>2016/05/10 <a href="http://events.linuxfoundation.org/events/apache-big-data-north-america/program/schedule">ApacheCon Big Data North America</a>, Vancouver</li>

Modified: calcite/site/docs/reference.html
URL: http://svn.apache.org/viewvc/calcite/site/docs/reference.html?rev=1734024&r1=1734023&r2=1734024&view=diff
==============================================================================
--- calcite/site/docs/reference.html (original)
+++ calcite/site/docs/reference.html Tue Mar  8 06:44:07 2016
@@ -1129,6 +1129,7 @@ FOLLOWING,
 <strong>FOREIGN</strong>,
 FORTRAN,
 FOUND,
+FRAC_SECOND,
 <strong>FREE</strong>,
 <strong>FROM</strong>,
 <strong>FULL</strong>,
@@ -1211,6 +1212,7 @@ MESSAGE_LENGTH,
 MESSAGE_OCTET_LENGTH,
 MESSAGE_TEXT,
 <strong>METHOD</strong>,
+MICROSECOND,
 <strong>MIN</strong>,
 <strong>MINUTE</strong>,
 MINVALUE,
@@ -1294,6 +1296,7 @@ PRIOR,
 PRIVILEGES,
 <strong>PROCEDURE</strong>,
 PUBLIC,
+QUARTER,
 <strong>RANGE</strong>,
 <strong>RANK</strong>,
 READ,
@@ -1376,6 +1379,16 @@ SPECIFIC_NAME,
 <strong>SQLEXCEPTION</strong>,
 <strong>SQLSTATE</strong>,
 <strong>SQLWARNING</strong>,
+SQL_TSI_DAY,
+SQL_TSI_FRAC_SECOND,
+SQL_TSI_HOUR,
+SQL_TSI_MICROSECOND,
+SQL_TSI_MINUTE,
+SQL_TSI_MONTH,
+SQL_TSI_QUARTER,
+SQL_TSI_SECOND,
+SQL_TSI_WEEK,
+SQL_TSI_YEAR,
 <strong>SQRT</strong>,
 <strong>START</strong>,
 STATE,
@@ -1402,6 +1415,8 @@ TEMPORARY,
 TIES,
 <strong>TIME</strong>,
 <strong>TIMESTAMP</strong>,
+TIMESTAMPADD,
+TIMESTAMPDIFF,
 <strong>TIMEZONE_HOUR</strong>,
 <strong>TIMEZONE_MINUTE</strong>,
 <strong>TINYINT</strong>,
@@ -1452,6 +1467,7 @@ USER_DEFINED_TYPE_SCHEMA,
 <strong>VAR_SAMP</strong>,
 VERSION,
 VIEW,
+WEEK,
 <strong>WHEN</strong>,
 <strong>WHENEVER</strong>,
 <strong>WHERE</strong>,
@@ -2192,10 +2208,26 @@ the user or application to supply a time
   </thead>
   <tbody>
     <tr>
+      <td style="text-align: left">{fn ABS(numeric)}</td>
+      <td style="text-align: left">Returns the absolute value of <em>numeric</em></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn EXP(numeric)}</td>
+      <td style="text-align: left">Returns <em>e</em> raised to the power of <em>numeric</em></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LOG(numeric)}</td>
+      <td style="text-align: left">Returns the natural logarithm (base <em>e</em>) of <em>numeric</em></td>
+    </tr>
+    <tr>
       <td style="text-align: left">{fn LOG10(numeric)}</td>
       <td style="text-align: left">Returns the base-10 logarithm of <em>numeric</em></td>
     </tr>
     <tr>
+      <td style="text-align: left">{fn MOD(numeric1, numeric2)}</td>
+      <td style="text-align: left">Returns the remainder (modulus) of <em>numeric1</em> divided by <em>numeric2</em>. The result is negative only if <em>numeric1</em> is negative</td>
+    </tr>
+    <tr>
       <td style="text-align: left">{fn POWER(numeric1, numeric2)}</td>
       <td style="text-align: left">Returns <em>numeric1</em> raised to the power of <em>numeric2</em></td>
     </tr>
@@ -2205,7 +2237,6 @@ the user or application to supply a time
 <p>Not implemented:</p>
 
 <ul>
-  <li>{fn ABS(numeric)} - Returns the absolute value of <em>numeric</em></li>
   <li>{fn ACOS(numeric)} - Returns the arc cosine of <em>numeric</em></li>
   <li>{fn ASIN(numeric)} - Returns the arc sine of <em>numeric</em></li>
   <li>{fn ATAN(numeric)} - Returns the arc tangent of <em>numeric</em></li>
@@ -2214,10 +2245,7 @@ the user or application to supply a time
   <li>{fn COS(numeric)} - Returns the cosine of <em>numeric</em></li>
   <li>{fn COT(numeric)}</li>
   <li>{fn DEGREES(numeric)} - Converts <em>numeric</em> from radians to degrees</li>
-  <li>{fn EXP(numeric)} - Returns <em>e</em> raised to the power of <em>numeric</em></li>
   <li>{fn FLOOR(numeric)} - Rounds <em>numeric</em> down, and returns the largest number that is less than or equal to <em>numeric</em></li>
-  <li>{fn LOG(numeric)} - Returns the natural logarithm (base <em>e</em>) of <em>numeric</em></li>
-  <li>{fn MOD(numeric1, numeric2)} - Returns the remainder (modulus) of <em>numeric1</em> divided by <em>numeric2</em>. The result is negative only if <em>numeric1</em> is negative</li>
   <li>{fn PI()} - Returns a value that is closer than any other value to <em>pi</em></li>
   <li>{fn RADIANS(numeric)} - Converts <em>numeric</em> from degrees to radians</li>
   <li>{fn RAND(numeric)}</li>
@@ -2240,6 +2268,10 @@ the user or application to supply a time
   </thead>
   <tbody>
     <tr>
+      <td style="text-align: left">{fn CONCAT(character, character)}</td>
+      <td style="text-align: left">Returns the concatenation of character strings</td>
+    </tr>
+    <tr>
       <td style="text-align: left">{fn LOCATE(string1, string2)}</td>
       <td style="text-align: left">Returns the position in <em>string2</em> of the first occurrence of <em>string1</em>. Searches from the beginning of the second CharacterExpression, unless the startIndex parameter is specified.</td>
     </tr>
@@ -2251,6 +2283,30 @@ the user or application to supply a time
       <td style="text-align: left">{fn LCASE(string)}</td>
       <td style="text-align: left">Returns a string in which all alphabetic characters in <em>string</em> have been converted to lower case</td>
     </tr>
+    <tr>
+      <td style="text-align: left">{fn LENGTH(string)}</td>
+      <td style="text-align: left">Returns the number of characters in a string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LOCATE(string1, string2 [, integer])}</td>
+      <td style="text-align: left">Returns the position in <em>string2</em> of the first occurrence of <em>string1</em>. Searches from the beginning of <em>string2</em>, unless <em>integer</em> is specified.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LTRIM(string)}</td>
+      <td style="text-align: left">Returns <em>string</em> with leading space characters removed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn RTRIM(string)}</td>
+      <td style="text-align: left">Returns <em>string</em> with trailing space characters removed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SUBSTRING(string, offset, length)}</td>
+      <td style="text-align: left">Returns a character string that consists of <em>length</em> characters from <em>string</em> starting at the <em>offset</em> position</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn UCASE(string)}</td>
+      <td style="text-align: left">Returns a string in which all alphabetic characters in <em>string</em> have been converted to upper case</td>
+    </tr>
   </tbody>
 </table>
 
@@ -2259,29 +2315,55 @@ the user or application to supply a time
 <ul>
   <li>{fn ASCII(string)} - Convert a single-character string to the corresponding ASCII code, an integer between 0 and 255</li>
   <li>{fn CHAR(string)}</li>
-  <li>{fn CONCAT(character, character)} - Returns the concatenation of character strings</li>
   <li>{fn DIFFERENCE(string, string)}</li>
   <li>{fn LEFT(string, integer)}</li>
-  <li>{fn LENGTH(string)}</li>
-  <li>{fn LOCATE(string1, string2 [, integer])} - Returns the position in <em>string2</em> of the first occurrence of <em>string1</em>. Searches from the beginning of <em>string2</em>, unless <em>integer</em> is specified.</li>
-  <li>{fn LTRIM(string)}</li>
   <li>{fn REPEAT(string, integer)}</li>
   <li>{fn REPLACE(string, string, string)}</li>
   <li>{fn RIGHT(string, integer)}</li>
-  <li>{fn RTRIM(string)}</li>
   <li>{fn SOUNDEX(string)}</li>
   <li>{fn SPACE(integer)}</li>
-  <li>{fn SUBSTRING(string, integer, integer)}</li>
-  <li>{fn UCASE(string)} - Returns a string in which all alphabetic characters in <em>string</em> have been converted to upper case</li>
 </ul>
 
 <h4 id="datetime">Date/time</h4>
 
+<table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn CURDATE()}</td>
+      <td style="text-align: left">Equivalent to <code>CURRENT_DATE</code></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CURTIME()}</td>
+      <td style="text-align: left">Equivalent to <code>LOCALTIME</code></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn NOW()}</td>
+      <td style="text-align: left">Equivalent to <code>LOCALTIMESTAMP</code></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn QUARTER(date)}</td>
+      <td style="text-align: left">Equivalent to <code>EXTRACT(QUARTER FROM date)</code>. Returns an integer between 1 and 4.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TIMESTAMPADD(interval, count, timestamp)}</td>
+      <td style="text-align: left">Adds an interval to a timestamp</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TIMESTAMPDIFF(interval, timestamp, timestamp)}</td>
+      <td style="text-align: left">Subtracts two timestamps</td>
+    </tr>
+  </tbody>
+</table>
+
 <p>Not implemented:</p>
 
 <ul>
-  <li>{fn CURDATE()}</li>
-  <li>{fn CURTIME()}</li>
   <li>{fn DAYNAME(date)}</li>
   <li>{fn DAYOFMONTH(date)}</li>
   <li>{fn DAYOFWEEK(date)}</li>
@@ -2290,11 +2372,7 @@ the user or application to supply a time
   <li>{fn MINUTE(time)}</li>
   <li>{fn MONTH(date)}</li>
   <li>{fn MONTHNAME(date)}</li>
-  <li>{fn NOW()}</li>
-  <li>{fn QUARTER(date)}</li>
   <li>{fn SECOND(time)}</li>
-  <li>{fn TIMESTAMPADD(interval, count, timestamp)}</li>
-  <li>{fn TIMESTAMPDIFF(interval, timestamp, timestamp)}</li>
   <li>{fn WEEK(date)}</li>
   <li>{fn YEAR(date)}</li>
 </ul>

Modified: calcite/site/index.html
URL: http://svn.apache.org/viewvc/calcite/site/index.html?rev=1734024&r1=1734023&r2=1734024&view=diff
==============================================================================
--- calcite/site/index.html (original)
+++ calcite/site/index.html Tue Mar  8 06:44:07 2016
@@ -129,6 +129,14 @@
         </ul>
       </summary>
     </div>
+    <div class="unit one-third">
+      <summary>
+        <h3>Sub-Projects</h3>
+        <ul>
+          <li><a href="/avatica">Avatica</a></li>
+        </ul>
+      </summary>
+    </div>
   </div>
 </section>