This is an automated email from the ASF dual-hosted git repository.
yuzelin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-python.git
The following commit(s) were added to refs/heads/main by this push:
new 7db5810 Fix unstable overwrite test (#19)
7db5810 is described below
commit 7db5810ec6a5556f65702359daf582d22e27f60d
Author: yuzelin <[email protected]>
AuthorDate: Thu Oct 10 11:42:22 2024 +0800
Fix unstable overwrite test (#19)
---
paimon_python_java/tests/test_write_and_read.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/paimon_python_java/tests/test_write_and_read.py
b/paimon_python_java/tests/test_write_and_read.py
index 4cf7548..e1ea72b 100644
--- a/paimon_python_java/tests/test_write_and_read.py
+++ b/paimon_python_java/tests/test_write_and_read.py
@@ -310,8 +310,8 @@ class TableWriteReadTest(unittest.TestCase):
table_commit = write_builder.new_commit()
df0 = pd.DataFrame({
- 'f0': [1, 1, 2, 2],
- 'f1': ['apple', 'banana', 'dog', 'cat'],
+ 'f0': [1, 2],
+ 'f1': ['apple', 'banana'],
})
table_write.write_pandas(df0)
@@ -342,10 +342,10 @@ class TableWriteReadTest(unittest.TestCase):
table_scan = read_builder.new_scan()
table_read = read_builder.new_read()
- actual_df1 = table_read.to_pandas(table_scan.plan().splits())
+ actual_df1 =
table_read.to_pandas(table_scan.plan().splits()).sort_values(by='f0')
expected_df1 = pd.DataFrame({
- 'f0': [2, 2, 1],
- 'f1': ['dog', 'cat', 'watermelon']
+ 'f0': [1, 2],
+ 'f1': ['watermelon', 'banana']
})
expected_df1['f0'] = expected_df1['f0'].astype('int32')
pd.testing.assert_frame_equal(