Skip to content

Commit c564157

Browse files
liraclexieli
and
xieli
authored
fix bug: panic when executing some time-consuming sql task, the resp.… (#28)
* bugfix: panic when executing some time-consuming sql task, the resp.Results that function(operation.go) return is nil * bugfix: fix blocking when caller context is emptyContext * panic bugfix, check resp.Results nil in length function Co-authored-by: xieli <[email protected]>
1 parent 4666eaa commit c564157

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hive/result_set.go

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ func value(col *cli_service.TColumn, cd *ColDesc, i int) (interface{}, error) {
107107
}
108108

109109
func length(rs *cli_service.TRowSet) int {
110+
if rs == nil {
111+
return 0
112+
}
110113
for _, col := range rs.Columns {
111114
if col.BoolVal != nil {
112115
return len(col.BoolVal.Values)

0 commit comments

Comments
 (0)