Skip to content

VARCHAR类型的列用在where条件中出错 #31

Description

@crcc

系统是centos 7.3,使用预编译的palo-0.8.0_centos7.1
表结构直接按教程中的创建的

CREATE TABLE table1
(
    siteid INT DEFAULT '10',
    citycode SMALLINT,
    username VARCHAR(32) DEFAULT '',
    pv BIGINT SUM DEFAULT '0'
)
AGGREGATE KEY(siteid, citycode, username)
DISTRIBUTED BY HASH(siteid) BUCKETS 10
PROPERTIES("replication_num" = "1");

导入数据后,在where条件中限定varchar类型的列,结果返回空。

MySQL [example_db]> select * from table1;
+--------+----------+----------+------+------+
| siteid | citycode | username | pv   | uv   |
+--------+----------+----------+------+------+
|      1 |        1 | 'jim'    |    2 |    0 |
|      3 |        2 | 'tom'    |    2 |    0 |
|      4 |        3 | 'bush'   |    3 |    0 |
|      5 |        3 | 'helen'  |    3 |    0 |
|      2 |        1 | 'grace'  |    2 |    0 |
+--------+----------+----------+------+------+
5 rows in set (0.00 sec)

MySQL [example_db]> select * from table1 where username like 'j%';
Empty set (0.01 sec)

MySQL [example_db]> select * from table1 where username = 'jim';
Empty set (0.01 sec)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions