Skip to content

Commit

Permalink
fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Jan 11, 2019
1 parent 8a7bb77 commit 3a9aa6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions statistics/feedback.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func buildBucketFeedback(h *Histogram, feedback *QueryFeedback) (map[int]*Bucket
}
total := 0
sc := &stmtctx.StatementContext{TimeZone: time.UTC}
min, max := getMinValue(h.tp), getMaxValue(h.tp)
min, max := getMinValue(h.Tp), getMaxValue(h.Tp)
for _, fb := range feedback.feedback {
skip, err := fb.adjustFeedbackBoundaries(sc, &min, &max)
if err != nil {
Expand Down Expand Up @@ -1078,14 +1078,14 @@ func (q *QueryFeedback) dumpRangeFeedback(sc *stmtctx.StatementContext, h *Handl
ran.LowVal[0].SetBytes(lower)
ran.HighVal[0].SetBytes(upper)
} else {
if !supportColumnType(q.hist.tp) {
if !supportColumnType(q.hist.Tp) {
return nil
}
if ran.LowVal[0].Kind() == types.KindMinNotNull {
ran.LowVal[0] = getMinValue(q.hist.tp)
ran.LowVal[0] = getMinValue(q.hist.Tp)
}
if ran.HighVal[0].Kind() == types.KindMaxValue {
ran.HighVal[0] = getMaxValue(q.hist.tp)
ran.HighVal[0] = getMaxValue(q.hist.Tp)
}
}
ranges := q.hist.SplitRange(sc, []*ranger.Range{ran}, q.tp == indexType)
Expand Down
2 changes: 1 addition & 1 deletion statistics/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func (h *Handle) handleSingleHistogramUpdate(is infoschema.InfoSchema, rows []ch
}
q := &QueryFeedback{}
for _, row := range rows {
err1 := decodeFeedback(row.GetBytes(3), q, cms, mysql.HasUnsignedFlag(hist.tp.Flag))
err1 := decodeFeedback(row.GetBytes(3), q, cms, mysql.HasUnsignedFlag(hist.Tp.Flag))
if err1 != nil {
log.Debugf("decode feedback failed, err: %v", errors.ErrorStack(err))
}
Expand Down

0 comments on commit 3a9aa6c

Please sign in to comment.