@@ -49,7 +49,7 @@ func newRecordStreamHttpWriter(session *StreamUploadSession) RecordPackStreamWri
4949
5050func (rsw * RecordPackStreamWriter ) Append (record data.Record ) error {
5151 if rsw .flushing {
52- rsw .appendErr = errors .New ("There's an unsuccessful flush called, you should call flush to retry or call reset to drop the data" )
52+ rsw .appendErr = errors .New ("There's an unsuccessful flush called, you should call flush to retry or call Reset to drop the data" )
5353 return rsw .appendErr
5454 }
5555 if ! rsw .session .allowSchemaMismatch {
@@ -88,7 +88,7 @@ func checkIfRecordSchemaMatchSessionSchema(record *data.Record, schema []tablesc
8888// `recordCount` and `recordBytes` is the count and bytes count of the records uploaded
8989func (rsw * RecordPackStreamWriter ) Flush (timeout_ ... time.Duration ) (string , int64 , int64 , error ) {
9090 if rsw .appendErr != nil {
91- return "" , 0 , 0 , errors .New ("There's an unsuccessful append called before, you should call reset to drop the data and re-append the data." )
91+ return "" , 0 , 0 , errors .New ("There's an unsuccessful append called before, you should call Reset to drop the data and re-append the data." )
9292 }
9393
9494 timeout := time .Duration (0 )
@@ -117,7 +117,7 @@ func (rsw *RecordPackStreamWriter) Flush(timeout_ ...time.Duration) (string, int
117117
118118 recordCount := rsw .recordCount
119119 rsw .flushing = false
120- rsw .reset ()
120+ rsw .Reset ()
121121
122122 return reqId , recordCount , int64 (bytesSend ), nil
123123}
@@ -132,7 +132,7 @@ func (rsw *RecordPackStreamWriter) DataSize() int64 {
132132 return int64 (rsw .buffer .Len ())
133133}
134134
135- func (rsw * RecordPackStreamWriter ) reset () {
135+ func (rsw * RecordPackStreamWriter ) Reset () {
136136 rsw .buffer .Reset ()
137137 rsw .protocWriter = newRecordProtocWriter (& bufWriter {rsw .buffer }, rsw .session .schema .Columns , false )
138138 rsw .recordCount = 0
0 commit comments