Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change io::detail::orc namespace into io::orc::detail #14696

Merged
merged 8 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions cpp/include/cudf/io/detail/orc.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,16 +28,14 @@

#include <rmm/cuda_stream_view.hpp>

namespace cudf {
namespace io {
namespace cudf::io {

// Forward declaration
class orc_reader_options;
class orc_writer_options;
class chunked_orc_writer_options;

namespace detail {
namespace orc {
namespace orc::detail {

/**
* @brief Class to read ORC dataset data into columns.
Expand Down Expand Up @@ -94,7 +92,7 @@ class writer {
*/
explicit writer(std::unique_ptr<cudf::io::data_sink> sink,
orc_writer_options const& options,
single_write_mode mode,
cudf::io::detail::single_write_mode mode,
rmm::cuda_stream_view stream);

/**
Expand All @@ -107,7 +105,7 @@ class writer {
*/
explicit writer(std::unique_ptr<cudf::io::data_sink> sink,
chunked_orc_writer_options const& options,
single_write_mode mode,
cudf::io::detail::single_write_mode mode,
rmm::cuda_stream_view stream);

/**
Expand All @@ -127,7 +125,5 @@ class writer {
*/
void close();
};
} // namespace orc
} // namespace detail
} // namespace io
} // namespace cudf
} // namespace orc::detail
} // namespace cudf::io
4 changes: 2 additions & 2 deletions cpp/include/cudf/io/orc.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1304,7 +1304,7 @@ class orc_chunked_writer {
void close();

/// Unique pointer to impl writer class
std::unique_ptr<cudf::io::detail::orc::writer> writer;
std::unique_ptr<cudf::io::orc::detail::writer> writer;
ttnghia marked this conversation as resolved.
Show resolved Hide resolved
};

/** @} */ // end of group
Expand Down
10 changes: 5 additions & 5 deletions cpp/src/io/functions.cpp
ttnghia marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -270,7 +270,7 @@ void write_csv(csv_writer_options const& options,
mr);
}

namespace detail_orc = cudf::io::detail::orc;
namespace orc_detail = cudf::io::orc::detail;
ttnghia marked this conversation as resolved.
Show resolved Hide resolved

raw_orc_statistics read_raw_orc_statistics(source_info const& src_info)
{
Expand Down Expand Up @@ -418,7 +418,7 @@ table_with_metadata read_orc(orc_reader_options const& options, rmm::mr::device_
CUDF_FUNC_RANGE();

auto datasources = make_datasources(options.get_source());
auto reader = std::make_unique<detail_orc::reader>(
auto reader = std::make_unique<orc_detail::reader>(
std::move(datasources), options, cudf::get_default_stream(), mr);

return reader->read(options);
Expand All @@ -436,7 +436,7 @@ void write_orc(orc_writer_options const& options)
auto sinks = make_datasinks(options.get_sink());
CUDF_EXPECTS(sinks.size() == 1, "Multiple sinks not supported for ORC writing");

auto writer = std::make_unique<detail_orc::writer>(
auto writer = std::make_unique<orc_detail::writer>(
std::move(sinks[0]), options, io_detail::single_write_mode::YES, cudf::get_default_stream());

writer->write(options.get_table());
Expand All @@ -452,7 +452,7 @@ orc_chunked_writer::orc_chunked_writer(chunked_orc_writer_options const& options
auto sinks = make_datasinks(options.get_sink());
CUDF_EXPECTS(sinks.size() == 1, "Multiple sinks not supported for ORC writing");

writer = std::make_unique<detail_orc::writer>(
writer = std::make_unique<orc_detail::writer>(
std::move(sinks[0]), options, io_detail::single_write_mode::NO, cudf::get_default_stream());
}

Expand Down
7 changes: 4 additions & 3 deletions cpp/src/io/orc/reader_impl.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,7 +52,8 @@
#include <algorithm>
#include <iterator>

namespace cudf::io::detail::orc {
namespace cudf::io::orc::detail {
using namespace cudf::io::detail;
using namespace cudf::io::orc;

namespace {
Expand Down Expand Up @@ -1363,4 +1364,4 @@ table_with_metadata reader::read(orc_reader_options const& options)
return _impl->read(options.get_skip_rows(), options.get_num_rows(), options.get_stripes());
}

} // namespace cudf::io::detail::orc
} // namespace cudf::io::orc::detail
6 changes: 3 additions & 3 deletions cpp/src/io/orc/reader_impl.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@
#include <utility>
#include <vector>

namespace cudf::io::detail::orc {
namespace cudf::io::orc::detail {
using namespace cudf::io::orc;
ttnghia marked this conversation as resolved.
Show resolved Hide resolved

namespace {
Expand Down Expand Up @@ -86,4 +86,4 @@ class reader::impl {
std::unique_ptr<reader_column_meta> const _col_meta; // Track of orc mapping and child details
};

} // namespace cudf::io::detail::orc
} // namespace cudf::io::orc::detail
12 changes: 3 additions & 9 deletions cpp/src/io/orc/writer_impl.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -68,10 +68,7 @@
#include <tuple>
#include <utility>

namespace cudf {
namespace io {
namespace detail {
namespace orc {
namespace cudf::io::orc::detail {
using namespace cudf::io::orc;
using namespace cudf::io;

Expand Down Expand Up @@ -2741,7 +2738,4 @@ void writer::write(table_view const& table) { _impl->write(table); }
// Forward to implementation
void writer::close() { _impl->close(); }

} // namespace orc
} // namespace detail
} // namespace io
} // namespace cudf
} // namespace cudf::io::orc::detail
15 changes: 5 additions & 10 deletions cpp/src/io/orc/writer_impl.hpp
ttnghia marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,15 +39,13 @@
#include <string>
#include <vector>

namespace cudf {
namespace io {
namespace detail {
namespace orc {
namespace cudf::io::orc::detail {
// Forward internal classes
class orc_column_view;

using namespace cudf::io::orc;
using namespace cudf::io;
using namespace cudf::io::detail;
using namespace cudf::io::orc;
using cudf::detail::device_2dspan;
using cudf::detail::host_2dspan;
using cudf::detail::hostdevice_2dvector;
Expand Down Expand Up @@ -364,7 +362,4 @@ class writer::impl {
bool _closed = false; // To track if the output has been written to sink.
};

} // namespace orc
} // namespace detail
} // namespace io
} // namespace cudf
} // namespace cudf::io::orc::detail
Loading