incubator-doris [Bug] window function lag return invalid data

hc2pp10m  于 2022-04-22  发布在  Java
关注(0)|答案(1)|浏览(252)

Search before asking

  • I had searched in the issues and found no similar issues.

Version

1.0.0-rc03

What's Wrong?

  1. CREATE TABLE `wftest` ( `aa` varchar(10) NULL COMMENT "", `bb` text NULL COMMENT "", `cc` text NULL COMMENT "" ) ENGINE=OLAP UNIQUE KEY(`aa`) DISTRIBUTED BY HASH(`aa`) BUCKETS 3 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" );
  2. insert into wftest values
  3. ('a','aa','/wyyt-image/2021/11/13/595345040188712460.jpg'),
  4. ('b','aa','/wyyt-image/2022/04/13/1434607674511761493.jpg'),
  5. ('c','cc','/wyyt-image/2022/04/13/1434607674511761493.jpg')
  6. mysql> select min(t.cc) over(PARTITION by t.cc order by t.aa) ,lag(t.cc,1,'')over(PARTITION by t.cc order by t.aa) as l1 from wftest t;
  7. +------------------------------------------------+------------------------------------------------+
  8. | min(`t`.`cc`) OVER(...) | l1 |
  9. +------------------------------------------------+------------------------------------------------+
  10. | /wyyt-image/2021/11/13/595345040188712460.jpg | |
  11. | /wyyt-image/2022/04/13/1434607674511761493.jpg | |
  12. | /wyyt-image/2022/04/13/1434607674511761493.jpg | ` �7� . � �7� |
  13. +------------------------------------------------+------------------------------------------------+

column l1's result is wrong.

This query works well when set enable_vectorized_engine=true;

What You Expected?

valid result

How to Reproduce?

  • No response*

Anything Else?

  • No response*

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

fdbelqdn

fdbelqdn1#

does function lead also have problem ?

相关问题