Skip to content

Commit aeff4e5

Browse files
Remove unnecessary ignore attribute in doc. (#1504)
## Which issue does this PR close? - Closes #1503 . ## What changes are included in this PR? Fix doc and remove unnecessary `ignore` attribute in doc. ## Are these changes tested? CI.
1 parent 8919162 commit aeff4e5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

crates/iceberg/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
//!
2222
//! ## Scan A Table
2323
//!
24-
//! ```rust, ignore
24+
//! ```rust, no_run
2525
//! use futures::TryStreamExt;
2626
//! use iceberg::io::{FileIO, FileIOBuilder};
27-
//! use iceberg::MemoryCatalog;
28-
//! use iceberg::{Catalog, Result, TableIdent};
27+
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
2928
//!
3029
//! #[tokio::main]
3130
//! async fn main() -> Result<()> {

crates/iceberg/src/writer/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
//! own writer and implement writer trait for them so that the custom writer can integrate with existing writer. (See following example)
3939
//!
4040
//! # Simple example for the data file writer used parquet physical format:
41-
//! ```rust, ignore
42-
//! // This example uses `iceberg_catalog_memory`, which isn't enabled by default.
43-
//! // To run this, add `iceberg-catalog-memory` as a dependency in your Cargo.toml.
41+
//! ```rust, no_run
4442
//! use std::sync::Arc;
4543
//!
4644
//! use arrow_array::{ArrayRef, BooleanArray, Int32Array, RecordBatch, StringArray};
@@ -54,15 +52,16 @@
5452
//! DefaultFileNameGenerator, DefaultLocationGenerator,
5553
//! };
5654
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
57-
//! use iceberg::{Catalog, Result, TableIdent};
58-
//! use crate::MemoryCatalog;
55+
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
5956
//! use parquet::file::properties::WriterProperties;
6057
//! #[tokio::main]
6158
//! async fn main() -> Result<()> {
6259
//! // Build your file IO.
6360
//! let file_io = FileIOBuilder::new("memory").build()?;
6461
//! // Connect to a catalog.
6562
//! let catalog = MemoryCatalog::new(file_io, None);
63+
//! // Add customized code to create a table first.
64+
//!
6665
//! // Load table from catalog.
6766
//! let table = catalog
6867
//! .load_table(&TableIdent::from_strs(["hello", "world"])?)
@@ -97,9 +96,7 @@
9796
//! ```
9897
//!
9998
//! # Custom writer to record latency
100-
//! ```rust, ignore
101-
//! // This example uses `iceberg_catalog_memory`, which isn't enabled by default.
102-
//! // To run this, add `iceberg-catalog-memory` as a dependency in your Cargo.toml.
99+
//! ```rust, no_run
103100
//! use std::time::Instant;
104101
//!
105102
//! use arrow_array::RecordBatch;
@@ -111,8 +108,7 @@
111108
//! DefaultFileNameGenerator, DefaultLocationGenerator,
112109
//! };
113110
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
114-
//! use iceberg::{Catalog, Result, TableIdent};
115-
//! use crate::MemoryCatalog;
111+
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
116112
//! use parquet::file::properties::WriterProperties;
117113
//!
118114
//! #[derive(Clone)]
@@ -164,9 +160,13 @@
164160
//! #[tokio::main]
165161
//! async fn main() -> Result<()> {
166162
//! // Build your file IO.
163+
//! use iceberg::NamespaceIdent;
167164
//! let file_io = FileIOBuilder::new("memory").build()?;
168165
//! // Connect to a catalog.
169166
//! let catalog = MemoryCatalog::new(file_io, None);
167+
//!
168+
//! // Add customized code to create a table first.
169+
//!
170170
//! // Load table from catalog.
171171
//! let table = catalog
172172
//! .load_table(&TableIdent::from_strs(["hello", "world"])?)

0 commit comments

Comments
 (0)