Skip to content

expression: support pushing down TRIM to TiKV #67520

@crazycs520

Description

@crazycs520

Enhancement

TRIM is currently not pushed down to TiKV, while related functions such as LTRIM and RTRIM can already be pushed down.

From the current code and history, TRIM appears to have been disabled as part of a broader rollback of high-risk string function pushdown due to correctness concerns. At the same time, TiKV already has the
related execution support for TRIM, so the current gap is mainly that TiDB does not allow it to be pushed down.

This issue is to track re-evaluating and restoring TRIM pushdown to TiKV.

Background

What we want

Support pushing down TRIM to TiKV, with correctness as the first priority.

Scope

This issue is only for TRIM pushdown support.

It does not aim to restore all previously disabled string function pushdown in one batch.

Notes

Before enabling it again, we should make sure pushdown and non-pushdown paths return the same results for representative TRIM cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions