We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In response to a command like User.order(:created_at).take(6) Rails issues query like
User.order(:created_at).take(6)
SELECT users.* FROM users ORDER BY users.created_at ASC LIMIT 6
This thows an error on vitess
unsupported: in scatter query: order by must reference a column in the select list: users.created_at asc
Steps to reproduce this issue, example:
create_table "users", force: :cascade do |t| t.string "name" t.string "email" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false t.string "password_digest" t.string "remember_digest" t.boolean "admin", default: false t.string "activation_digest" t.boolean "activated", default: false t.datetime "activated_at" t.string "reset_digest" t.datetime "reset_sent_at" t.index ["email"], name: "index_users_on_email", unique: true end
alter vschema on test.users add vindex `binary_md5`(created_at) using `binary_md5`
The text was updated successfully, but these errors were encountered:
Even the below query fails with same error
SELECT col FROM users ORDER BY created_at ASC LIMIT 6
Sorry, something went wrong.
Even the below query fails with same error SELECT col FROM users ORDER BY created_at ASC LIMIT 6
PR #8070 fixes this type of query which does have * column selection in it.
This is resolved.
GuptaManan100
No branches or pull requests
Overview of the Issue
In response to a command like
User.order(:created_at).take(6)
Rails issues query likeThis thows an error on vitess
Reproduction Steps
Steps to reproduce this issue, example:
User.order(:created_at).take(6)
to see the errorThe text was updated successfully, but these errors were encountered: