Skip to content

Commit

Permalink
expression: Add failpoint to force pushdown expression to tikv for de…
Browse files Browse the repository at this point in the history
…bug usage (#59765)

ref #51876
  • Loading branch information
yibin87 authored Feb 26, 2025
1 parent 8010959 commit f689bd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/expression/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,10 @@ func jsonUnquoteFunctionBenefitsFromPushedDown(sf *ScalarFunction) bool {
// Projections are not pushed down to tikv by default, thus we need to check strictly here to avoid potential performance degradation.
// Note: virtual column is not considered here, since this function cares performance instead of functionality
func ProjectionBenefitsFromPushedDown(exprs []Expression, inputSchemaLen int) bool {
// In debug usage, we need to force push down projections to tikv to check tikv expression behavior.
failpoint.Inject("forcePushDownTiKV", func() {
failpoint.Return(true)
})
allColRef := true
colRefCount := 0
for _, expr := range exprs {
Expand Down

0 comments on commit f689bd6

Please sign in to comment.