Skip to content

Commit

Permalink
use correct namespace in cuio code examples (#9037)
Browse files Browse the repository at this point in the history
use correct namespace in cuio reader/writer code examples

Authors:
  - Christopher Harris (https://github.com/cwharris)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Karthikeyan (https://github.com/karthikeyann)
  - Devavret Makkar (https://github.com/devavret)

URL: #9037
  • Loading branch information
cwharris authored Aug 19, 2021
1 parent 94c659c commit 8b02ca3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 52 deletions.
9 changes: 3 additions & 6 deletions cpp/include/cudf/io/avro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,9 @@ class avro_reader_options_builder {
*
* The following code snippet demonstrates how to read a dataset from a file:
* @code
* ...
* std::string filepath = "dataset.avro";
* cudf::avro_reader_options options =
* cudf::avro_reader_options::builder(cudf::source_info(filepath));
* ...
* auto result = cudf::read_avro(options);
* auto source = cudf::io::source_info("dataset.avro");
* auto options = cudf::io::avro_reader_options::builder(source);
* auto result = cudf::io::read_avro(options);
* @endcode
*
* @param options Settings for controlling reading behavior.
Expand Down
18 changes: 8 additions & 10 deletions cpp/include/cudf/io/csv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,11 +1185,9 @@ class csv_reader_options_builder {
*
* The following code snippet demonstrates how to read a dataset from a file:
* @code
* std::string filepath = "dataset.csv";
* cudf::io::csv_reader_options options =
* cudf::io::csv_reader_options::builder(cudf::source_info(filepath));
* ...
* auto result = cudf::read_csv(options);
* auto source = cudf::io::source_info("dataset.csv");
* auto options = cudf::io::csv_reader_options::builder(source);
* auto result = cudf::io::read_csv(options);
* @endcode
*
* @param options Settings for controlling reading behavior.
Expand Down Expand Up @@ -1514,12 +1512,12 @@ class csv_writer_options_builder {
*
* The following code snippet demonstrates how to write columns to a file:
* @code
* std::string filepath = "dataset.csv";
* cudf::io::sink_info sink_info(filepath);
* auto destination = cudf::io::sink_info("dataset.csv");
* auto options = cudf::io::csv_writer_options(destination, table->view())
* .na_rep(na)
* .include_header(include_header)
* .rows_per_chunk(rows_per_chunk);
*
* cudf::io::csv_writer_options options = cudf::io::csv_writer_options(sink_info,
* table->view()).na_rep(na).include_header(include_header).rows_per_chunk(rows_per_chunk);
* ...
* cudf::io::write_csv(options);
* @endcode
*
Expand Down
8 changes: 3 additions & 5 deletions cpp/include/cudf/io/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,9 @@ class json_reader_options_builder {
*
* The following code snippet demonstrates how to read a dataset from a file:
* @code
* ...
* std::string filepath = "dataset.json";
* cudf::read_json_options options = cudf::read_json_options::builder(cudf::source_info(filepath));
* ...
* auto result = cudf::read_json(options);
* auto source = cudf::io::source_info("dataset.json");
* auto options = cudf::io::read_json_options::builder(source);
* auto result = cudf::io::read_json(options);
* @endcode
*
* @param options Settings for controlling reading behavior.
Expand Down
18 changes: 6 additions & 12 deletions cpp/include/cudf/io/orc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,9 @@ class orc_reader_options_builder {
*
* The following code snippet demonstrates how to read a dataset from a file:
* @code
* ...
* std::string filepath = "dataset.orc";
* cudf::orc_reader_options options =
* cudf::orc_reader_options::builder(cudf::source_info(filepath));
* ...
* auto result = cudf::read_orc(options);
* auto source = cudf::io::source_info("dataset.orc");
* auto options = cudf::io::orc_reader_options::builder(source);
* auto result = cudf::io::read_orc(options);
* @endcode
*
* Note: Support for reading files with struct columns is currently experimental, the output may not
Expand Down Expand Up @@ -568,12 +565,9 @@ class orc_writer_options_builder {
*
* The following code snippet demonstrates how to write columns to a file:
* @code
* ...
* std::string filepath = "dataset.orc";
* cudf::orc_writer_options options = cudf::orc_writer_options::builder(cudf::sink_info(filepath),
* table->view());
* ...
* cudf::write_orc(options);
* auto destination = cudf::io::sink_info("dataset.orc");
* auto options = cudf::io::orc_writer_options::builder(destination, table->view());
* cudf::io::write_orc(options);
* @endcode
*
* @param options Settings for controlling reading behavior.
Expand Down
29 changes: 10 additions & 19 deletions cpp/include/cudf/io/parquet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,9 @@ class parquet_reader_options_builder {
*
* The following code snippet demonstrates how to read a dataset from a file:
* @code
* ...
* std::string filepath = "dataset.parquet";
* cudf::io::parquet_reader_options options =
* cudf::io::parquet_reader_options::builder(cudf::source_info(filepath));
* ...
* auto result = cudf::read_parquet(options);
* auto source = cudf::io::source_info("dataset.parquet");
* auto options = cudf::io::parquet_reader_options::builder(source);
* auto result = cudf::io::read_parquet(options);
* @endcode
*
* @param options Settings for controlling reading behavior
Expand Down Expand Up @@ -784,12 +781,9 @@ class parquet_writer_options_builder {
*
* The following code snippet demonstrates how to write columns to a file:
* @code
* ...
* std::string filepath = "dataset.parquet";
* cudf::io::parquet_writer_options options =
* cudf::io::parquet_writer_options::builder(cudf::sink_info(filepath), table->view());
* ...
* cudf::write_parquet(options);
* auto destination = cudf::io::sink_info("dataset.parquet");
* auto options = cudf::io::parquet_writer_options::builder(destination, table->view());
* cudf::io::write_parquet(options);
* @endcode
*
* @param options Settings for controlling writing behavior.
Expand Down Expand Up @@ -1019,15 +1013,12 @@ std::unique_ptr<std::vector<uint8_t>> merge_rowgroup_metadata(
* one logical table by writing a series of individual cudf::tables.
*
* @code
* ...
* std::string filepath = "dataset.parquet";
* cudf::io::chunked_parquet_writer_options options =
* cudf::io::chunked_parquet_writer_options::builder(cudf::sink_info(filepath), table->view());
* ...
* cudf::io::parquet_chunked_writer writer(options)
* auto destination = cudf::io::sink_info("dataset.parquet");
* auto options = cudf::io::chunked_parquet_writer_options::builder(destination, table->view());
* auto writer = cudf::io::parquet_chunked_writer(options);
*
* writer.write(table0)
* writer.write(table1)
* ...
* writer.close()
* @endcode
*/
Expand Down

0 comments on commit 8b02ca3

Please sign in to comment.