Skip to content

Commit

Permalink
Revised index comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydrocharged committed Dec 8, 2020
1 parent 7b1257e commit f031785
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/libraries/doltcore/sqle/dolt_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ func (di *doltIndex) keysToTuple(keys []interface{}) (types.Tuple, error) {
}
var vals []types.Value
for i, col := range di.cols {
// As an example, if our TypeInfo is Int8, we should not fail to create a tuple if given the value 9001.
// Instead, the index will return no values. Comparisons should happen at the widest type, only storage
// should care that the value perfectly conforms to the target TypeInfo.
// As an example, if our TypeInfo is Int8, we should not fail to create a tuple if we are returning all keys
// that have a value of less than 9001, thus we promote the TypeInfo to the widest type.
val, err := col.TypeInfo.Promote().ConvertValueToNomsValue(keys[i])
if err != nil {
return types.EmptyTuple(nbf), err
Expand Down

0 comments on commit f031785

Please sign in to comment.