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

Support range frame type #7629

Merged
merged 97 commits into from
Aug 22, 2023
Merged

Conversation

xzhangxian1008
Copy link
Contributor

@xzhangxian1008 xzhangxian1008 commented Jun 8, 2023

What problem does this PR solve?

Issue Number: ref #7376

Problem Summary:

What is changed and how it works?

Following steps are the precedure that how range frame type works:

  1. Compilation stage: as range frame needs the arithmetic calculation, we build a plus/minux auxiliary function at the compilation stage, and record the result column's index and get the column types of order by column and result columns for further use. How to build this function? tipb::Expr sent from tidb will answer this question.
  2. Runtime stage: main operation of this stage is the comparison between order by column and result column that produced by the plux/minux function. Comparison is easy, however, we have to handle different types. So, most of codes in this stage are to process the data type, they are unrelated to the main operation.

Core files changed for compilation stage:

  • DAGExpressionAnalyzer.cpp

Core files changed for runtime stage:

  • WindowBlockInputStream.cpp

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 8, 2023
@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker @SeaRise @yibin87

@xzhangxian1008
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 12, 2023
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 12, 2023
@xzhangxian1008
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 19, 2023
@xzhangxian1008
Copy link
Contributor Author

/cc @SeaRise @windtalker

@ti-chi-bot ti-chi-bot bot requested a review from SeaRise June 19, 2023 09:25
@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 17, 2023
@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

dbms/src/DataStreams/WindowBlockInputStream.h Outdated Show resolved Hide resolved
dbms/src/DataStreams/WindowBlockInputStream.h Outdated Show resolved Hide resolved
dbms/src/DataStreams/WindowBlockInputStream.cpp Outdated Show resolved Hide resolved
dbms/src/DataStreams/WindowBlockInputStream.cpp Outdated Show resolved Hide resolved
@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker

@ti-chi-bot ti-chi-bot bot requested a review from windtalker August 21, 2023 12:53
@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 22, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-04 02:45:12.808653885 +0000 UTC m=+412596.751002414: ☑️ agreed by SeaRise.
  • 2023-08-22 03:43:28.888217168 +0000 UTC m=+1207373.437233154: ☑️ agreed by windtalker.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, windtalker

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 22, 2023
@ti-chi-bot ti-chi-bot bot merged commit e7f5cb5 into pingcap:master Aug 22, 2023
@xzhangxian1008 xzhangxian1008 deleted the frame_range branch August 22, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants