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

Analyzer: Fix COLUMNS resolve #63962

Merged
merged 5 commits into from
May 22, 2024
Merged

Conversation

novikd
Copy link
Member

@novikd novikd commented May 16, 2024

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix resolve of unqualified COLUMNS matcher. Preserve the input columns order and forbid usage of unknown identifiers.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

Modify your CI run

NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step

Include tests (required builds will be added automatically):

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with Analyzer
  • All with Azure
  • Add your option here

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • Add your option here

Extra options:

  • do not test (only style check)
  • disable merge-commit (no merge from master before tests)
  • disable CI cache (job reuse)

Only specified batches in multi-batch jobs:

  • 1
  • 2
  • 3
  • 4

@novikd novikd added pr-must-backport Pull request should be backported intentionally. Use this label with great care! analyzer Issues and pull-requests related to new analyzer labels May 16, 2024
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-bugfix Pull request with bugfix, not backported by default label May 16, 2024
@robot-ch-test-poll1
Copy link
Contributor

robot-ch-test-poll1 commented May 16, 2024

This is an automated comment for commit d7ff8f6 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
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❌ failure
Mergeable CheckChecks if all other necessary checks are successful❌ 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
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
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ 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
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

@novikd novikd force-pushed the analyzer-columns-list-fix branch from 5214a75 to d5b6903 Compare May 16, 2024 17:54
last_day as ( select repo_name, count() as count_last_day, rowNumberInAllBlocks() + 1 as position_last_day from github_events where repo_name in (select repo_name from top_repos) and toDate(created_at) = today() - 1 group by repo_name order by count_last_day desc ),
last_week as ( select repo_name, count() as count_last_week, rowNumberInAllBlocks() + 1 as position_last_week from github_events where repo_name in (select repo_name from top_repos) and toMonday(created_at) = toMonday(today()) - interval 1 week group by repo_name order by count_last_week desc ),
last_month as ( select repo_name, count() as count_last_month, rowNumberInAllBlocks() + 1 as position_last_month from github_events where repo_name in (select repo_name from top_repos) and toStartOfMonth(created_at) = toStartOfMonth(today()) - interval 1 month group by repo_name order by count_last_month desc )
select d.repo_name, columns('count') from last_day d join last_week w on d.repo_name = w.repo_name join last_month m on d.repo_name = m.repo_name;
Copy link
Member Author

@novikd novikd May 17, 2024

Choose a reason for hiding this comment

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

This is the fix of the query. Before it was columns(count) and now it is columns('count'). Previously it expanded into 0 columns, but now it resolves into 3 columns.

@alexey-milovidov alexey-milovidov merged commit 5a4633a into master May 22, 2024
67 of 73 checks passed
@alexey-milovidov alexey-milovidov deleted the analyzer-columns-list-fix branch May 22, 2024 20:44
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 22, 2024
robot-clickhouse-ci-1 added a commit that referenced this pull request May 22, 2024
…0973bf5afa86bd14d706e6d121fc3

Cherry pick #63962 to 23.8: Analyzer: Fix COLUMNS resolve
robot-clickhouse-ci-1 added a commit that referenced this pull request May 22, 2024
…0973bf5afa86bd14d706e6d121fc3

Cherry pick #63962 to 24.2: Analyzer: Fix COLUMNS resolve
robot-clickhouse-ci-1 added a commit that referenced this pull request May 22, 2024
…0973bf5afa86bd14d706e6d121fc3

Cherry pick #63962 to 24.3: Analyzer: Fix COLUMNS resolve
robot-clickhouse-ci-1 added a commit that referenced this pull request May 22, 2024
…0973bf5afa86bd14d706e6d121fc3

Cherry pick #63962 to 24.4: Analyzer: Fix COLUMNS resolve
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label May 22, 2024
robot-ch-test-poll2 added a commit that referenced this pull request May 23, 2024
Backport #63962 to 24.3: Analyzer: Fix COLUMNS resolve
robot-ch-test-poll3 added a commit that referenced this pull request May 23, 2024
Backport #63962 to 24.4: Analyzer: Fix COLUMNS resolve
robot-clickhouse-ci-1 added a commit that referenced this pull request May 23, 2024
Backport #63962 to 24.2: Analyzer: Fix COLUMNS resolve
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-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! 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.

None yet

6 participants