Skip to content

Commit

Permalink
executor: remove bce in the AnalyzeColumnsExec (#49703)
Browse files Browse the repository at this point in the history
close #49704
  • Loading branch information
hawkingrei authored Dec 22, 2023
1 parent 7606e28 commit 8db81ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/executor/analyze_col.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@ func (e *AnalyzeColumnsExec) buildStats(ranges []*ranger.Range, needExtStats boo
topNs = append(topNs, collectors[i].TopN)
}
for j, s := range collectors[i].Samples {
collectors[i].Samples[j].Ordinal = j
collectors[i].Samples[j].Value, err = tablecodec.DecodeColumnValue(s.Value.GetBytes(), &col.FieldType, timeZone)
s.Ordinal = j
s.Value, err = tablecodec.DecodeColumnValue(s.Value.GetBytes(), &col.FieldType, timeZone)
if err != nil {
return nil, nil, nil, nil, nil, err
}
// When collation is enabled, we store the Key representation of the sampling data. So we set it to kind `Bytes` here
// to avoid to convert it to its Key representation once more.
if collectors[i].Samples[j].Value.Kind() == types.KindString {
collectors[i].Samples[j].Value.SetBytes(collectors[i].Samples[j].Value.GetBytes())
if s.Value.Kind() == types.KindString {
s.Value.SetBytes(s.Value.GetBytes())
}
}
var hg *statistics.Histogram
Expand Down

0 comments on commit 8db81ed

Please sign in to comment.