Skip to content

Analyzer: fixes for JOIN columns resolution#59007

Merged
vdimir merged 15 commits intomasterfrom
vdimir/using_alias_followup
Mar 26, 2024
Merged

Analyzer: fixes for JOIN columns resolution#59007
vdimir merged 15 commits intomasterfrom
vdimir/using_alias_followup

Conversation

@vdimir
Copy link
Copy Markdown
Member

@vdimir vdimir commented Jan 19, 2024

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

...

PR contains several fixes (they relates to each other, or found by fuzzer on added test, so it makes sense to merge at once):

@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 19, 2024
@robot-ch-test-poll4
Copy link
Copy Markdown
Contributor

robot-ch-test-poll4 commented Jan 19, 2024

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

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

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
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
Successful checks
Check nameDescriptionStatus
A SyncThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
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
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ 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 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. 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
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
PR CheckThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ 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 requested a review from novikd January 22, 2024 11:50
@novikd novikd self-assigned this Jan 22, 2024
Copy link
Copy Markdown
Member

@novikd novikd left a comment

Choose a reason for hiding this comment

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

LGTM

@vdimir vdimir force-pushed the vdimir/using_alias_followup branch 3 times, most recently from 1121b4e to 128e438 Compare January 25, 2024 09:53
@vdimir vdimir marked this pull request as draft January 25, 2024 10:35
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from ef0209e to 862a255 Compare January 26, 2024 10:59
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from 269f81c to 7233ff4 Compare January 26, 2024 16:17
@vdimir vdimir changed the title Analyzer: followup for JOIN USING alias columns Analyzer: fixes for JOIN USING columns Jan 29, 2024
@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Jan 31, 2024

AST fuzzer (asan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details
AST fuzzer (debug) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details
AST fuzzer (msan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details
AST fuzzer (tsan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details
AST fuzzer (ubsan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details

😵‍💫

@Algunenano
Copy link
Copy Markdown
Member

AST fuzzer (asan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details

This is a newly introduced assertion that verifies that a function returns the type it said it was going to return in getReturnTypeImpl. It might be a corner case I didn't consider or it might be detecting a real bug

@qoega qoega added the analyzer Issues and pull-requests related to new analyzer label Jan 31, 2024
@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Feb 1, 2024

AST fuzzer (asan) — Logical error: 'Unexpected return type from plus. Expected Int32. Got Nullable'. Details

Added tests trigger knwon issue in analyzer: we should calculate all ALIAS columns before JOIN

@vdimir vdimir force-pushed the vdimir/using_alias_followup branch 2 times, most recently from b085205 to 3c19d64 Compare March 20, 2024 17:25
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from 3c19d64 to bb364ac Compare March 20, 2024 17:31
@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Mar 20, 2024

Some of issues mentioned above in the first comment were fixed by refactoring ALIAS column computation by moving it right after reading stage. I rebased PR and kept code changes that still required to fix other things and kept tests.

@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from bb364ac to 42d59a8 Compare March 21, 2024 09:17
@vdimir vdimir changed the title Analyzer: fixes for JOIN USING columns Analyzer: fixes for JOIN columns resolution Mar 21, 2024
@vdimir vdimir marked this pull request as ready for review March 21, 2024 11:13
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch 2 times, most recently from 4791f23 to ab7a8d4 Compare March 23, 2024 10:23
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch 2 times, most recently from 4161bf8 to 4d16f11 Compare March 23, 2024 14:30
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from 4d16f11 to 44f1f62 Compare March 23, 2024 15:20
@vdimir vdimir force-pushed the vdimir/using_alias_followup branch from 3026772 to adbc9c6 Compare March 23, 2024 18:34
@vdimir vdimir merged commit 802d6a2 into master Mar 26, 2024
@vdimir vdimir deleted the vdimir/using_alias_followup branch March 26, 2024 09:36
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analyzer Issues and pull-requests related to new analyzer pr-not-for-changelog This PR should not be mentioned in the changelog 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.

Experimental analyzer and join_use_nulls are incompatible

6 participants