Skip to content

Commit

Permalink
Use Sneller ION library to decode "columns" meta-query result
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed May 11, 2023
1 parent 5838201 commit 4d3f8ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.19

require (
github.com/SnellerInc/sneller v0.0.0-20230505151417-5806cd3a42c7
github.com/amazon-ion/ion-go v1.2.0
github.com/grafana/grafana-plugin-sdk-go v0.159.0
github.com/patrickmn/go-cache v2.1.0+incompatible
go.opentelemetry.io/otel v1.14.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
github.com/SnellerInc/sneller v0.0.0-20230505151417-5806cd3a42c7 h1:3GAYAlEQoiW3q8x88cbi140EM1p3g8vBHxqWS75Oro8=
github.com/SnellerInc/sneller v0.0.0-20230505151417-5806cd3a42c7/go.mod h1:BaisUxgu4MI9tL6dwYPccGKsXkBP7+BnMz8fL/F/TNk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/amazon-ion/ion-go v1.2.0 h1:EgFy23/7gRxRYdUkJARh/7eZc8BYkFFDZZSqB3PwVqQ=
github.com/amazon-ion/ion-go v1.2.0/go.mod h1:3ZEje8i20TiIPVZlN+KE3B2ppZ1B8d9F/KaT7Dtec+k=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 h1:q4dksr6ICHXqG5hm0ZW5IHyeEJXoIJSOZeBLmWPNeIQ=
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs=
Expand Down
4 changes: 2 additions & 2 deletions pkg/plugin/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/amazon-ion/ion-go/ion"
"github.com/SnellerInc/sneller/ion"
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
"golang.org/x/exp/maps"
)
Expand Down Expand Up @@ -122,7 +122,7 @@ func (d *Datasource) getColumns(ctx context.Context, database, table string) ([]

payload := map[string]any{}

err = ion.UnmarshalFrom(ion.NewReader(resp.Body), &payload)
err = ion.NewDecoder(resp.Body, 1024*1024*10).Decode(&payload)
if err != nil {
return nil, 500, err
}
Expand Down

0 comments on commit 4d3f8ec

Please sign in to comment.