tidb icon indicating copy to clipboard operation
tidb copied to clipboard

expression: simplify the code with the ExtractColumnsFromExpressions (#62825)

Open ti-chi-bot opened this issue 4 weeks ago • 4 comments

This is an automated cherry-pick of #62825

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/63810

Problem Summary:

What changed and how does it work?

ExtractColumnsFromExpressions has been able to remove duplicates. In this PR, we enhence this function to make it reusing the memory and avoid allocating the slices.

Check List

Tests

  • [x] Unit test
  • [ ] 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

ti-chi-bot avatar Dec 01 '25 05:12 ti-chi-bot

@hawkingrei This PR has conflicts, I have hold it. Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

ti-chi-bot avatar Dec 01 '25 05:12 ti-chi-bot

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

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 ti-community-infra/tichi repository.

ti-chi-bot[bot] avatar Dec 01 '25 05:12 ti-chi-bot[bot]

Codecov Report

:x: Patch coverage is 91.66667% with 12 lines in your changes missing coverage. Please review. :warning: Please upload report for BASE (release-8.5@f5289a7). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #64781   +/-   ##
================================================
  Coverage               ?   76.6178%           
================================================
  Files                  ?       1672           
  Lines                  ?     463661           
  Branches               ?          0           
================================================
  Hits                   ?     355247           
  Misses                 ?      86765           
  Partials               ?      21649           
Flag Coverage Δ
integration 49.7080% <89.5833%> (?)

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

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 57.1951% <0.0000%> (?)
: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 Dec 12 '25 07:12 codecov[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hawkingrei Once this PR has been reviewed and has the lgtm label, please assign windtalker for approval. For more information see the Code Review Process. Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 Dec 12 '25 10:12 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-12-12 10:18:35.457001343 +0000 UTC m=+1209060.270778915: :ballot_box_with_check: agreed by hawkingrei.

ti-chi-bot[bot] avatar Dec 12 '25 10:12 ti-chi-bot[bot]

/test unit-test

EmmaDuDu avatar Dec 12 '25 13:12 EmmaDuDu

@EmmaDuDu: No presubmit jobs available for pingcap/[email protected]

In response to this:

/test unit-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 Dec 12 '25 13:12 tiprow[bot]

@ti-chi-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test 61a535f9365fc4e91f0003a0e814c337b8a10ec2 link true /test unit-test

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.

ti-chi-bot[bot] avatar Dec 12 '25 13:12 ti-chi-bot[bot]