boostport / avatica Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED - Moved to github.com/apache/calcite-avatica-go
Home Page: https://github.com/apache/calcite-avatica-go
License: Apache License 2.0
DEPRECATED - Moved to github.com/apache/calcite-avatica-go
Home Page: https://github.com/apache/calcite-avatica-go
License: Apache License 2.0
rows, err := db.Query(upsert into us_population values('BA','San jose',3844829)
)
This code was failing due to nil pointer dereference. Stack trace given below.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1245246]
goroutine 1 [running]:
github.com/Boostport/avatica.newRows(0xc4200f81a0, 0x13, 0xc420100070, 0x1, 0x1, 0x1417d20)
/workspace/go/src/github.com/Boostport/avatica/rows.go:145 +0x186
github.com/Boostport/avatica.(*conn).query(0xc4200f81a0, 0x1664070, 0xc420010270, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x12418f0, 0x5, ...)
/workspace/go/src/github.com/Boostport/avatica/connection.go:181 +0x242
github.com/Boostport/avatica.(*conn).QueryContext(0xc4200f81a0, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x2a01060, 0x104f520, ...)
/workspace/go/src/github.com/Boostport/avatica/connection_go18.go:78 +0x1bd
database/sql.ctxDriverQuery(0x1418ae0, 0xc420010270, 0x2a01060, 0xc4200f81a0, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x1028bce, ...)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/ctxutil.go:48 +0x28d
database/sql.(*DB).queryConn.func1()
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1264 +0x99
database/sql.withLock(0x1415ea0, 0xc4201061c0, 0xc420057cf0)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:2545 +0x65
database/sql.(*DB).queryConn(0xc4200de640, 0x1418ae0, 0xc420010270, 0xc4201061c0, 0xc4200fa160, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1265 +0x671
database/sql.(*DB).query(0xc4200de640, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x10b3801, 0xc420057ed0, ...)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1250 +0x12f
database/sql.(*DB).QueryContext(0xc4200de640, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x8, 0x12e8348, ...)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1227 +0xb8
database/sql.(*DB).Query(0xc4200de640, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x0, 0x145ff50, 0x0)
/usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1241 +0x82
main.testLoad()```
Now LastInsertId
returns int64(0) and error with message that propose to get last sequence value but not ID of element that inserted at last transaction.
Many new important features will land in go1.8. Please see document:
https://docs.google.com/document/d/1F778e7ZSNiSmbju3jsEWzShcb8lIO4kDyfKDNm4PNd8/edit?usp=sharing for the full list.
Because these features are new we want drivers to implement them before they are released. Ideally they should be implemented by 2016-12-12 to allow for any driver provided feedback from implementation if necessary.
For some reason, the maintainer of the gokrb5.v1/*
packages has made breaking API changes again, just in the last 48 hours. I had thought that the change/move to the gopkg.in URL was a way of signalling API stability, but it appears that is not the case.
I would otherwise fix something like this myself, but do not at the moment have the time to dig through the kerberos package / API and figure out what changes in the avatica
package are required. Opening an issue here in the hopes this can get fixed sometime soon, as I'm moving forward with a new usql
release, and would ideally prefer to have it "go get"-able as well as using packaged dependencies.
when try to use db.Exec() to insert one row which value like [0 0 0 1], got an error "InvalidProtocolBufferException: Protocol message had invalid UTF-8.".
So how to store []byte?
like following java code:
DriverManager.getConnection("jdbc:phoenix:thin:url=http://192.168.1.1:8765;serialization=PROTOBUF", "user", "password");
Hi, just simple to fix error. Prevents building.
$ go get -u github.com/Boostport/avatica
# github.com/Boostport/avatica
./driver.go:55:28: multiple-value uuid.NewV4() in single-value context
uuid.NewV4() returns also error.
Got an error:
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/Boostport/avatica.(*stmt).exec(0xc4201e80f0, 0x8f2ee0, 0xc4200160a0, 0xc4201e81e0, 0x2, 0x2, 0x0, 0x0, 0x709460, 0x738800)
/home/yura/go/src/github.com/Boostport/avatica/statement.go:81 +0x2c3
github.com/Boostport/avatica.(*stmt).ExecContext(0xc4201e80f0, 0x8f2ee0, 0xc4200160a0, 0xc4201e8140, 0x2, 0x2, 0xc400000008, 0xc420399d00, 0x0, 0x4c8b06)
/home/yura/go/src/github.com/Boostport/avatica/statement_go18.go:19 +0x117
database/sql.ctxDriverStmtExec(0x8f2ee0, 0xc4200160a0, 0x8f3120, 0xc4201e80f0, 0xc4201e8140, 0x2, 0x2, 0x2, 0x2, 0x0, ...)
/snap/go/current/src/database/sql/ctxutil.go:66 +0x22e
database/sql.resultFromStatement(0x8f2ee0, 0xc4200160a0, 0x8f1960, 0xc420110120, 0xc420281b08, 0xc420281eb0, 0x2, 0x2, 0x0, 0x0, ...)
/snap/go/current/src/database/sql/sql.go:2109 +0x184
database/sql.(*DB).execDC(0xc42008a960, 0x8f2ee0, 0xc4200160a0, 0xc420134070, 0xc420281c60, 0x77b0de, 0xd5, 0xc420281eb0, 0x2, 0x2, ...)
/snap/go/current/src/database/sql/sql.go:1272 +0x2c7
database/sql.(*DB).exec(0xc42008a960, 0x8f2ee0, 0xc4200160a0, 0x77b0de, 0xd5, 0xc420281eb0, 0x2, 0x2, 0xc420016101, 0x6eb580, ...)
Looks like Results were empty in this row:
// Currently there is only 1 ResultSet per response
changed := int64(res.(*message.ExecuteResponse).Results[0].UpdateCount)
Sorry, I don't know how reliably reproduce it. I was copying large table to other table (using upsert into t2 select some from t1
), and it happens at night. Probably it is due to whole cluster instability (other clients died with "cluster is out of memory" probably at same time).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.