hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/HiveQL" by RaghothamMurthy
Date Mon, 06 Oct 2008 06:37:53 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by RaghothamMurthy:
http://wiki.apache.org/hadoop/Hive/HiveQL

------------------------------------------------------------------------------
+ [[TableOfContents]]
  = Data Definition Statements =
  
  == Create Table ==
@@ -81, +82 @@

  === Select Statement ===
  {{{
  [insert_clause] 
- SELECT [ALL|DISTINCT] select_list 
+ SELECT [ALL|DISTINCT] select_list
  FROM from_list 
  [WHERE where_condition] 
  [GROUP BY col_list] 
  [ORDER BY col_list] 
  [CLUSTER BY col_list]
  
- from_list:
+ select_list: expression, expression, ...
+ }}}
+ 
+ === Expressions ===
+ ==== Accessing table columns ====
+ Accessing columns and in case of arrays and maps, accessing individual items and values
respectively
+ {{{
+ field_expression
+   : table_name.col_name
+   | table_name.col_name[expression]
+ }}}
+ 
+ 
+ ==== Operators ====
+ {{{
+ -- Arithmetic
+ +, -, *, /, %, -(unary)
+ 
+ -- Bitwise
+ |, &, ^, ~(unary)
+ 
+ -- Logical
+ =, <>, <=, >=, <, >, IS NULL, IS NOT NULL
+ 
+ -- String
+ LIKE, RLIKE, REGEXP
+ 
+ -- Boolean
+ AND, OR, NOT
+ 
+ }}}
+ ==== Casting ====
+ {{{
+ CAST (expression AS primitive_type)
+ }}}
+ === Joins ===
+ {{{
+ from_list: from_source [LEFT OUTER|RIGHT OUTER|FULL OUTER] JOIN ON (equality_expression,
equality_expression, ...)
+ 
+ equality_expression: expression = expression
  }}}
  
  === Multi-table Insert Statement ===
@@ -105, +145 @@

  [GROUP BY col_list] 
  [ORDER BY col_list] 
  [CLUSTER BY col_list]
-   
  }}}
  
  === Insert Clause ===
@@ -118, +157 @@

    | TABLE table_name
  }}}
  Will support APPEND and PARTITION in the future.
+ 
+ === Sampling ===
+ {{{
+ table_sample: TABLESAMPLE (BUCKET number OUT OF number)
+ }}}
  === Union ===
  {{{
  select_statement UNION ALL select_statement
@@ -132, +176 @@

  {{{
  SHOW TABLES [table_name | table_name_pattern]
  }}}
+ == Explain Plan ==
+ {{{
+ EXPLAIN [EXTENDED] query_statement
+ }}}
  == Set/get system properties ==
  {{{
  -- To show all properties

Mime
View raw message