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

avatica-go process null

    XMLWordPrintableJSON

Details

    Description

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

      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)
        }
      }
      

      this will take an error :

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

      Why phoenix queryserver receive a boolean value?

      Attachments

        Issue Links

          Activity

            People

              francischuang Francis Chuang
              shining shining
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m