Skip to content

Commit

Permalink
fix panic in func RowMap (#157)
Browse files Browse the repository at this point in the history
Co-authored-by: lihui7968 <[email protected]>
  • Loading branch information
banposeu and lihui7968 authored Aug 4, 2021
1 parent 5056eeb commit 26b23e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hive.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ func (c *Cursor) RowMap(ctx context.Context) map[string]interface{} {
}

d := c.Description()
if c.Err != nil || len(d) != len(c.queue) {
return nil
}
m := make(map[string]interface{}, len(c.queue))
for i := 0; i < len(c.queue); i++ {
columnName := d[i][0]
Expand Down

0 comments on commit 26b23e2

Please sign in to comment.