-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
TABLESAMPLE REGIONS() with unsigned bigint primary key returns unordered result #48253
Comments
BTW is it ok to add a hidden environmental switch or something to |
BTW this can be workedaround on the client side by forcing a SELECT * FROM a TABLESAMPLE REGIONS() ORDER BY coalesce(pk)
-- ^~~~~~~~
|
/type regression |
/type remove regression |
@JasonWu0506: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/remove-type regression |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Populate data:
Perform the tablesample regions() query:
2. What did you expect to see? (Required)
3. What did you see instead (Required)
The `pk` is ordered like a signed integer.
EXPLAIN
ing this shows theORDER BY
is eliminated. So the fix should be applied to theTableSample
object itself.4. What is your TiDB version? (Required)
v7.6.0-alpha-nightly-20231101
(Also reproduced on v7.3.0 and v6.5.2. Should affect every TiDB version since TABLESAMPLE REGIONS() was implemented)
The text was updated successfully, but these errors were encountered: