Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_nil_point #16

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type (
IGraphClient interface {
IClient
GetData() (Data, error)
Execute(stat string) (IGraphResponse, error)
Execute(stmt string) (IGraphResponse, error)
}

// IGraphResponse graph response, just support 3 functions to user.
Expand Down
3 changes: 3 additions & 0 deletions pkg/nebulagraph/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (gp *GraphPool) GetSession(username, password string) (common.IGraphClient,
// balancer, ccore just use the first endpoint
index := len(gp.clients) % len(gp.hosts)
client, err := gp.clientGetter(gp.hosts[index], username, password)

if gp.Version == "" {
gp.Version = string(client.Version())
}
Expand Down Expand Up @@ -267,6 +268,8 @@ func (gc *GraphClient) Execute(stmt string) (common.IGraphResponse, error) {
rows = 0
latency = 0
} else {
// no err, so the error code is ErrorCode_SUCCEEDED
codeErr, _ = nerrors.AsCodeError(nerrors.NewCodeError(nerrors.ErrorCode_SUCCEEDED, ""))
rs, _ = wrapper.GenResultSet(resp, gc.Client.Factory(), types.TimezoneInfo{})
rows = int32(rs.GetRowSize())
latency = resp.GetLatencyInUs()
Expand Down