starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

Unkown error for query partition key <> value || != value

Open huoarter opened this issue 9 months ago • 2 comments

表语句

CREATE TABLE `t1` (
  `k1` bigint(20) NOT NULL COMMENT "",
  `c1` bigint(20) NULL COMMENT ""
) ENGINE=OLAP 
DUPLICATE KEY(`k1`)
PARTITION BY (`k1`)
DISTRIBUTED BY HASH(`k1`) BUCKETS 32 
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"enable_persistent_index" = "false",
"replicated_storage" = "true",
"compression" = "LZ4"
);

插入数据 insert into t1 values(1, 1); 当查询分区键不等于存在的分区键值时报Unkown error

mysql> select * from t1 where k1 !=1; ERROR 1064 (HY000): Unknown error

mysql> select * from t1 where k1 <> 1; ERROR 1064 (HY000): Unknown error

下面是OK的语句: mysql> select * from t1 where k1 =1; +------+------+ | k1 | c1 | +------+------+ | 1 | 1 | | 1 | 1 | +------+------+ 2 rows in set (0.01 sec)

mysql> select * from t1 where k1 !=2; +------+------+ | k1 | c1 | +------+------+ | 1 | 1 | | 1 | 1 | +------+------+ 2 rows in set (0.01 sec)

huoarter avatar May 28 '24 05:05 huoarter