This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch try_fix_python
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/try_fix_python by this push:
new 6821695a try fixing win
6821695a is described below
commit 6821695af67b93136be189ab0dd734166dc3b53e
Author: HTHou <[email protected]>
AuthorDate: Sun Aug 4 23:41:39 2024 +0800
try fixing win
---
python/tsfile/tsfile_pywrapper.pyx | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/python/tsfile/tsfile_pywrapper.pyx
b/python/tsfile/tsfile_pywrapper.pyx
index a910a496..3a28f3f6 100644
--- a/python/tsfile/tsfile_pywrapper.pyx
+++ b/python/tsfile/tsfile_pywrapper.pyx
@@ -24,6 +24,7 @@ from cpython.bytes cimport PyBytes_AsString
cimport numpy as cnp
import numpy as np
from .tsfile cimport *
+import gc
TIMESTAMP_STR = "Time"
TS_TYPE_INT32 = 1 << 8
@@ -116,6 +117,8 @@ cdef class tsfile_reader:
if chunk is not None:
res = pd.concat([res, chunk])
not_null_maps.append(not_null_map)
+ del chunk
+ gc.collect()
else:
break
else:
@@ -126,6 +129,8 @@ cdef class tsfile_reader:
not_null_map_all = None
if (not_null_maps != []):
not_null_map_all = np.vstack(not_null_maps)
+ del not_null_maps
+ gc.collect()
return res, not_null_map_all
def __iter__(self):