Skip to content

Conversation

@cryo-zd
Copy link

@cryo-zd cryo-zd commented Jan 4, 2026

What problem does this PR solve?

Issue Number: close #12479

What is changed and how it works?

Check List

Tests

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

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jan 4, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 4, 2026

Hi @cryo-zd. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 4, 2026

Welcome @cryo-zd!

It looks like this is your first PR to pingcap/tiflow 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/tiflow. 😃

@pingcap-cla-assistant
Copy link

pingcap-cla-assistant bot commented Jan 4, 2026

CLA assistant check
All committers have signed the CLA.

@gemini-code-assist
Copy link

Summary of Changes

Hello @cryo-zd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the reliability and accuracy of MySQL integration tests, specifically those related to date and time format functions. By updating expected test results and introducing a mechanism to ensure consistent result ordering, the changes aim to prevent test flakiness and provide a more robust testing suite for date and time operations.

Highlights

  • Test Result Updates: Updated the expected output for various GET_FORMAT function calls related to TIME, DATETIME, and TIMESTAMP types in the MySQL integration tests.
  • Result Ordering Consistency: Introduced the --sorted_result directive in a test case to ensure consistent ordering of results, particularly for queries involving the TIME datatype, which helps prevent flaky test failures due to varying output order.
  • MySQL Compatibility: Refined expected results for LEAST function calls and comparisons involving TIME values, improving the accuracy of MySQL compatibility tests.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 4, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the expected results for MySQL date format tests. The changes correctly update the output for get_format and a LEAST function call that depends on it. Additionally, it makes a test case on the TIME data type deterministic by sorting the results, and updates the expected output accordingly. My review includes a suggestion to improve test cleanup by dropping tables after they are used.

--sorted_result
SELECT b, b = '121314',
CASE b WHEN '121314' then 'found' ELSE 'not found' END FROM t8;
SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;

Choose a reason for hiding this comment

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

medium

To ensure proper test cleanup and avoid potential side effects in subsequent tests, it's good practice to drop the tables created for this test case. Consider adding DROP TABLE t6, t7, t8; after these queries.

SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;
DROP TABLE t6, t7, t8;

--sorted_result
SELECT b, b = '121314',
CASE b WHEN '121314' then 'found' ELSE 'not found' END FROM t8;
SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;
Copy link
Member

Choose a reason for hiding this comment

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

Should we also add a --sorted_result to this SQL? It seems that its result also changed.

Copy link
Author

Choose a reason for hiding this comment

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

Added, :)

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 4, 2026
@wk989898
Copy link
Collaborator

wk989898 commented Jan 4, 2026

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jan 4, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, wk989898

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [3AceShowHand,wk989898]

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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 4, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 4, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-04 09:04:33.66800722 +0000 UTC m=+520229.486315652: ☑️ agreed by wk989898.
  • 2026-01-04 09:51:40.2596206 +0000 UTC m=+523056.077929042: ☑️ agreed by 3AceShowHand.

@wk989898
Copy link
Collaborator

wk989898 commented Jan 4, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

6 similar comments
@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 5, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 6, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 6, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 6, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 6, 2026

/test pull-cdc-integration-kafka-test

5 similar comments
@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/test pull-cdc-integration-kafka-test

@YangKeao
Copy link
Member

YangKeao commented Jan 7, 2026

/test pull-cdc-integration-kafka-test

@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/test pull-cdc-integration-kafka-test

@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/test pull-cdc-integration-kafka-test

@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/test pull-cdc-integration-kafka-test

@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/retest

5 similar comments
@wk989898
Copy link
Collaborator

wk989898 commented Jan 7, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 8, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 8, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 8, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 8, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 8, 2026

/retest

9 similar comments
@wk989898
Copy link
Collaborator

wk989898 commented Jan 9, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 9, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 9, 2026

/retest

@wk989898
Copy link
Collaborator

wk989898 commented Jan 9, 2026

/retest

@wk989898
Copy link
Collaborator

/retest

@wk989898
Copy link
Collaborator

/retest

@wk989898
Copy link
Collaborator

/retest

@wk989898
Copy link
Collaborator

/retest

@wk989898
Copy link
Collaborator

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need to modify the test result of date_formats

4 participants