Skip to content

Commit

Permalink
Merge pull request #8879 from rapidsai/branch-21.08
Browse files Browse the repository at this point in the history
[gpuCI] Forward-merge branch-21.08 to branch-21.10 [skip ci]
  • Loading branch information
GPUtester authored Jul 28, 2021
2 parents 279f9a4 + 452743f commit 5d7c172
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/io/orc/writer_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ orc_streams writer::impl::create_streams(host_span<orc_column_view> columns,
break;
}
case TypeKind::TIMESTAMP:
add_RLE_stream(gpu::CI_DATA, DATA, TypeKind::INT);
add_RLE_stream(gpu::CI_DATA2, SECONDARY, TypeKind::INT);
add_RLE_stream(gpu::CI_DATA, DATA, TypeKind::LONG);
add_RLE_stream(gpu::CI_DATA2, SECONDARY, TypeKind::LONG);
column.set_orc_encoding(DIRECT_V2);
break;
case TypeKind::DECIMAL:
Expand Down
Binary file not shown.
19 changes: 19 additions & 0 deletions python/cudf/cudf/tests/test_orc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,22 @@ def test_chunked_orc_writer_lists():

got = pa.orc.ORCFile(buffer).read().to_pandas()
assert_eq(expect, got)


def test_writer_timestamp_stream_size(datadir, tmpdir):
pdf_fname = datadir / "TestOrcFile.largeTimestamps.orc"
gdf_fname = tmpdir.join("gdf.orc")

try:
orcfile = pa.orc.ORCFile(pdf_fname)
except Exception as excpr:
if type(excpr).__name__ == "ArrowIOError":
pytest.skip(".orc file is not found")
else:
print(type(excpr).__name__)

expect = orcfile.read().to_pandas()
cudf.from_pandas(expect).to_orc(gdf_fname.strpath)
got = pa.orc.ORCFile(gdf_fname).read().to_pandas()

assert_eq(expect, got)

0 comments on commit 5d7c172

Please sign in to comment.