Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "Hive/Tutorial" page has been changed by Ning Zhang.
The comment on this change is: √.
http://wiki.apache.org/hadoop/Hive/Tutorial?action=diff&rev1=18&rev2=19

. →INT
. →TINYINT
→FLOAT
+ . →INT
+ . →TINYINT
→STRING
. →BOOLEAN
→Complex Type
 This type hierarchy defines how the types are implicitly converted in the query language.
Implicit conversion is allowed for types from child to an ancestor. So when a query expression
expects type1 and the data is of type2 type2 is implicitly converted to type1 if type1 is
an ancestor of type2 in the type hierarchy. Apart from these fundamental rules for implicit
conversion based on type system, Hive also allows the special case for conversion:
+ This type hierarchy defines how the types are implicitly converted in the query language.
Implicit conversion is allowed for types from child to an ancestor. So when a query expression
expects type1 and the data is of type2 type2 is implicitly converted to type1 if type1 is
an ancestor of type2 in the type hierarchy. Apart from these fundamental rules for implicit
conversion based on type system, Hive also allows the special implicit type conversion for
convenience:
* STRING → DOUBLE
@@ 104, +106 @@
* Arithmetic Operators  The following operators support various common arithmetic operations
on the operands. All of them return number types.
''' Arithmetic Operators '''
 Operator Operand types Description 
+ '''Operator''' '''Operand types''' '''Description''' 
 A + B all number types Gives the result of adding A and B. The type of the result
is the same as the common parent(in the type hierarchy) of the types of the operands. e.g.
since every integer is a float, therefore float is a containing type of integer so the + operator
on a float and an int will result in a float. 
+ A + B all number types Gives the result of adding A and B. The type of the result
is the same as the common parent(in the type hierarchy) of the types of the operands. For
example, since every integer is a float, FLOAT is a containing type of INT. So the + operator
on a float and an int will result in a float. 
A  B all number types Gives the result of subtracting B from A. The type of the result
is the same as the common parent(in the type hierarchy) of the types of the operands. 
A * B all number types Gives the result of multiplying A and B. The type of the result
is the same as the common parent(in the type hierarchy) of the types of the operands. Note
that if the multiplication causing overflow, you will have to cast one of the operators to
a type higher in the type hierarchy. 
A / B all number types Gives the result of dividing B from A. The type of the result
is the same as the common parent(in the type hierarchy) of the types of the operands. If the
operands are integer types, then the result is the quotient of the division. 
@@ 125, +127 @@
A AND B boolean TRUE if both A and B are TRUE, otherwise FALSE 
A && B boolean Same as A AND B 
A OR B boolean TRUE if either A or B or both are TRUE, otherwise FALSE 
 {{{ A  B }}} boolean Same as A OR B 
+ A  B boolean Same as A OR B 
NOT A boolean TRUE if A is FALSE, otherwise FALSE 
!A boolean Same as NOT A 
