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

Add the CloseQuery function to close the query handle? #9

Open
shfhp opened this issue Dec 19, 2018 · 1 comment
Open

Add the CloseQuery function to close the query handle? #9

shfhp opened this issue Dec 19, 2018 · 1 comment

Comments

@shfhp
Copy link

shfhp commented Dec 19, 2018

connection.go

func (c *Connection) Query(query string) (RowSet, error) {
bquery := beeswax.Query{}

bquery.Query = query
bquery.Configuration = []string{}

handle, err := c.client.Query(&bquery)

if err != nil {
	return nil, err
}
**c.handle = handle**

return newRowSet(c.client, handle, c.options), nil

}

*func (c Connection) CloseQuery() error {
if c.handle != nil {
c.client.CloseInsert(c.handle)
c.handle = nil
}
return nil
}

@koblas
Copy link
Owner

koblas commented Dec 19, 2018

At the moment I do not have access to an Impala server to do any testing. In principle, this looks good, feel free to submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants