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

runtime filter: fix timezone error in runtime filter (#8273) #8275

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #8273

What problem does this PR solve?

This pr fix #8222.
The rs operator which is parsed by filter should change the timezone to UTF when the column type is timestamp.

The tiflash storage layer store the timestamp type value using UTF. So all of literal include runtime filter values should be changed to UTF timezone.

Issue Number: close #8222

Problem Summary:

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
tiup playground --tiflash 1
use test;
create table t1(k1 int , k2 timestamp);
create table t2(k1 int, k2 timestamp);
alter table t1 set tiflash replica 1;
alter table t2 set tiflash replica 1;
set tidb_isolation_read_engines = "tiflash";
insert into t1 values (1, "2023-10-20 00:00:00");
insert into t2 values (1, "2023-10-20 00:00:00");
set tidb_runtime_filter_mode="LOCAL";
explain select * from t1, t2 where t1.k2=t2.k2; -- with runtime filter
mysql> select * from t1, t2 where t1.k2=t2.k2;
+------+---------------------+------+---------------------+
| k1   | k2                  | k1   | k2                  |
+------+---------------------+------+---------------------+
|    1 | 2023-10-20 00:00:00 |    1 | 2023-10-20 00:00:00 |
+------+---------------------+------+---------------------+
1 row in set (0.02 sec)
  • 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

Fix version

v7.5

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. labels Oct 30, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Oct 30, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 30, 2023
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@ti-chi-bot ti-chi-bot bot removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 30, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 30, 2023
@Lloyd-Pottiger
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@JaySon-Huang JaySon-Huang 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 the lgtm label Oct 31, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger

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:
  • OWNERS [JaySon-Huang,Lloyd-Pottiger]

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

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 31, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 31, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-30 10:53:04.816443577 +0000 UTC m=+2863982.403553707: ☑️ agreed by JaySon-Huang.
  • 2023-10-30 10:54:22.433523197 +0000 UTC m=+2864060.020633341: ✖️🔁 reset by JaySon-Huang.
  • 2023-10-30 13:04:27.437756925 +0000 UTC m=+2871865.024867070: ☑️ agreed by Lloyd-Pottiger.
  • 2023-10-31 02:11:28.427779363 +0000 UTC m=+2919086.014889509: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot merged commit 4effafa into pingcap:release-7.5 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants