Skip to content

Commit

Permalink
GH-16161 - add comparison to the test & dont write NA (#16195)
Browse files Browse the repository at this point in the history
  • Loading branch information
krasinski committed May 11, 2024
1 parent 5ffa80c commit a4b9436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,9 @@ public void map(Chunk[] cs) {
group = group.append(currColName, cs[j].at8(i));
break;
case (T_STR):
if (cs[j].isNA(i)) {
group = group.append(currColName, "");
} else {
if (!cs[j].isNA(i)) {
group = group.append(currColName, cs[j].atStr(new BufferedString(), i).toString());
}
}
break;
case (T_CAT):
if (cs[j].isNA(i)) {
Expand Down
2 changes: 2 additions & 0 deletions h2o-py/tests/testdir_misc/pyunit_export_parquet_npe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def test_export_file_npe_gh_16161():
with tempfile.TemporaryDirectory() as dir:
df = h2o.create_frame(rows=100, cols=10, string_fraction=0.1, seed=5, seed_for_column_types=25)
h2o.export_file(df, path=dir, format="parquet", write_checksum=False)
df2 = h2o.import_file(dir)
assert pyunit_utils.compare_frames(df, df2, tol_numeric=1e-10, numElements=0)


if __name__ == "__main__":
Expand Down

0 comments on commit a4b9436

Please sign in to comment.