You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to the apache drill and currently I am using the latest factset drill client library for calling the preperedStatement functionality of the sql, where the sql function call to Prepare() and PrepareContext() both are hang up in drill client call https://github.com/factset/go-drill/blob/v1.2.0/client.go#L427 expecting the message on the queryHandleChannel of type queryHandle := make(chan *rpc.CompleteRpcMessage)
Can someone please explain why it is happening, If I have missed something, explain me how we can resolve this issue.
Sample code of the same issue :
`package main
import (
"context"
"database/sql"
"fmt"
"strings"
_ "github.com/factset/go-drill/driver"
)
func main() {
sqlDb := DrillConnect()
var contx = context.Background()
stmt1, err := sqlDb.PrepareContext(contx, "SELECT * FROM dfs./home/ghuchhar/Downloads/apache-drill-1.21.1/sample-data/region.parquet")
if err != nil {
fmt.Println(err.Error())
return
}
res, err := stmt1.Query()
if err != nil {
fmt.Println(err)
}
for res.Next() {
fmt.Println(res.Columns())
}
}
Hi Team,
I am new to the apache drill and currently I am using the latest factset drill client library for calling the preperedStatement functionality of the sql, where the sql function call to Prepare() and PrepareContext() both are hang up in drill client call https://github.com/factset/go-drill/blob/v1.2.0/client.go#L427 expecting the message on the queryHandleChannel of type queryHandle := make(chan *rpc.CompleteRpcMessage)
Can someone please explain why it is happening, If I have missed something, explain me how we can resolve this issue.
Sample code of the same issue :
`package main
import (
"context"
"database/sql"
"fmt"
"strings"
)
func main() {
sqlDb := DrillConnect()
var contx = context.Background()
stmt1, err := sqlDb.PrepareContext(contx, "SELECT * FROM dfs.
/home/ghuchhar/Downloads/apache-drill-1.21.1/sample-data/region.parquet
")if err != nil {
fmt.Println(err.Error())
return
}
res, err := stmt1.Query()
if err != nil {
fmt.Println(err)
}
for res.Next() {
fmt.Println(res.Columns())
}
}
func DrillConnect() *sql.DB {
props := []string{
"host=0.0.0.0",
"port=31010",
}
db, err := sql.Open("drill", strings.Join(props, ";"))
if err != nil {
fmt.Println(err)
return nil
}
if err := db.Ping(); err != nil {
fmt.Println(err)
return nil
}
return db
}`
Thanks in advance.
The text was updated successfully, but these errors were encountered: