Skip to content

Commit

Permalink
Fix unstable overwrite test (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzelin authored Oct 10, 2024
1 parent 9fee9b6 commit 7db5810
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions paimon_python_java/tests/test_write_and_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def test_overwrite(self):
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)
Expand Down Expand Up @@ -342,10 +342,10 @@ def test_overwrite(self):

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(
Expand Down

0 comments on commit 7db5810

Please sign in to comment.