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

23.3 Fixed stateless test 02780_final_streams_data_skipping_index #312

Conversation

Enmk
Copy link
Member

@Enmk Enmk commented Sep 29, 2023

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Fixed tests, that started to fail since the pipeline layout changed.

If we'd revert all the changes done to src/Processors/QueryPlan/PartsSplitter.cpp in ClickHouse#50429 (backported via #307), then on 23.3.13 queries/0_stateless/02780_final_streams_data_skipping_index.stdout looks like this:

-- { echoOn }
EXPLAIN PIPELINE SELECT * FROM data FINAL WHERE v1 >= now() - INTERVAL 180 DAY
SETTINGS max_threads=2, max_final_threads=2, force_data_skipping_indices='v1_index', use_skip_indexes_if_final=1
FORMAT LineAsString;
(Expression)
ExpressionTransform × 2
  (Filter)
  FilterTransform × 2
    (ReadFromMergeTree)
    ExpressionTransform × 2
      AggregatingSortedTransform 63 → 1
        FilterSortedStreamByRange × 63
        Description: filter values in [(999424), +inf)
          ExpressionTransform × 63
            MergeTreeInOrder × 63 0 → 1
              AggregatingSortedTransform 62 → 1
                FilterSortedStreamByRange × 62
                Description: filter values in [-inf, (999424))
                  ExpressionTransform × 62
                    MergeTreeInOrder × 62 0 → 1
EXPLAIN PIPELINE SELECT * FROM data FINAL WHERE v1 >= now() - INTERVAL 180 DAY
SETTINGS max_threads=2, max_final_threads=2, force_data_skipping_indices='v1_index', use_skip_indexes_if_final=0
FORMAT LineAsString;
(Expression)
ExpressionTransform × 2
  (Filter)
  FilterTransform × 2
    (ReadFromMergeTree)
    ExpressionTransform × 2
      AggregatingSortedTransform 2 → 1
        FilterSortedStreamByRange × 2
        Description: filter values in [(999424), +inf)
          ExpressionTransform × 2
            MergeTreeInOrder × 2 0 → 1
              AggregatingSortedTransform
                FilterSortedStreamByRange
                Description: filter values in [-inf, (999424))
                  ExpressionTransform
                    MergeTreeInOrder 0 → 1

With code modifications from ClickHouse#50429, we see a significant reduction of threads (from 64 to 2) used in stages starting with AggregatingSortedTransform, and queries/0_stateless/02780_final_streams_data_skipping_index.stdout looks like this:

-- { echoOn }
EXPLAIN PIPELINE SELECT * FROM data FINAL WHERE v1 >= now() - INTERVAL 180 DAY
SETTINGS max_threads=2, max_final_threads=2, force_data_skipping_indices='v1_index', use_skip_indexes_if_final=1
FORMAT LineAsString;
(Expression)
ExpressionTransform × 2
  (Filter)
  FilterTransform × 2
    (ReadFromMergeTree)
    ExpressionTransform × 2
      AggregatingSortedTransform 2 → 1
        FilterSortedStreamByRange × 2
        Description: filter values in [(999424), +inf)
          ExpressionTransform × 2
            MergeTreeInOrder × 2 0 → 1
              AggregatingSortedTransform
                FilterSortedStreamByRange
                Description: filter values in [-inf, (999424))
                  ExpressionTransform
                    MergeTreeInOrder 0 → 1
EXPLAIN PIPELINE SELECT * FROM data FINAL WHERE v1 >= now() - INTERVAL 180 DAY
SETTINGS max_threads=2, max_final_threads=2, force_data_skipping_indices='v1_index', use_skip_indexes_if_final=0
FORMAT LineAsString;
(Expression)
ExpressionTransform × 2
  (Filter)
  FilterTransform × 2
    (ReadFromMergeTree)
    ExpressionTransform × 2
      AggregatingSortedTransform 2 → 1
        FilterSortedStreamByRange × 2
        Description: filter values in [(999424), +inf)
          ExpressionTransform × 2
            MergeTreeInOrder × 2 0 → 1
              AggregatingSortedTransform
                FilterSortedStreamByRange
                Description: filter values in [-inf, (999424))
                  ExpressionTransform
                    MergeTreeInOrder 0 → 1

diff is

--- queries/0_stateless/02780_final_streams_data_skipping_index.stdout on unmodified 23.3.13
+++ queries/0_stateless/02780_final_streams_data_skipping_index.stdout on 23.3.13 + #50429
@@ -8,16 +8,16 @@
   FilterTransform × 2
     (ReadFromMergeTree)
     ExpressionTransform × 2
-      AggregatingSortedTransform 63 → 1
-        FilterSortedStreamByRange × 63
+      AggregatingSortedTransform 2 → 1
+        FilterSortedStreamByRange × 2
         Description: filter values in [(999424), +inf)
-          ExpressionTransform × 63
-            MergeTreeInOrder × 63 0 → 1
-              AggregatingSortedTransform 62 → 1
-                FilterSortedStreamByRange × 62
+          ExpressionTransform × 2
+            MergeTreeInOrder × 2 0 → 1
+              AggregatingSortedTransform
+                FilterSortedStreamByRange
                 Description: filter values in [-inf, (999424))
-                  ExpressionTransform × 62
-                    MergeTreeInOrder × 62 0 → 1
+                  ExpressionTransform
+                    MergeTreeInOrder 0 → 1
 EXPLAIN PIPELINE SELECT * FROM data FINAL WHERE v1 >= now() - INTERVAL 180 DAY
 SETTINGS max_threads=2, max_final_threads=2, force_data_skipping_indices='v1_index', use_skip_indexes_if_final=0
 FORMAT LineAsString;

@altinity-robot
Copy link
Collaborator

altinity-robot commented Sep 29, 2023

This is an automated comment for commit 6dab14b with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🔴 failure

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🟢 success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help🔴 failure
Docker image for serversThe check to build and optionally push the mentioned image to docker hub🟢 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🔴 failure
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
Ready for releaseThere'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

@Enmk Enmk changed the title Fixed tests for queries/0_stateless/02780_final_streams_data_skipping… Fixed tests for stateless test 02780_final_streams_data_skipping_index Sep 29, 2023
@Enmk Enmk changed the title Fixed tests for stateless test 02780_final_streams_data_skipping_index Fixed stateless test 02780_final_streams_data_skipping_index Sep 29, 2023
@Enmk Enmk merged commit c123aef into customizations/23.3.13 Sep 29, 2023
@Enmk Enmk changed the title Fixed stateless test 02780_final_streams_data_skipping_index 23.3 Fixed stateless test 02780_final_streams_data_skipping_index Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants