Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.35.0
-
None
-
None
Description
I have zeros for float types in Go client result set with Calcite 1.35 update in Apache Druid. It worked with an older version. From what I see in the debugger TypedValue.NumberValue = 0 but DoubleValue = 1. Not sure where's the bug exactly - Druid/Avatica.
This is how it can be reproduced:
package main import ( "database/sql" "fmt" _ "github.com/apache/calcite-avatica-go/v5" ) func main() { jdbcUrl := "https://localhost/druid/v2/sql/avatica-protobuf" db, err := sql.Open("avatica", jdbcUrl) if err != nil { panic(err) } defer db.Close() sql4 := ` SELECT cast(1.0 as double) m3 ` rows, err := db.Query(sql4) if err != nil { panic(err) } defer rows.Close() var m1 float32 for rows.Next() { err := rows.Scan(&m1) if err != nil { panic(err) } fmt.Println(m1) } }
What I see in the debugger right now:
This is what I see in the Druid debugger: