Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3277

calcite-avatica-go: panic: proto: can't skip unknown wire type 4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Information Provided
    • None
    • avatica-go-5.0.0
    • avatica-go
    • None

    Description

      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

      Attachments

        Activity

          People

            francischuang Francis Chuang
            eshurmin Shurmin Evgeniy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: