tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [1/2] TAJO-642: Change tajo documentation tool to sphinx.
Date Wed, 05 Mar 2014 08:11:21 GMT
Repository: incubator-tajo
Updated Branches:
  refs/heads/master 7454fd871 -> c9fadb76b


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/predicates.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/predicates.rst b/tajo-docs/src/main/sphinx/sql_language/predicates.rst
new file mode 100644
index 0000000..b96376b
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/predicates.rst
@@ -0,0 +1,159 @@
+*****************
+ Predicates
+*****************
+
+=====================
+ IN Predicate
+=====================
+
+IN predicate provides row and array comparison.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  column_reference IN (val1, val2, ..., valN)
+  column_reference NOT IN (val1, val2, ..., valN)
+
+
+Examples are as follows:
+
+.. code-block:: sql
+
+  -- this statement filters lists down all the records where col1 value is 1, 2 or 3:
+  SELECT col1, col2 FROM table1 WHERE col1 IN (1, 2, 3);
+
+  -- this statement filters lists down all the records where col1 value is neither 1, 2 nor
3:
+  SELECT col1, col2 FROM table1 WHERE col1 NOT IN (1, 2, 3);
+
+You can use 'IN clause' on text data domain as follows:
+
+.. code-block:: sql
+
+  SELECT col1, col2 FROM table1 WHERE col2 IN ('tajo', 'hadoop');
+
+  SELECT col1, col2 FROM table1 WHERE col2 NOT IN ('tajo', 'hadoop');
+
+
+==================================
+String Pattern Matching Predicates
+==================================
+
+--------------------
+LIKE
+--------------------
+
+LIKE operator returns true or false depending on whether its pattern matches the given string.
An underscore (_) in pattern matches any single character. A percent sign (%) matches any
sequence of zero or more characters.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string LIKE pattern
+  string NOT LIKE pattern
+
+
+--------------------
+ILIKE
+--------------------
+
+ILIKE is the same to LIKE, but it is a case insensitive operator. It is not in the SQL standard.
We borrow this operator from PostgreSQL.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string ILIKE pattern
+  string NOT ILIKE pattern
+
+
+--------------------
+SIMILAR TO
+--------------------
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string SIMILAR TO pattern
+  string NOT SIMILAR TO pattern
+
+It returns true or false depending on whether its pattern matches the given string. Also
like LIKE, ``SIMILAR TO`` uses ``_`` and ``%`` as metacharacters denoting any single character
and any string, respectively.
+
+In addition to these metacharacters borrowed from LIKE, 'SIMILAR TO' supports more powerful
pattern-matching metacharacters borrowed from regular expressions:
+
++------------------------+-------------------------------------------------------------------------------------------+
+| metacharacter          | description                                                  
                            |
++========================+===========================================================================================+
+| |                 | denotes alternation (either of two alternatives).        
                                |
++------------------------+-------------------------------------------------------------------------------------------+
+| *                      | denotes repetition of the previous item zero or more times.  
                            |
++------------------------+-------------------------------------------------------------------------------------------+
+| +                      | denotes repetition of the previous item one or more times.   
                            |
++------------------------+-------------------------------------------------------------------------------------------+
+| ?                      | denotes repetition of the previous item zero or one time.    
                            |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m}                    | denotes repetition of the previous item exactly m times.     
                            |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m,}                   | denotes repetition of the previous item m or more times.     
                            |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m,n}                  | denotes repetition of the previous item at least m and not more
than n times.             |
++------------------------+-------------------------------------------------------------------------------------------+
+| []                     | A bracket expression specifies a character class, just as in POSIX
regular expressions.   |
++------------------------+-------------------------------------------------------------------------------------------+
+| ()                     | Parentheses can be used to group items into a single logical item.
                       |
++------------------------+-------------------------------------------------------------------------------------------+
+
+Note that `.`` is not used as a metacharacter in ``SIMILAR TO`` operator.
+
+---------------------
+Regular expressions
+---------------------
+
+Regular expressions provide a very powerful means for string pattern matching. In the current
Tajo, regular expressions are based on Java-style regular expressions instead of POSIX regular
expression. The main difference between java-style one and POSIX's one is character class.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string ~ pattern
+  string !~ pattern
+
+  string ~* pattern
+  string !~* pattern
+
++----------+---------------------------------------------------------------------------------------------------+
+| operator | Description                                                                
                      |
++==========+===================================================================================================+
+| ~        | It returns true if a given regular expression is matched to string. Otherwise,
it returns false.  |
++----------+---------------------------------------------------------------------------------------------------+
+| !~       | It returns false if a given regular expression is matched to string. Otherwise,
it returns true.  |
++----------+---------------------------------------------------------------------------------------------------+
+| ~*       | It is the same to '~', but it is case insensitive.                         
                      |
++----------+---------------------------------------------------------------------------------------------------+
+| !~*      | It is the same to '!~', but it is case insensitive.                        
                      |
++----------+---------------------------------------------------------------------------------------------------+
+
+Here are examples:
+
+.. code-block:: sql
+
+  'abc'   ~   '.*c'               true
+  'abc'   ~   'c'                 false
+  'aaabc' ~   '([a-z]){3}bc       true
+  'abc'   ~*  '.*C'               true
+  'abc'   !~* 'B.*'               true
+
+Regular expressions operator is not in the SQL standard. We borrow this operator from PostgreSQL.
+
+*Synopsis for REGEXP and RLIKE operators*
+
+.. code-block:: sql
+
+  string REGEXP pattern
+  string NOT REGEXP pattern
+
+  string RLIKE pattern
+  string NOT RLIKE pattern
+
+But, they do not support case-insensitive operators.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/queries.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/queries.rst b/tajo-docs/src/main/sphinx/sql_language/queries.rst
new file mode 100644
index 0000000..8a212a5
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/queries.rst
@@ -0,0 +1,38 @@
+**************************
+Queries
+**************************
+
+=====================
+Overview
+=====================
+
+*Synopsis*
+
+.. code-block:: sql
+
+  SELECT [distinct [all]] * | <expression> [[AS] <alias>] [, ...]
+    [FROM <table name> [[AS] <table alias name>] [, ...]]
+    [WHERE <condition>]
+    [GROUP BY <expression> [, ...]]
+    [HAVING <condition>]
+    [ORDER BY <expression> [ASC|DESC] [NULL FIRST|NULL LAST] [, ...]]
+
+
+
+=====================
+From Clause
+=====================
+
+
+=====================
+Where Clause
+=====================
+
+
+=====================
+Groupby Clause
+=====================
+
+=====================
+Select list
+=====================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst b/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
new file mode 100644
index 0000000..e5f4d62
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
@@ -0,0 +1,31 @@
+============================
+ SQL Expressions
+============================
+
+-------------------------
+ Arithmetic Expressions
+-------------------------
+
+-------------------------
+Type Casts
+-------------------------
+A type cast converts a specified-typed data to another-typed data. Tajo has two type cast
syntax:
+
+.. code-block:: sql
+
+  CAST ( expression AS type )
+  expression::type
+
+
+-------------------------
+String Expressions
+-------------------------
+
+
+-------------------------
+Function Call
+-------------------------
+
+.. code-block:: sql
+
+  function_name ([expression [, expression ... ]] )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management.rst b/tajo-docs/src/main/sphinx/table_management.rst
new file mode 100644
index 0000000..62a8e45
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management.rst
@@ -0,0 +1,9 @@
+******************
+Table Management
+******************
+
+.. toctree::
+    :maxdepth: 1
+
+    table_management/file_formats
+    table_management/compression

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management/compression.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management/compression.rst b/tajo-docs/src/main/sphinx/table_management/compression.rst
new file mode 100644
index 0000000..3d03ba8
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management/compression.rst
@@ -0,0 +1,5 @@
+*********************************
+Compression
+*********************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management/file_formats.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management/file_formats.rst b/tajo-docs/src/main/sphinx/table_management/file_formats.rst
new file mode 100644
index 0000000..26edac4
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management/file_formats.rst
@@ -0,0 +1,13 @@
+*************************************
+File Formats
+*************************************
+
+.. todo::
+
+===============================
+Text File
+===============================
+
+===============================
+RCFile
+===============================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_partitioning.rst b/tajo-docs/src/main/sphinx/table_partitioning.rst
new file mode 100644
index 0000000..c7b5325
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_partitioning.rst
@@ -0,0 +1,11 @@
+******************
+Table Partitioning
+******************
+
+.. toctree::
+    :maxdepth: 1
+
+    partitioning/intro_to_partitioning
+    partitioning/column_partitioning
+    partitioning/range_partitioning
+    partitioning/hash_partitioning
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/tajo_client_api.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tajo_client_api.rst b/tajo-docs/src/main/sphinx/tajo_client_api.rst
new file mode 100644
index 0000000..d9d6596
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/tajo_client_api.rst
@@ -0,0 +1,5 @@
+*************************************
+Tajo Client API
+*************************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-project/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/tajo-project/src/site/apt/index.apt b/tajo-project/src/site/apt/index.apt
index 6d718f2..d452a3f 100644
--- a/tajo-project/src/site/apt/index.apt
+++ b/tajo-project/src/site/apt/index.apt
@@ -14,9 +14,9 @@
 ~~ See the License for the specific language governing permissions and
 ~~ limitations under the License.
 
-Apache Tajo &#153; - An open source big data warehouse system in Hadoop
+Apache Tajo&#153; - An open source big data warehouse system in Hadoop
 
-  The main goal of Apache Tajo &#153; project is to build an advanced open source data
warehouse system in Hadoop for processing web-scale data sets	
+  The main goal of Apache Tajo&#153; project is to build an advanced open source data
warehouse system in Hadoop for processing web-scale data sets	
 
 Features
 
@@ -71,6 +71,8 @@ Features
 
 News
 
+  * <<[2014-02-27]>> Keuntae Park was invited to ApacheConf 2014.
+
   * <<[2014-01-02]>> Keuntae Park was invited to become a new committer.
 
   * <<[2013-11-20]>> Tajo 0.2.0-incubating Released. Now available for {{{http://apache.org/dyn/closer.cgi/incubator/tajo/tajo-0.2.0-incubating/}download}}!
@@ -93,7 +95,7 @@ Downloads
 
 Disclaimer
 
-  Apache Tajo &#153; is an effort undergoing incubation at The Apache Software Foundation
(ASF)
+  Apache Tajo&#153; is an effort undergoing incubation at The Apache Software Foundation
(ASF)
   sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects
   until a further review indicates that the infrastructure, communications, and decision
making
   process have stabilized in a manner consistent with other successful ASF projects.

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-project/src/site/site.xml
----------------------------------------------------------------------
diff --git a/tajo-project/src/site/site.xml b/tajo-project/src/site/site.xml
index e89dcca..39f99ae 100644
--- a/tajo-project/src/site/site.xml
+++ b/tajo-project/src/site/site.xml
@@ -95,8 +95,8 @@
     </menu>
 
     <menu name="Documentation">
-      <item name="0.8.0-SNAPSHOT (Dev)" href="tajo-0.8.0-doc.html" />
-      <item name="0.2.0-incubating (Current)" href="tajo-0.2.0-doc.html" />
+      <item name="0.8.0-SNAPSHOT (dev)" href="docs/0.8.0/index.html" />
+      <item name="0.2.0-incubating release" href="tajo-0.2.0-doc.html" />
     </menu>
 
     <menu name="Contributes">


Mime
View raw message