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

表格组件排序报错 #646

Closed
youtakeoff01 opened this issue Jan 20, 2022 · 0 comments · Fixed by #654
Closed

表格组件排序报错 #646

youtakeoff01 opened this issue Jan 20, 2022 · 0 comments · Fixed by #654
Assignees
Labels
bug Something isn't working

Comments

@youtakeoff01
Copy link

Datart Version
1.0.0-alpha.3

创建一个表格组件。拉一个维度和度量。度量上面作用的函数选择计数。然后保存。
然后点击表头度量上的排序功能报字段找不到。
看了一下是在组装sql的时候。最外层sql group by 和order by 后面的字段增加了view的表别名导致。
例如:
select
COUNT(DATART_VTABLE.is_deleted) as COUNT(is_deleted),
DATART_VTABLE.tenant_id
from
(
select
*
from
mirs.t_form_cheson2014cr_visitbase) as DATART_VTABLE
group by
DATART_VTABLE.tenant_id
order by
DATART_VTABLE.tenant_id,
DATART_VTABLE.COUNT(is_deleted)
limit 20 OFFSET 0

生成这样的sql就是错误的。group by 和 order by后面的字段都不能加 DATART_VTABLE
这个bug 比较致命。影响面非常广。建议赶紧修复。

@scottsut scottsut added the bug Something isn't working label Jan 20, 2022
@scottsut scottsut assigned Cuiyansong and qxqzx13 and unassigned scottsut Jan 20, 2022
@Cuiyansong Cuiyansong linked a pull request Jan 20, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants