Skip to content

Add support for arrayUnion() function - #68989

Merged
vdimir merged 15 commits into
ClickHouse:masterfrom
petern48:add_arrayUnion_func
Sep 20, 2024
Merged

vdimir merged 15 commits into
ClickHouse:masterfrom
petern48:add_arrayUnion_func

Conversation

@petern48

@petern48 petern48 commented Aug 28, 2024 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • New Feature

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

Add support for arrayUnion function

Closes #61553

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@nikitamikhaylov nikitamikhaylov added the can be tested Allows running workflows for external contributors label Aug 28, 2024
@robot-clickhouse robot-clickhouse added the pr-feature Pull request with new product feature label Aug 28, 2024
@robot-clickhouse-ci-2

robot-clickhouse-ci-2 commented Aug 28, 2024 •

Copy link
Copy Markdown
Contributor

This is an automated comment for commit f945530 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
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ 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. Integration 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
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless 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

@vdimir vdimir self-assigned this Aug 28, 2024
@petern48
petern48 requested a review from vdimir August 30, 2024 07:05
@vdimir

vdimir commented Aug 30, 2024

Copy link
Copy Markdown
Member

AST fuzzer (asan) — Logical error: 'Sizes of nested column and null map of Nullable column are not equal'. Details
AST fuzzer (debug) — Assertion `(n >= (static_cast<ssize_t>(pad_left_) ? -1 : 0)) && (n <= static_cast<ssize_t>(this->size()))' failed Details
AST fuzzer (msan) — Logical error: 'Wrong column in Decimal comparison'. Details
AST fuzzer (tsan) — Received signal 11 Details
AST fuzzer (ubsan) — Received signal 11 Details

These failures looks related to the change. Could you please check fatal.log and look for queries in <Fatal> log entries, e.g.

2024.08.30 11:11:25.637176 [ 1414 ] {} <Fatal> BaseDaemon: (version 24.9.1.1553, build id: 491DCBCA4BD8C028D9BA4E3660E66F322C88E4E3, git hash: 09ac8a4889f4b89d03005a61cb3f56006faaf7fe) (from thread 174) (query_id: 0a75ec11-cef7-4e42-8577-1704d5238232) (query: SELECT arrayUnion([toNullable(materialize('-------'))]), arraySort(arrayUnion([1, 2])) FROM array_union__fuzz_0 ORDER BY arr ASC) Received signal Aborted (6)

@petern48

Copy link
Copy Markdown
Contributor Author

Is there a way for me to find what content was in the tables generated by the fuzzer? It said the below query failed. I couldn't reproduce the behavior with the array_union table in my test case, so the contents of the array_union__fuzz_3 table in the query must be different.

SELECT arraySort(arrayUnion(arr)) FROM array_union__fuzz_3 PREWHERE 11 ORDER BY arr DESC

@vdimir

vdimir commented Sep 2, 2024

Copy link
Copy Markdown
Member

Is there a way for me to find what content was in the tables generated by the fuzzer?

You may find table schema in CREATE statement in server logs, however, not the data, since it can be large amount and we do not persist it in test run. Usually, generating some corner-case value for specific type can help (e.g. NULL for nullable types, maximal values for int, etc)

@petern48
petern48 force-pushed the add_arrayUnion_func branch 4 times, most recently from 8d35cd6 to d74b61c Compare September 9, 2024 23:23
@petern48

Copy link
Copy Markdown
Contributor Author

@vdimir I can't seem to reproduce failing either of these test cases. Do you have any advice? Is it possible that these failures are unrelated to my changes? The failed stateful test (ProfileEvent_DiskS3ReadRequestsErr) relates to S3 reads (which seems unrelated) and the failed stateless test (02532_send_logs_level_test) passes fine for me locally.

@petern48

Copy link
Copy Markdown
Contributor Author

@vdimir All checks passed. Can you review

@vdimir
vdimir added this pull request to the merge queue Sep 20, 2024
Merged via the queue into ClickHouse:master with commit 8ba6acb Sep 20, 2024
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add arrayUnion function

6 participants