Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]SQL数据集count(*)时数据不准确 #35

Closed
wan92hen opened this issue Jun 25, 2021 · 4 comments
Closed

[Bug]SQL数据集count(*)时数据不准确 #35

wan92hen opened this issue Jun 25, 2021 · 4 comments
Assignees
Labels
状态:已完成 类型:bug Something isn't working

Comments

@wan92hen
Copy link

DataEase 版本
v1.0.0

浏览器版本
Chrome 91.0.4472.114 on Windows

Bug 描述
在 SQL数据集中,使用如下 SQL 语句时,预览数据正常,保存确定后显示的数据不正常。

select count(*), DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(create_time/1000) , INTERVAL(-WEEKDAY(FROM_UNIXTIME(create_time/1000))) DAY),"%Y-%m-%d") as week from issues where create_time is not null group by week

Bug 重现步骤(有截图更好)

  1. 添加MySQL数据源
  2. 添加SQL数据集
  3. 使用如下 SQL 语句 count(*) 不指定别名
select count(*), DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(create_time/1000) , INTERVAL(-WEEKDAY(FROM_UNIXTIME(create_time/1000))) DAY),"%Y-%m-%d") as week from issues where create_time is not null group by week

image
image

如果为 count(*) 指定别名,则数据正常

select count(*) as count .............................
@wan92hen wan92hen added the 类型:bug Something isn't working label Jun 25, 2021
@xuwei-fit2cloud
Copy link
Contributor

感谢您的反馈,我们尽快修复

@XiaJunjie2020
Copy link
Member

c89a837 1248188
此bug已修复,将随后续版本发布,感谢您的反馈。

@xuwei-fit2cloud
Copy link
Contributor

已修复,请等待 v1.0.1 版本发布。

@xuwei-fit2cloud
Copy link
Contributor

v1.0.1 已发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
状态:已完成 类型:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants