Skip to content

Commit

Permalink
fix commit on test
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnro314 committed Nov 1, 2023
1 parent 7e22484 commit ab4ac82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_iceberg.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ def test_diff_two_same_branches(spark, lfs_client, lakefs_repo):

def test_delete_on_dev_and_merge(spark, lfs_client, lakefs_repo):
lfs_client.branches.create_branch(lakefs_repo, BranchCreation(name="test1", source="main"))
print("1")
spark.sql("SELECT * FROM lakefs.test1.company.workers").show()
spark.sql("DELETE FROM lakefs.test1.company.workers WHERE id = 6")
print("2")
spark.sql("SELECT * FROM lakefs.test1.company.workers").show()
lfs_client.commits.commit(lakefs_repo, "test1", CommitCreation(message="delete one row"))
lfs_client.refs.merge_into_branch(lakefs_repo, "test1", "main")
print("3")
spark.sql("SELECT * FROM lakefs.main.company.workers").show()
df_main = spark.read.table("lakefs.main.company.workers")
df_dev = spark.read.table("lakefs.test1.company.workers")
assert (df_main.schema == df_dev.schema) and (df_main.collect() == df_dev.collect()), "main and test1 tables should be equal"
Expand Down

0 comments on commit ab4ac82

Please sign in to comment.