Skip to content

Commit

Permalink
expression: avoid slicesgrow in the PushDownExprsWithExtraInfo
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Feb 17, 2025
1 parent d5cc7da commit 64223f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/expression/infer_pushdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ func (ctx PushDownContext) AppendWarning(err error) {

// PushDownExprsWithExtraInfo split the input exprs into pushed and remained, pushed include all the exprs that can be pushed down
func PushDownExprsWithExtraInfo(ctx PushDownContext, exprs []Expression, storeType kv.StoreType, canEnumPush bool) (pushed []Expression, remained []Expression) {
pushed = make([]Expression, 0, len(exprs))
remained = make([]Expression, 0, len(exprs))
for _, expr := range exprs {
if canExprPushDown(ctx, expr, storeType, canEnumPush) {
pushed = append(pushed, expr)
Expand Down

0 comments on commit 64223f8

Please sign in to comment.