tidb icon indicating copy to clipboard operation
tidb copied to clipboard

fix: close issue 59446 make oct("") same as mysql

Open yihong0618 opened this issue 6 months ago • 6 comments

What problem does this PR solve?

  • [ ] Unit test
  • [x] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No need to test
    • [ ] I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

yihong0618 avatar Jun 17 '25 04:06 yihong0618

Hi @yihong0618. 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.

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[bot] avatar Jun 17 '25 04:06 ti-chi-bot[bot]

Hi @yihong0618. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

tiprow[bot] avatar Jun 17 '25 04:06 tiprow[bot]

/ok-to-test

yihong0618 avatar Jun 17 '25 04:06 yihong0618

@yihong0618: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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[bot] avatar Jun 17 '25 04:06 ti-chi-bot[bot]

@yihong0618: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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.

tiprow[bot] avatar Jun 17 '25 04:06 tiprow[bot]

/ok-to-test

lance6716 avatar Jun 20 '25 01:06 lance6716

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.0014%. Comparing base (e8aa60d) to head (5cdb301). Report is 176 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61767        +/-   ##
================================================
- Coverage   73.0655%   73.0014%   -0.0642%     
================================================
  Files          1730       1756        +26     
  Lines        481483     511171     +29688     
================================================
+ Hits         351798     373162     +21364     
- Misses       108134     115965      +7831     
- Partials      21551      22044       +493     
Flag Coverage Δ
integration 42.3355% <100.0000%> (?)
unit 72.1757% <14.2857%> (-0.1307%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6673% <ø> (-0.1132%) :arrow_down:
parser ∅ <ø> (∅)
br 44.6952% <ø> (-1.9919%) :arrow_down:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 20 '25 02:06 codecov[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-06-20 05:08:29.407539656 +0000 UTC m=+421162.130718637: :ballot_box_with_check: agreed by lance6716.
  • 2025-06-23 08:51:33.495460717 +0000 UTC m=+693746.218639699: :ballot_box_with_check: agreed by YangKeao.

ti-chi-bot[bot] avatar Jun 23 '25 08:06 ti-chi-bot[bot]

/assign @zanmato1984

lance6716 avatar Jun 23 '25 09:06 lance6716

/retest

hawkingrei avatar Jul 01 '25 13:07 hawkingrei

Thank you @yihong0618 for contributing! This change looks good. However generally we want to update the vectorized version as well: https://github.com/pingcap/tidb/blob/6e13f827fcd924c8c791d327c7148b4377285d6e/pkg/expression/builtin_string_vec.go#L1760

Would you mind to do that as well?

of course but for now I am on vacation will fix it this weekend

yihong0618 avatar Jul 02 '25 00:07 yihong0618

ping @yihong0618

lance6716 avatar Jul 10 '25 07:07 lance6716

ping @yihong0618

pong, foud it used append('0') in vector here

so I thought it maybe right, but still try to full understand it

https://github.com/pingcap/tidb/blob/6e13f827fcd924c8c791d327c7148b4377285d6e/pkg/expression/builtin_string_vec.go#L1781

will fix it later

yihong0618 avatar Jul 10 '25 07:07 yihong0618

ping @yihong0618

pong and address

yihong0618 avatar Jul 11 '25 00:07 yihong0618

ping @zanmato1984

lance6716 avatar Jul 11 '25 01:07 lance6716

addressed comments

yihong0618 avatar Jul 15 '25 01:07 yihong0618

@yihong0618: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tidb_parser_test 5cdb30172ba0f547c48edbd428aa287814ffe0aa link true /test tidb_parser_test
fast_test_tiprow 5cdb30172ba0f547c48edbd428aa287814ffe0aa link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

tiprow[bot] avatar Jul 15 '25 01:07 tiprow[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, YangKeao, zanmato1984

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

ti-chi-bot[bot] avatar Jul 15 '25 02:07 ti-chi-bot[bot]

Thank you @yihong0618 for your contribution!

zanmato1984 avatar Jul 15 '25 02:07 zanmato1984