forked from jcrobak/parquet-python
-
-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from martindurant/append_merge
Append and merge
- Loading branch information
Showing
7 changed files
with
481 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from fastparquet.util import thrift_copy | ||
from fastparquet import parquet_thrift | ||
|
||
|
||
def test_thrift_copy(): | ||
fmd = parquet_thrift.FileMetaData() | ||
rg0 = parquet_thrift.RowGroup() | ||
rg0.num_rows = 5 | ||
rg1 = parquet_thrift.RowGroup() | ||
rg1.num_rows = 15 | ||
fmd.row_groups = [rg0, rg1] | ||
|
||
fmd2 = thrift_copy(fmd) | ||
|
||
assert fmd is not fmd2 | ||
assert fmd == fmd2 | ||
assert fmd2.row_groups[0] is not rg0 | ||
rg0.num_rows = 25 | ||
assert fmd2.row_groups[0].num_rows == 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.