Skip to content

Commit

Permalink
~ git confuse merge cause this commit
Browse files Browse the repository at this point in the history
  • Loading branch information
martianzhang committed Dec 24, 2018
1 parent 0f7485b commit bf0d01c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions database/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ func (db *Connector) startSampling(onlineConn *sql.DB, database, table string, w
values = append(values, fmt.Sprintf(`unhex("%s")`, fmt.Sprintf("%x", val)))
}
}
valuesStr = append(valuesStr, "("+strings.Join(values, `,`)+")")
valuesCount++
if maxValuesCount <= valuesCount {
err = db.doSampling(table, columnsStr, strings.Join(valuesStr, `,`))
if err != nil {
break
}
values = make([]string, 0)
valuesStr = make([]string, 0)
valuesCount = 0
}
valuesStr = append(valuesStr, "("+strings.Join(values, `,`)+")")
valuesCount++
if maxValuesCount <= valuesCount {
err = db.doSampling(table, columnsStr, strings.Join(valuesStr, `,`))
if err != nil {
break
}
values = make([]string, 0)
valuesStr = make([]string, 0)
valuesCount = 0
}
}
res.Close()
Expand Down

0 comments on commit bf0d01c

Please sign in to comment.