|
|
@ -19,7 +19,9 @@ package s3select |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"bufio" |
|
|
|
"bufio" |
|
|
|
"bytes" |
|
|
|
"bytes" |
|
|
|
|
|
|
|
"compress/bzip2" |
|
|
|
"encoding/xml" |
|
|
|
"encoding/xml" |
|
|
|
|
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"io" |
|
|
|
"io" |
|
|
|
"io/ioutil" |
|
|
|
"io/ioutil" |
|
|
@ -302,9 +304,12 @@ func (s3Select *S3Select) Open(getReader func(offset, length int64) (io.ReadClos |
|
|
|
s3Select.recordReader, err = csv.NewReader(s3Select.progressReader, &s3Select.Input.CSVArgs) |
|
|
|
s3Select.recordReader, err = csv.NewReader(s3Select.progressReader, &s3Select.Input.CSVArgs) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
rc.Close() |
|
|
|
rc.Close() |
|
|
|
|
|
|
|
var stErr bzip2.StructuralError |
|
|
|
|
|
|
|
if errors.As(err, &stErr) { |
|
|
|
|
|
|
|
return errInvalidBZIP2CompressionFormat(err) |
|
|
|
|
|
|
|
} |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return nil |
|
|
|
return nil |
|
|
|
case jsonFormat: |
|
|
|
case jsonFormat: |
|
|
|
rc, err := getReader(0, -1) |
|
|
|
rc, err := getReader(0, -1) |
|
|
|