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

Sort added equal items ranges randomization #34393

Merged

Conversation

kitaisreal
Copy link
Contributor

@kitaisreal kitaisreal commented Feb 7, 2022

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog Entry:
Ensure that tests don't depend on the result of non-stable sorting of equal elements. Added equal items ranges randomization in debug after sort to prevent issues when we rely on equal items sort order.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Feb 7, 2022
@alexey-milovidov alexey-milovidov self-assigned this Feb 7, 2022
@robot-clickhouse robot-clickhouse added pr-build Pull request with build/testing/packaging improvement and removed pr-not-for-changelog This PR should not be mentioned in the changelog labels Feb 7, 2022
base/base/sort.h Outdated Show resolved Hide resolved
base/base/sort.h Outdated Show resolved Hide resolved
base/base/sort.h Outdated Show resolved Hide resolved
base/base/sort.h Outdated Show resolved Hide resolved
base/base/sort.h Outdated Show resolved Hide resolved
@kitaisreal kitaisreal force-pushed the sort-added-equal-items-randomization branch 2 times, most recently from 500fae2 to 2e4c79b Compare February 8, 2022 10:03
base/base/sort.h Outdated Show resolved Hide resolved
@kitaisreal kitaisreal force-pushed the sort-added-equal-items-randomization branch from 9dbb5a1 to 7b828b4 Compare February 8, 2022 11:56
@@ -17,7 +17,7 @@ ${CLICKHOUSE_CLIENT} --query "select count() > 1 as ok from (select * from odbc(
${CLICKHOUSE_CLIENT} --query "CREATE TABLE t (x UInt8, y Float32, z String) ENGINE = Memory"
${CLICKHOUSE_CLIENT} --query "INSERT INTO t VALUES (1,0.1,'a я'),(2,0.2,'b ą'),(3,0.3,'c d')"

${CLICKHOUSE_CLIENT} --query "SELECT * FROM odbc('DSN={ClickHouse DSN (ANSI)}','$CLICKHOUSE_DATABASE','t') ORDER BY x"
${CLICKHOUSE_CLIENT} --query "SELECT * FROM odbc('DSN={ClickHouse DSN (Unicode)}','$CLICKHOUSE_DATABASE','t') ORDER BY x"
${CLICKHOUSE_CLIENT} --query "SELECT x, y, z FROM odbc('DSN={ClickHouse DSN (ANSI)}','$CLICKHOUSE_DATABASE','t') ORDER BY x"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kitaisreal kitaisreal force-pushed the sort-added-equal-items-randomization branch from 9a8e4bf to e13a0bf Compare February 13, 2022 15:10
@kitaisreal kitaisreal merged commit 70ffcb8 into ClickHouse:master Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-build Pull request with build/testing/packaging improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants