-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Columns re-ordered after type change #1185
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
May I work on this issue? |
|
Thanks! @vorakunal I have assigned the issue to you. Let us know if you need any help. |
Sort of, it's an incorrectly computed "dense rank" of the column |
Sounds good, let's use |
@seancolsen I am not to able reproduce the error, I followed the instruction but the order is consistent after the type-change operation for both the column. |
@vorakunal Yeah, the fact that you can't reproduce it is not too surprising, given that I was observing some inconsistent behavior. @silentninja and @mathemancer since you have a deeper understanding of the root cause of the problem, would you be able to provide more resilient reproduction steps? |
@vorakunal By default, Postgres uses random order, most of the time it is based on the order it is on the disk(creation order) but it cannot be relied upon as per postgres docs So this issue is a random bug and cannot be deterministically reproduced. As some of our use cases depend on the order of the columns, we should explicitly specify the sorting order when fetching column to order it based on the |
@vorakunal just to clarify (from chatting with @silentninja) there is no need to successfully reproduce the bug before applying a fix where you order the columns by the |
@seancolsen @silentninja Alright, I'll look into it. |
Unassigned due to inactivity. |
Can I work on this? |
@Anish9901 Sure, go ahead! |
Reproduce
"New Table" > "Import Data" > "Copy and Paste Text"
Paste the following data and proceed to create and view the table (by clicking "Continue" and then "Finish Import").
Click on the column header for column
a
and change the type from "Number" to "Text", clicking "Save".Expect columns to be ordered
id
,a
,b
.Once I did this and observed the columns to be ordered
a
,id
,b
. Another time. I observed the columns to be orderedid
,b
,a
. I'm not sure what affects the ordering of the columns, but the order seems to remain consistent (even if incorrect) after the type-change operation.Implementation
The backend should make sure that the column list in the API should always be ordered by suitable
index
.Additional details
The text was updated successfully, but these errors were encountered: