Skip to content

Commit

Permalink
fix: Don't panic on remove op (databricks#205)
Browse files Browse the repository at this point in the history
Closes databricks#204

Signed-off-by: candiduslynx <candiduslynx@gmail.com>
Signed-off-by: Esdras Beleza <esdras@esdrasbeleza.com>
  • Loading branch information
candiduslynx authored and esdrasbeleza committed Apr 15, 2024
1 parent b98af97 commit 8ec7a3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ func (c *conn) execStagingOperation(
return dbsqlerrint.NewDriverError(ctx, "error fetching staging operation results", err)
}
var stringValues []string = make([]string, 4)
for i := range stringValues {
if s, ok := sqlRow[i].(string); ok {
for i, val := range sqlRow { // this will either be 3 (remove op) or 4 (put/get) elements
if s, ok := val.(string); ok {
stringValues[i] = s
} else {
return dbsqlerrint.NewDriverError(ctx, "received unexpected response from the server.", nil)
Expand Down

0 comments on commit 8ec7a3b

Please sign in to comment.