apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.7k stars 3.28k forks source link

[Bug] 针对datetime类型的字段,进行where查询时,where create_time>"0000-00-00 00:00:00"返回结果为空 #8898

Open HackerXinai opened 2 years ago

HackerXinai commented 2 years ago

Search before asking

Version

5.1.0

What's Wrong?

问题:针对datetime类型的字段,进行where查询时,where create_time>"0000-00-00 00:00:00"返回结果为空

操作过程: use testdb; CREATE TABLE test_tbl ( create_time datetime NOT NULL COMMENT "创建时间" ) ENGINE=OLAP DUPLICATE KEY(create_time) COMMENT "test" DISTRIBUTED BY HASH(create_time) BUCKETS 1;

insert into test_tbl values("2022-02-02 00:00:00"); insert into test_tbl values("2022-02-03 00:00:00"); insert into test_tbl values("2022-02-04 00:00:00"); insert into test_tbl values("2022-02-05 00:00:00"); insert into test_tbl values("2022-02-06 00:00:00");

select from test_2.test_tbl; select from test_2.test_tbl where create_time>"2022-02-02 00:00:00"; select * from test_2.test_tbl where create_time>"0000-00-00 00:00:00";

What You Expected?

where create_time>"0000-00-00 00:00:00"返回结果正常

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

wangbo commented 2 years ago

What does version 5.1.0 mean in Doris? Is it a bug for Vectorization Version?

dataroaring commented 2 years ago

Please add a test case under regression-test.

HackerXinai commented 2 years ago

What does version 5.1.0 mean in Doris? Is it a bug for Vectorization Version?

doris编译版本是:0.14.x 5.1.0是指在doris中执行命令select VERSION(),显示出的版本。

HackerXinai commented 2 years ago

在正文What's Wrong?部分详细写明了操作过程

BiteTheDDDDt commented 2 years ago

What does version 5.1.0 mean in Doris? Is it a bug for Vectorization Version?

This version is used to adapt to mysql.

BiteTheDDDDt commented 2 years ago

This case is already fixed by master version.

HackerXinai commented 2 years ago

What does version 5.1.0 mean in Doris? Is it a bug for Vectorization Version?

This version is used to adapt to mysql.

666