Skip to content

Commit

Permalink
fixed unset error and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
floringavrila committed Jul 29, 2021
1 parent e7a6563 commit 223bc18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"log"

"github.com/beltran/gohive"
"github.com/eMAGTechLabs/gohive"
)

func main() {
Expand Down
9 changes: 7 additions & 2 deletions hive.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"time"

"github.com/apache/thrift/lib/go/thrift"
"github.com/beltran/gohive/hiveserver"
"github.com/beltran/gosasl"
"github.com/eMAGTechLabs/gohive/hiveserver"
"github.com/go-zookeeper/zk"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -533,9 +533,14 @@ func (c *Cursor) executeAsync(ctx context.Context, query string) {
return
}
if !success(responseExecute.GetStatus()) {
e := responseExecute.Status.ErrorCode
if e == nil {
var d int32
e = &d
}
c.Err = HiveError{
error: errors.New("Error while executing query: " + responseExecute.Status.String()),
ErrorCode: int(*responseExecute.Status.ErrorCode),
ErrorCode: int(*e),
}
return
}
Expand Down

0 comments on commit 223bc18

Please sign in to comment.