From 4de88e87bb3ac449c5e41db786e398a623983bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E9=9B=AA=E6=97=A0=E6=83=85?= Date: Fri, 25 Sep 2020 18:12:25 +0800 Subject: [PATCH] os.SEEK_SET is deprecated,use io.SeekStart. (#10563) --- pkg/s3select/internal/parquet-go/reader_test.go | 2 +- .../internal/parquet-go/tools/parquet2csv/parquet2csv.go | 2 +- .../internal/parquet-go/tools/parquet2json/parquet2json.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/s3select/internal/parquet-go/reader_test.go b/pkg/s3select/internal/parquet-go/reader_test.go index 0409bf2d2..5f0221d92 100644 --- a/pkg/s3select/internal/parquet-go/reader_test.go +++ b/pkg/s3select/internal/parquet-go/reader_test.go @@ -39,7 +39,7 @@ func getReader(name string, offset int64, length int64) (io.ReadCloser, error) { offset = fi.Size() + offset } - if _, err = file.Seek(offset, os.SEEK_SET); err != nil { + if _, err = file.Seek(offset, io.SeekStart); err != nil { return nil, err } diff --git a/pkg/s3select/internal/parquet-go/tools/parquet2csv/parquet2csv.go b/pkg/s3select/internal/parquet-go/tools/parquet2csv/parquet2csv.go index dca67b425..771e2dec5 100644 --- a/pkg/s3select/internal/parquet-go/tools/parquet2csv/parquet2csv.go +++ b/pkg/s3select/internal/parquet-go/tools/parquet2csv/parquet2csv.go @@ -43,7 +43,7 @@ func getReader(name string, offset int64, length int64) (io.ReadCloser, error) { offset = fi.Size() + offset } - if _, err = file.Seek(offset, os.SEEK_SET); err != nil { + if _, err = file.Seek(offset, io.SeekStart); err != nil { return nil, err } diff --git a/pkg/s3select/internal/parquet-go/tools/parquet2json/parquet2json.go b/pkg/s3select/internal/parquet-go/tools/parquet2json/parquet2json.go index c495d8987..ef99614c6 100644 --- a/pkg/s3select/internal/parquet-go/tools/parquet2json/parquet2json.go +++ b/pkg/s3select/internal/parquet-go/tools/parquet2json/parquet2json.go @@ -43,7 +43,7 @@ func getReader(name string, offset int64, length int64) (io.ReadCloser, error) { offset = fi.Size() + offset } - if _, err = file.Seek(offset, os.SEEK_SET); err != nil { + if _, err = file.Seek(offset, io.SeekStart); err != nil { return nil, err }