-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
ZeroDivisionError
on 0-row Parquets with boolean cols, upgrade …
…to Python 3.11 (#50) * fix compression ratio when uncompressed_size == 0 * bump to python 3.11, update GHAs * GHA: cache poetry See also: actions/setup-python#765 * test_parquet util * add empty test0.parquet + `inspect` test * test name typo fix * loosen dep version pins
- Loading branch information
1 parent
2ba9539
commit e4faa21
Showing
13 changed files
with
1,054 additions
and
864 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Binary file not shown.
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,56 @@ | ||
|
||
############ file meta data ############ | ||
created_by: parquet-cpp-arrow version 14.0.2 | ||
num_columns: 4 | ||
num_rows: 0 | ||
num_row_groups: 1 | ||
format_version: 2.6 | ||
serialized_size: 2398 | ||
|
||
|
||
############ Columns ############ | ||
a | ||
b | ||
c | ||
d | ||
|
||
############ Column(a) ############ | ||
name: a | ||
path: a | ||
max_definition_level: 1 | ||
max_repetition_level: 0 | ||
physical_type: DOUBLE | ||
logical_type: None | ||
converted_type (legacy): NONE | ||
compression: SNAPPY (space_saved: -7%) | ||
|
||
############ Column(b) ############ | ||
name: b | ||
path: b | ||
max_definition_level: 1 | ||
max_repetition_level: 0 | ||
physical_type: INT32 | ||
logical_type: Null | ||
converted_type (legacy): NONE | ||
compression: SNAPPY (space_saved: -7%) | ||
|
||
############ Column(c) ############ | ||
name: c | ||
path: c | ||
max_definition_level: 1 | ||
max_repetition_level: 0 | ||
physical_type: INT64 | ||
logical_type: None | ||
converted_type (legacy): NONE | ||
compression: SNAPPY (space_saved: -7%) | ||
|
||
############ Column(d) ############ | ||
name: d | ||
path: d | ||
max_definition_level: 1 | ||
max_repetition_level: 0 | ||
physical_type: BOOLEAN | ||
logical_type: None | ||
converted_type (legacy): NONE | ||
compression: SNAPPY (space_saved: N/A) | ||
|
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
from os.path import dirname | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
|
||
def get_test_dataframe(): | ||
return pd.DataFrame( | ||
{'one': [-1, np.nan, 2.5], | ||
'two': ['foo', 'bar', 'baz'], | ||
'three': [True, False, True]} | ||
) | ||
|
||
|
||
def write_test_dataframes(): | ||
df = get_test_dataframe() | ||
tests_dir = dirname(__file__) | ||
df.to_parquet(f'{tests_dir}/test1.parquet') | ||
df.to_parquet(f'{tests_dir}/test2.parquet') | ||
df0 = pd.DataFrame({ 'a': [], 'b': [], 'c': [], 'd': [], }).astype({ 'a': float, 'b': str, 'c': int, 'd': bool }) | ||
df0.to_parquet(f'{tests_dir}/test0.parquet') | ||
|
||
|
||
if __name__ == '__main__': | ||
write_test_dataframes() |
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