📜  Impala-查询语言基础

📅  最后修改于: 2020-11-30 04:59:20             🧑  作者: Mango


Impala数据类型

下表描述了Impala数据类型。

Sr.No Data Type & Description
1

BIGINT

This datatype stores numerical values and the range of this data type is -9223372036854775808 to 9223372036854775807. This datatype is used in create table and alter table statements.

2

BOOLEAN

This data type stores only true or false values and it is used in the column definition of create table statement.

3

CHAR

This data type is a fixed length storage, it is padded with spaces, you can store up to the maximum length of 255.

4

DECIMAL

This data type is used to store decimal values and it is used in create table and alter table statements.

5

DOUBLE

This data type is used to store the floating point values in the range of positive or negative 4.94065645841246544e-324d -1.79769313486231570e+308.

6

FLOAT

This data type is used to store single precision floating value datatypes in the range of positive or negative 1.40129846432481707e-45 .. 3.40282346638528860e+38.

7

INT

This data type is used to store 4-byte integer up to the range of -2147483648 to 2147483647.

8

SMALLINT

This data type is used to store 2-byte integer up to the range of -32768 to 32767.

9

STRING

This is used to store string values.

10

TIMESTAMP

This data type is used to represent a point in a time.

11

TINYINT

This data type is used to store 1-byte integer value up to the range of -128 to 127.

12

VARCHAR

This data type is used to store variable length character up to the maximum length 65,535.

13

ARRAY

This is a complex data type and it is used to store variable number of ordered elements.

14

Map

This is a complex data type and it is used to store variable number of key-value pairs.

15

Struct

This is a complex data type and used to represent multiple fields of a single item.

评论在Impala

Impala中的注释与SQL中的注释类似。通常,在编程语言中我们有两种类型的注释,即单行注释和多行注释。

单行注释-每行后跟“-”的行在Impala中被视为注释。以下是Impala中单行注释的示例。

-- Hello welcome to tutorials point.

多行注释/ ** /之间的所有行在Impala中均被视为多行注释。以下是Impala中多行注释的示例。

/*
Hi this is an example
Of multiline comments in Impala
*/

Impala中的运算符与SQL中的运算符相似。通过单击以下链接来参考我们的SQL教程sql-operators。