Apache Tajo – Data Types

To execute a query in a Tajo shell, open your terminal and move to the Tajo installed directory and then type the following command −

$ bin/tsql 

You will now see the response as shown in the following program −

default> 

You can now execute your queries. Otherwise you can run your queries through web console application to the following URL − http://localhost:26080/

Primitive Data Types

Apache Tajo supports the following list of primitive data types −

S.No.Data type & Description
1integerUsed for storing integer value with 4 bytes storage.
2tinyintTiny integer value is 1 byte
3smallintUsed for storing small size integer 2 bytes value.
4bigintBig range integer value has 8 bytes storage.
5booleanReturns true/false.
6realUsed for storing real value. Size is 4 bytes.
7floatFloating point precision value which has 4 or 8 bytes storage space.
8doubleDouble point precision value stored in 8 bytes.
9char[(n)]Character value.
10varchar[(n)]Variable-length non-Unicode data.
11numberDecimal values.
12binaryBinary values.
13dateCalendar date (year, month, day).Example − DATE ‘2016-08-22’
14timeTime of day (hour, minute, second, millisecond) without a time zone. Values of this type are parsed and rendered in the session time zone.
15timezoneTime of day (hour, minute, second, millisecond) with a time zone. Values of this type are rendered using the time zone from the value.Example − TIME ’01:02:03.456 Asia/kolkata’
16timestampInstant in time that includes the date and time of day without a time zone.Example − TIMESTAMP ‘2016-08-22 03:04:05.321’
17textVariable-length Unicode text.

Leave a Reply