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

Remove garbage. #56350

Merged
merged 79 commits into from
Nov 13, 2023
Merged

Remove garbage. #56350

merged 79 commits into from
Nov 13, 2023

Conversation

alexey-milovidov
Copy link
Member

@alexey-milovidov alexey-milovidov commented Nov 6, 2023

Changelog category (leave one):

  • Backward Incompatible Change

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

You can no longer use the aggregate function avgWeighted with arguments of type Decimal. Workaround: convert arguments to Float64. This closes #43928. This closes #31768. This closes #56435. If you have used this function inside materialized views or projections with Decimal arguments, contact [email protected]. Fixed error in aggregate function sumMap and made it slower around 1.5..2 times. It does not matter because the function is garbage anyway. This closes #54955. This closes #53134. This closes #55148. Fix a bug in function groupArraySample - it used the same random seed in case more than one aggregate state is generated in a query.

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-feature Pull request with new product feature label Nov 6, 2023
@robot-ch-test-poll2
Copy link
Contributor

robot-ch-test-poll2 commented Nov 6, 2023

This is an automated comment for commit c4de404 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker image for serversThe check to build and optionally push the mentioned image to docker hub✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integrational tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
Push to DockerhubThe check for building and pushing the CI related docker images to docker hub✅ success
SQLTestThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
SQLancerFuzzing tests that detect logical bugs with SQLancer tool✅ success
SqllogicRun clickhouse on the sqllogic test set against sqlite and checks that all statements are passed✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style CheckRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success
Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR⏳ pending
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests❌ failure
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests❌ failure
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure

@alexey-milovidov
Copy link
Member Author

sumMap is utter garbage. It uses promoted Decimal type, e.g. Decimal128, for state serialization while using non-promoted Decimal type for the result.

@alexey-milovidov
Copy link
Member Author

@alexey-milovidov
Copy link
Member Author

@Algunenano I've added a test, and it produces MSan error on master:
https://pastila.nl/?000b9ea7/0b76fa5d47173281f3f5160e7b4e9836#C3+cFjMNJwkTHcg28gAlEQ==

It means we have to merge this ASAP.

@alexey-milovidov
Copy link
Member Author

This PR will fix #54955 and #53134.

@alexey-milovidov
Copy link
Member Author

I regret that we let #7898 and #1250 into our codebase.

@alexey-milovidov
Copy link
Member Author

#56650

@robot-ch-test-poll2 robot-ch-test-poll2 added the submodule changed At least one submodule changed in this PR. label Nov 13, 2023
@alexey-milovidov alexey-milovidov merged commit 7a48905 into master Nov 13, 2023
@alexey-milovidov alexey-milovidov deleted the system-symbols branch November 13, 2023 11:25
};

template <UInt8 K, typename HashValueType>
AggregateFunctionPtr createAggregateFunctionWithK(const DataTypes & argument_types, const Array & params)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why K needs to be part of the template and force compiling the same functions over and over. It seems HyperLogLogCounter could just get k as a parameter

@tavplubix
Copy link
Member

@alexey-milovidov, you forgot to check the failed tests before merging:
Performance Comparison [3/4] — 2 errors - https://s3.amazonaws.com/clickhouse-test-reports/56350/c4de4045f15df2a835d7fb73793d75e3216e62bf/performance_comparison_[3_4]/report.html
it was related, this PR breaks Performance tests in master. Should we revert this PR?

@tavplubix
Copy link
Member

Fix: #56797

yl-lisen added a commit to timeplus-io/proton that referenced this pull request Dec 21, 2024
* Add aggregation function for Largest-Triangle-Three-Buckets (#53145)

* Added a simple lttb aggregate function

* Added support for multiple datatypes

* Added support for Date and Date32, updated LTTBData struct

* Updated code to handle bucket size 0 and 1

* Added sort for LTTBData

* Added tests and documentation

* Added some code style fixes

* Added function to new func ref file

* Removed function from new func ref file

* Apply suggestions from code review

* Updated unit tests

* updated LTTB data code

* Minor style fixes

* Updated code with std sort

* updated tests

* Renamed lttb to largestTriangleThreeBuckets

* Added alias lttb

---------

Co-authored-by: Alexey Milovidov <[email protected]>

* ClickHouse/ClickHouse#56350 (partial)

* fix: split lttb bucket strategy, first bucket and last bucket should only contain single point (#57003)

* fix: split lttb bucket policy, first bucket and last bucket should only
contain single point

* add comments and modify the corresponding query test

* style: update code format

* style: remove useless comments

* feat: add lttb bucket size test

* fix: typo, duplicate sql

* Merge pull request #62646 from Algunenano/i_like_triangles

Fix crash in largestTriangleThreeBuckets

* ClickHouse/ClickHouse#60469 (partial)

* ClickHouse/ClickHouse#68135 (partial)

* Merge pull request #73172 from ucasfl/fix-ubsan

Fix UBSAN in largestTriangleThreeBuckets

* fixes

---------

Co-authored-by: Sinan <[email protected]>
Co-authored-by: Alexey Milovidov <[email protected]>
Co-authored-by: FFish <[email protected]>
Co-authored-by: Raúl Marín <[email protected]>
Co-authored-by: Yarik Briukhovetskyi <[email protected]>
yl-lisen added a commit to timeplus-io/proton that referenced this pull request Dec 21, 2024
* Add aggregation function for Largest-Triangle-Three-Buckets (#53145)

* Added a simple lttb aggregate function

* Added support for multiple datatypes

* Added support for Date and Date32, updated LTTBData struct

* Updated code to handle bucket size 0 and 1

* Added sort for LTTBData

* Added tests and documentation

* Added some code style fixes

* Added function to new func ref file

* Removed function from new func ref file

* Apply suggestions from code review

* Updated unit tests

* updated LTTB data code

* Minor style fixes

* Updated code with std sort

* updated tests

* Renamed lttb to largestTriangleThreeBuckets

* Added alias lttb

---------

Co-authored-by: Alexey Milovidov <[email protected]>

* ClickHouse/ClickHouse#56350 (partial)

* fix: split lttb bucket strategy, first bucket and last bucket should only contain single point (#57003)

* fix: split lttb bucket policy, first bucket and last bucket should only
contain single point

* add comments and modify the corresponding query test

* style: update code format

* style: remove useless comments

* feat: add lttb bucket size test

* fix: typo, duplicate sql

* Merge pull request #62646 from Algunenano/i_like_triangles

Fix crash in largestTriangleThreeBuckets

* ClickHouse/ClickHouse#60469 (partial)

* ClickHouse/ClickHouse#68135 (partial)

* Merge pull request #73172 from ucasfl/fix-ubsan

Fix UBSAN in largestTriangleThreeBuckets

* fixes
yl-lisen added a commit to timeplus-io/proton that referenced this pull request Dec 21, 2024
* Add aggregation function for Largest-Triangle-Three-Buckets (#53145)

* Added a simple lttb aggregate function

* Added support for multiple datatypes

* Added support for Date and Date32, updated LTTBData struct

* Updated code to handle bucket size 0 and 1

* Added sort for LTTBData

* Added tests and documentation

* Added some code style fixes

* Added function to new func ref file

* Removed function from new func ref file

* Apply suggestions from code review

* Updated unit tests

* updated LTTB data code

* Minor style fixes

* Updated code with std sort

* updated tests

* Renamed lttb to largestTriangleThreeBuckets

* Added alias lttb

---------

Co-authored-by: Alexey Milovidov <[email protected]>

* ClickHouse/ClickHouse#56350 (partial)

* fix: split lttb bucket strategy, first bucket and last bucket should only contain single point (#57003)

* fix: split lttb bucket policy, first bucket and last bucket should only
contain single point

* add comments and modify the corresponding query test

* style: update code format

* style: remove useless comments

* feat: add lttb bucket size test

* fix: typo, duplicate sql

* Merge pull request #62646 from Algunenano/i_like_triangles

Fix crash in largestTriangleThreeBuckets

* ClickHouse/ClickHouse#60469 (partial)

* ClickHouse/ClickHouse#68135 (partial)

* Merge pull request #73172 from ucasfl/fix-ubsan

Fix UBSAN in largestTriangleThreeBuckets

* fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment