而
ORC
,
Hudi
,
MagmaAP
是按列存储的格式。
ROW
,
MagmaAP
,
ORC
,
Hudi
都支持
update /delete
,
支持事务,且
MagmaAP
还支持
index
。
对于各种格式的表的建表语法,举几个例子。
#
默认创建的是
ROW
表
CREATE TABLE rank1 (id int, rank int, year
mallint,gender char(1), count int );
#
和上面的创建的表一样, 显式指定存储格式类型
CREATE TABLE rank2 (id int, rank int, year
smallint,gender char(1), count int ) with (appendonly
=true, orientation =row);
#
创建一个
snappy
压缩的
ROW
表
CREATE TABLE rank3 (id int, rank int, year
smallint,gender char(1), count int ) with (appendonly
=true, orientation =row, compresstype = snappy);
#
创建一个不压缩的
ORC
表, 如果不指定压缩类型的话,
默认不压缩。
CREATE TABLE rank3 (id int, rank int, year
smallint,gender char(1), count int ) with (appendonly
=true, orientation =orc);
5
10
15
20
文档被以下合辑收录
评论