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 b0384e47 Try
b0384e47 is described below
commit b0384e47f16fba45826bdaced5207bba74322ae1
Author: HTHou <[email protected]>
AuthorDate: Sun Aug 11 23:38:04 2024 +0800
Try
---
python/setup.py | 10 +++++-----
python/tsfile/tsfile.pxd | 2 +-
python/tsfile/tsfile_pywrapper.pyx | 9 ---------
3 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/python/setup.py b/python/setup.py
index 8d049674..8d7ec4c0 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -27,19 +27,19 @@ import os
def copy_lib_files(source_dir, target_dir):
if platform.system() == "Linux":
- lib_file_name = f"libtsfile.so.1.0"
- link_name = os.path.join(target_dir, f"libtsfile.so")
+ lib_file_name = "libtsfile.so.1.0"
+ link_name = os.path.join(target_dir, "libtsfile.so")
if os.path.exists(link_name):
os.remove(link_name)
os.symlink(lib_file_name, link_name)
elif platform.system() == "Darwin":
- lib_file_name = f"libtsfile.1.0.dylib"
- link_name = os.path.join(target_dir, f"libtsfile.dylib")
+ lib_file_name = "libtsfile.1.0.dylib"
+ link_name = os.path.join(target_dir, "libtsfile.dylib")
if os.path.exists(link_name):
os.remove(link_name)
os.symlink(lib_file_name, link_name)
else:
- lib_file_name = f"libtsfile.dll"
+ lib_file_name = "libtsfile.dll"
source = os.path.join(source_dir, lib_file_name)
target = os.path.join(target_dir, lib_file_name)
diff --git a/python/tsfile/tsfile.pxd b/python/tsfile/tsfile.pxd
index 69d24377..59ca25c4 100644
--- a/python/tsfile/tsfile.pxd
+++ b/python/tsfile/tsfile.pxd
@@ -89,7 +89,7 @@ cdef extern from "./TsFile-cwrapper.h":
# writer tsfile data
ErrorCode tsfile_register_table(CTsFileWriter writer, TableSchema* schema)
ErrorCode tsfile_register_table_column(CTsFileWriter writer, const char*
table_name, ColumnSchema* schema)
- TsFileRowData create_tsfile_row(const char* table_name, timestamp
timestamp, int column_length)
+ TsFileRowData create_tsfile_row(const char* table_name, long long
timestamp, int column_length)
ErrorCode insert_data_into_tsfile_row_int32(TsFileRowData row_data, char*
column_name, int value)
ErrorCode insert_data_into_tsfile_row_int64(TsFileRowData row_data, char*
column_name, long long value)
ErrorCode insert_data_into_tsfile_row_float(TsFileRowData row_data, char*
column_name, float value)
diff --git a/python/tsfile/tsfile_pywrapper.pyx
b/python/tsfile/tsfile_pywrapper.pyx
index 0fb605a1..5f1f505f 100644
--- a/python/tsfile/tsfile_pywrapper.pyx
+++ b/python/tsfile/tsfile_pywrapper.pyx
@@ -112,30 +112,21 @@ cdef class tsfile_reader:
# open tsfile to read
res = pd.DataFrame()
not_null_maps = []
- print(1)
if self.read_all_at_once:
while True:
- print(2)
chunk, not_null_map = self.get_next_dataframe()
- print(3)
if chunk is not None:
- print(4)
res = pd.concat([res, chunk])
- print(5)
not_null_maps.append(not_null_map)
- print(6)
else:
break
else:
res, not_null_map = self.get_next_dataframe()
not_null_maps.append(not_null_map)
- print(6)
self.free_resources()
- print(7)
not_null_map_all = None
if not_null_maps:
- print(8)
not_null_map_all = np.vstack(not_null_maps)
return res, not_null_map_all