Skip to content

Commit

Permalink
rm extra retain
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Jun 3, 2023
1 parent 56ba3cf commit 579ffea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion csv/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func (cl *Client) Read(r io.Reader, table *schema.Table, _ string, res chan<- ar
return reader.Err()
}
rec := reader.Record()
rec.Retain()
castRec, err := castFromString(rec, arrowSchema)
if err != nil {
return fmt.Errorf("failed to cast extension types: %w", err)
Expand Down
9 changes: 2 additions & 7 deletions parquet/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ import (
"github.com/apache/arrow/go/v13/arrow"
"github.com/apache/arrow/go/v13/arrow/array"
"github.com/apache/arrow/go/v13/arrow/memory"
"github.com/apache/arrow/go/v13/parquet"
"github.com/apache/arrow/go/v13/parquet/file"
"github.com/apache/arrow/go/v13/parquet/pqarrow"
"github.com/cloudquery/plugin-sdk/v3/schema"
)

type ReaderAtSeeker interface {
io.Reader
io.ReaderAt
io.Seeker
}

func (*Client) Read(f ReaderAtSeeker, table *schema.Table, _ string, res chan<- arrow.Record) error {
func (*Client) Read(f parquet.ReaderAtSeeker, table *schema.Table, _ string, res chan<- arrow.Record) error {
ctx := context.Background()
rdr, err := file.NewParquetReader(f)
if err != nil {
Expand Down

0 comments on commit 579ffea

Please sign in to comment.