-
Notifications
You must be signed in to change notification settings - Fork 206
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
Column order is not what user define when create table #187
Comments
After some thoughts, I find to fix this issue is a non-trivial task. Currently CeresDB will put primary key columns at the front, and use a |
Can we reorder fields by subscripting the fields? like |
We can organize columns like what you said, but the more tricky issue is the order is used for primary key identification. The first |
This looks like the |
I think it will. The rows within one table will be ordered by primary key. For example, the key is composed of
If we want to fix this, we can remove FYI, |
maybe I can try to fix this, can it be assigned to me? |
Sure, go ahead. |
Describe this problem
Table' columns order is not what user define when create table
Steps to reproduce
Execute those SQL
desc
will outputExpected behavior
The column order should be same with the order when created.
Additional Information
https://github.com/CeresDB/ceresdb/blob/3e826ffbb98d2c5351e63b28dd9dd4644e7d4c1e/sql/src/planner.rs#L265
The root cause is currently we use a BTreeMap when build create table plan, it should use a vector to keep the ordering
ref #154
The text was updated successfully, but these errors were encountered: