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: downcast column error #6093

Closed
1 of 2 tasks
zhang2014 opened this issue Jun 21, 2022 · 3 comments · Fixed by #6095
Closed
1 of 2 tasks

bug: downcast column error #6093

zhang2014 opened this issue Jun 21, 2022 · 3 comments · Fixed by #6095
Assignees
Labels
C-bug Category: something isn't working

Comments

@zhang2014
Copy link
Member

zhang2014 commented Jun 21, 2022

Search before asking

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

Version

main branch

mysql> select version();
+--------------------------------------------------------------------------------------+
| version()                                                                            |
+--------------------------------------------------------------------------------------+
| 8.0.26-v0.7.65-nightly-cae12e2-simd(rust-1.63.0-nightly-2022-06-21T01:36:27.065955Z) |
+--------------------------------------------------------------------------------------+
1 row in set (0.03 sec)

What's Wrong?

mysql> SELECT count() FROM numbers(1000) GROUP BY uuid();
ERROR 1105 (HY000): Code: 1058, displayText = downcast column error, column type: "Const(String)", expected column: "common_datavalues::columns::string::StringColumn" (while in processor thread 0).

How to Reproduce?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@zhang2014 zhang2014 added the C-bug Category: something isn't working label Jun 21, 2022
@leiysky
Copy link
Contributor

leiysky commented Jun 21, 2022

I encountered this bug too, the root cause is SingleString hash method won't check Const and Nullable column.

https://github.com/datafuselabs/databend/blob/7d46a582a44e29f1dec988908102894c89d0aefc/common/datablocks/src/kernels/data_block_group_by_hash.rs#L208-L223

cc @sundy-li

@zhang2014
Copy link
Member Author

Why GROUP BY uuid() is const column?

@sundy-li
Copy link
Member

sundy-li commented Jun 21, 2022

Now uuid function generates const column. Maybe we should modify and set uuid value to each row.

@mergify mergify bot closed this as completed in #6095 Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants