ColinLeeo commented on code in PR #487:
URL: https://github.com/apache/tsfile/pull/487#discussion_r2079098836
##########
cpp/src/cwrapper/tsfile_cwrapper.cc:
##########
@@ -163,6 +163,18 @@ ERRNO tsfile_writer_close(TsFileWriter writer) {
return ret;
}
+ERRNO tsfile_writer_flush(TsFileWriter writer) {
Review Comment:
This function is not a api for C, remove.
##########
cpp/src/cwrapper/tsfile_cwrapper.cc:
##########
@@ -683,6 +695,16 @@ ERRNO _tsfile_writer_close(TsFileWriter writer) {
return ret;
}
+ERRNO _tsfile_writer_flush(TsFileWriter writer) {
+ auto *w = static_cast<storage::TsFileWriter *>(writer);
+ int ret = w->flush();
+ if (ret != common::E_OK) {
+ return ret;
+ }
Review Comment:
just return
##########
python/tsfile/tsfile_table_writer.py:
##########
@@ -60,6 +60,13 @@ def close(self):
"""
self.writer.close()
+ def flush(self):
+ """
+ Flush current data to tsfile.
+ :return: no return value.
+ """
+ self.writer.flush()
+
def __dealloc__(self):
Review Comment:
Add some tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]