Send progress only when requested by client in SelectObject (#6467)

This commit is contained in:
Harshavardhana
2018-09-16 23:22:46 -07:00
committed by Nitish Tiwari
parent 66fda7a37f
commit a0683d3c1f
4 changed files with 44 additions and 35 deletions
+4 -1
View File
@@ -69,7 +69,6 @@ type JSONType string
// Constants for JSONTypes.
const (
JSONDocumentType JSONType = "Document"
JSONStreamType = "Stream"
JSONLinesType = "Lines"
)
@@ -80,6 +79,7 @@ type ObjectSelectRequest struct {
ExpressionType QueryExpressionType
InputSerialization struct {
CompressionType SelectCompressionType
Parquet *struct{}
CSV *struct {
FileHeaderInfo CSVFileHeaderInfo
RecordDelimiter string
@@ -104,6 +104,9 @@ type ObjectSelectRequest struct {
RecordDelimiter string
}
}
RequestProgress struct {
Enabled bool
}
}
// ObjectIdentifier carries key name for the object to delete.
+1
View File
@@ -242,6 +242,7 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
OutputFieldDelimiter: selectReq.OutputSerialization.CSV.FieldDelimiter,
StreamSize: objInfo.Size,
HeaderOpt: selectReq.InputSerialization.CSV.FileHeaderInfo == CSVFileHeaderInfoUse,
Progress: selectReq.RequestProgress.Enabled,
}
s3s, err := s3select.NewInput(options)
if err != nil {