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

chore(query): optimize window sort #16355

Merged
merged 14 commits into from
Sep 1, 2024
Merged

Conversation

sundy-li
Copy link
Member

@sundy-li sundy-li commented Aug 30, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

  1. reorder the window infos by length of sort items
  2. elimate extra window sort
  3. add CAST_INT_TO_UINT64 for ["slice", "get"] functions

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Aug 30, 2024
@sundy-li sundy-li requested a review from xudong963 August 30, 2024 08:21
@BohuTANG
Copy link
Member

Two parts block the CI:

One:

error: `Expecetd` should be `Expected`
  --> ./src/query/pipeline/transforms/src/processors/transforms/sort/rows/mod.rs:53:4[8](https://github.com/datafuselabs/databend/actions/runs/10640205468/job/29499540697?pr=16355#step:4:9)
   |
53 |                 "Order column type mismatched. Expecetd {} but got {}",
   |                                                ^^^^^^^^
   |
Error: Process completed with exit code 2.

Two:

Run cargo fmt --all -- --check
==> build-tool using image runner/build-tool:dev-nightly-2024-07-02
Diff in /workspace/src/query/sql/src/planner/binder/column_binding.rs:62:
 impl Eq for ColumnBinding {}
 impl PartialEq for ColumnBinding {
     fn eq(&self, other: &Self) -> bool {
-        (self.column_name == other.column_name || self.index != DUMMY_INDEX) && self.data_type == other.data_type && self.index == other.index
+        (self.column_name == other.column_name || self.index != DUMMY_INDEX)
+            && self.data_type == other.data_type
+            && self.index == other.index
     }
 }
 

@sundy-li sundy-li marked this pull request as draft August 31, 2024 11:53
@sundy-li sundy-li marked this pull request as ready for review September 1, 2024 10:51
@sundy-li sundy-li enabled auto-merge September 1, 2024 10:51
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 1, 2024
@sundy-li sundy-li added this pull request to the merge queue Sep 1, 2024
@dosubot dosubot bot added A-query Area: databend query pr-refactor this PR changes the code base without new features or bugfix labels Sep 1, 2024
@BohuTANG BohuTANG removed this pull request from the merge queue due to a manual request Sep 1, 2024
@BohuTANG BohuTANG merged commit ad366d5 into databendlabs:main Sep 1, 2024
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query Area: databend query pr-chore this PR only has small changes that no need to record, like coding styles. pr-refactor this PR changes the code base without new features or bugfix size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants