You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
目前druid解析流程中是根据col个数去判断使用list还是list columns, 通常单个partition by col的时候用的是partition by list (col1), 多个的时候是partition by list columns (col1, col2), 所以想确认下当前的测试用例是否正确。
在LIST分区中,PARTITION BY LIST(expr),expr是整数型的列或者返回值为整数的列的表达式,LIST COLUMNS存在两个重要的区分:
1. 在 LIST COLUMNS分区中,使用PARTITION BY LIST COLUMNS(column_list),column_list是单个或者多个列名,不再是表达式。
2. LIST COLUMNS分区不再局限于整数列。
若需字符串类型作为LIST COLUMNS的一列则不适用于LIST分区。生成的对应SQL异常。
dbtype: OceanBase
dbversion: V4.22
druid verion: 1.2.23
jdk verion: 1.8
error sql:
CREATE TABLE t2_m_lh (col1 INT NOT NULL,col2 varchar(50),col3 INT NOT NULL)
PARTITION BY LIST (col1)
SUBPARTITION BY HASH(col3) SUBPARTITIONS 3
(PARTITION p0 VALUES IN(100),
PARTITION p1 VALUES IN(200),
PARTITION p2 VALUES IN(300)
);
CREATE TABLE t2_m_lch(col1 INT,col2 INT)
PARTITION BY LIST COLUMNS(col1)
SUBPARTITION BY HASH(col2) SUBPARTITIONS 5
(PARTITION p0 VALUES IN(100),
PARTITION p1 VALUES IN(200),
PARTITION p2 VALUES IN(300)
);
testcase code:
stacktrace info:
error info: 解析结果partitioning 均为SQLPartitionByList对象 无法区分 LIST LIST COLUMNS分区类型
The text was updated successfully, but these errors were encountered: