背景:starock版本 2.5
com.alibaba.druid包 1.2.5 版本
创建聚合类型表的时候,
OdpsStatementParser parser = new OdpsStatementParser(ddl);
SQLCreateTableStatement statement = null;
Boolean isException = Boolean.FALSE;
try {
statement = (SQLCreateTableStatement) parser.parseCreateTable();
} catch (Exception e) {
isException = Boolean.TRUE;
}
解析 带有bitmap。hll 的建表语句失败:syntax error, error in :‘bitmap BITMAP_UNION NULL COMMENT "ssd’, expect ), actual null, pos 248, line 1, column 237, token IDENTIFIER BITMAP_UNION
建表语句如下:CREATE TABLE ods_agg_v1
( site_id
largeint(40) NOT NULL COMMENT “id of site”, date
date NOT NULL COMMENT “time of event”, city_code
varchar(20) NULL COMMENT “city_code of user”, new_table_1719891717128
bitmap BITMAP_UNION NULL COMMENT “ssds”, new_table_1719891769223
hll HLL_UNION NULL COMMENT “xaasax” ) ENGINE=OLAP AGGREGATE KEY(site_id
, date
, city_code
) DISTRIBUTED BY HASH(site_id
) BUCKETS 8 PROPERTIES ( “replication_num” = “3”, “in_memory” = “false”, “storage_format” = “DEFAULT”, “enable_persistent_index” = “false”, “compression” = “LZ4” );