Skip to content

Commit

Permalink
enrich the debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Dec 18, 2023
1 parent ce864de commit 34218f7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/expression/chunk_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ func evalOneVec(ctx sessionctx.Context, expr Expression, input *chunk.Chunk, out
} else {
enum, err := types.ParseEnumName(ft.GetElems(), result.GetString(i), ft.GetCollate())
if err != nil {
logutil.BgLogger().Debug("Wrong enum value parsed during evaluation", zap.Error(err))
logutil.BgLogger().Debug("Wrong enum name parsed during evaluation",
zap.String("The name to be parsed in the ENUM", result.GetString(i)),
zap.Strings("The valid names in the ENUM", ft.GetElems()),
zap.Error(err),
)
}
buf.AppendEnum(enum)
}
Expand All @@ -199,7 +203,11 @@ func evalOneVec(ctx sessionctx.Context, expr Expression, input *chunk.Chunk, out
} else {
set, err := types.ParseSetName(ft.GetElems(), result.GetString(i), ft.GetCollate())
if err != nil {
logutil.BgLogger().Debug("Wrong set value parsed during evaluation", zap.Error(err))
logutil.BgLogger().Debug("Wrong set name parsed during evaluation",
zap.String("The name to be parsed in the SET", result.GetString(i)),
zap.Strings("The valid names in the SET", ft.GetElems()),
zap.Error(err),
)
}
buf.AppendSet(set)
}
Expand Down

0 comments on commit 34218f7

Please sign in to comment.