You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "shining (JIRA)" <ji...@apache.org> on 2019/01/03 12:10:00 UTC

[jira] [Created] (CALCITE-2763) avatica-go process null

shining created CALCITE-2763:
--------------------------------

             Summary: avatica-go process null
                 Key: CALCITE-2763
                 URL: https://issues.apache.org/jira/browse/CALCITE-2763
             Project: Calcite
          Issue Type: Bug
          Components: avatica-go
    Affects Versions: avatica-go-3.2.0
            Reporter: shining
            Assignee: Francis Chuang
         Attachments: image-2019-01-03-19-17-56-961.png

I use avatica-go client write data through phoenix queryserver, Here is my code:

{code:java}
package main
import "database/sql"
import _ "github.com/apache/calcite-avatica-go/v3"

func main() {
  db, err := sql.Open("avatica", "http://localhost:8765")
  checkErr(err)
  stmt, err := db.Prepare("upsert into PHOENIX_TEST (id , TITLE , date , ts , time , f)values(?, ?, ?, ?, ?, ?)")
  if err != nil {
    checkErr(err)
  }
{color:red}  _, err = stmt.Exec(0, sql.NullString{}, 1546409889000, 1546409889000, 1546409889000,33 )
{color}  if err != nil {
    checkErr(err)
  }

  db.Close()
}

func checkErr(err error) {
  if err != nil {
        panic(err)
  }
}
{code}

this will take an error :

{noformat}
IllegalArgumentException: cannot convert false (class java.lang.Boolean) to PRIMITIVE_BOOLEAN 
{noformat}

Why phoenix queryserver receive a boolean value?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)