Skip to content

Commit

Permalink
Merge branch 'branch-21.10' into protect-scalar-ctors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwendt committed Jul 28, 2021
2 parents 8e99468 + 904222b commit ee30d95
Show file tree
Hide file tree
Showing 4 changed files with 29 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
8 changes: 8 additions & 0 deletions java/src/main/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,14 @@ target_compile_definitions(cudfjni

if(USE_GDS)
add_library(cufilejni SHARED "src/CuFileJni.cpp")
SET_TARGET_PROPERTIES(cufilejni
PROPERTIES BUILD_RPATH "\$ORIGIN"
# set target compile options
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CUDA_STANDARD 17
CUDA_STANDARD_REQUIRED ON
)
target_include_directories(cufilejni PRIVATE "${cuFile_INCLUDE_DIRS}")
target_link_libraries(cufilejni PRIVATE cudfjni "${cuFile_LIBRARIES}")
endif(USE_GDS)
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 ee30d95

Please sign in to comment.