calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shurmin Evgeniy (Jira)" <j...@apache.org>
Subject [jira] [Created] (CALCITE-3277) calcite-avatica-go: panic: proto: can't skip unknown wire type 4
Date Wed, 21 Aug 2019 13:24:00 GMT
Shurmin Evgeniy created CALCITE-3277:
----------------------------------------

             Summary: calcite-avatica-go: panic: proto: can't skip unknown wire type 4
                 Key: CALCITE-3277
                 URL: https://issues.apache.org/jira/browse/CALCITE-3277
             Project: Calcite
          Issue Type: Bug
          Components: avatica-go
            Reporter: Shurmin Evgeniy
            Assignee: Francis Chuang


I can't perform simple query to druid using {{github.com/apache/calcite-avatica-go. }}

Code:

{{package main}}

{{import (}}
{{ "database/sql"}}
{{ "fmt"}}
{{ _ "github.com/apache/calcite-avatica-go/v4"}}
{{)}}

{{func main() {}}
{{ db, err := sql.Open("avatica", "http://********:8888/druid/v2/sql/avatica/")}}
{{ if err != nil \{ panic(err) }}}
{{ rows, err := db.Query(`SELECT * FROM sys.servers`)}}
{{ if err != nil \{ panic(err) }}}
{{ defer func() {}}
{{ if err := rows.Close(); err != nil \{ panic(err) }}}
{{ }()}}
{{ for rows.Next() {}}
{{ var server, host float64}}
{{ err = rows.Scan(&server, &host)}}
{{ if err != nil \{ panic(err) }}}
{{ fmt.Printf("server: %v, host: %v\n", server, host)}}
{{ }}}
{{}}}

Console:

{{panic: proto: can't skip unknown wire type 4}}
{{goroutine 1 [running]:main.main() main.go:17 +0x30d}}
{{Process finished with exit code 2}}

Golang:

{{go version go1.12.7 darwin/amd64}}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message