Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 2 additions & 3 deletions crates/iceberg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
//!
//! ## Scan A Table
//!
//! ```rust, ignore
//! ```rust, no_run
//! use futures::TryStreamExt;
//! use iceberg::io::{FileIO, FileIOBuilder};
//! use iceberg::MemoryCatalog;
//! use iceberg::{Catalog, Result, TableIdent};
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
Expand Down
20 changes: 10 additions & 10 deletions crates/iceberg/src/writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
//! own writer and implement writer trait for them so that the custom writer can integrate with existing writer. (See following example)
//!
//! # Simple example for the data file writer used parquet physical format:
//! ```rust, ignore
//! // This example uses `iceberg_catalog_memory`, which isn't enabled by default.
//! // To run this, add `iceberg-catalog-memory` as a dependency in your Cargo.toml.
//! ```rust, no_run
//! use std::sync::Arc;
//!
//! use arrow_array::{ArrayRef, BooleanArray, Int32Array, RecordBatch, StringArray};
Expand All @@ -54,15 +52,16 @@
//! DefaultFileNameGenerator, DefaultLocationGenerator,
//! };
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
//! use iceberg::{Catalog, Result, TableIdent};
//! use crate::MemoryCatalog;
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
//! use parquet::file::properties::WriterProperties;
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! // Build your file IO.
//! let file_io = FileIOBuilder::new("memory").build()?;
//! // Connect to a catalog.
//! let catalog = MemoryCatalog::new(file_io, None);
//! // Add customized code to create a table first.
//!
//! // Load table from catalog.
//! let table = catalog
//! .load_table(&TableIdent::from_strs(["hello", "world"])?)
Expand Down Expand Up @@ -97,9 +96,7 @@
//! ```
//!
//! # Custom writer to record latency
//! ```rust, ignore
//! // This example uses `iceberg_catalog_memory`, which isn't enabled by default.
//! // To run this, add `iceberg-catalog-memory` as a dependency in your Cargo.toml.
//! ```rust, no_run
//! use std::time::Instant;
//!
//! use arrow_array::RecordBatch;
Expand All @@ -111,8 +108,7 @@
//! DefaultFileNameGenerator, DefaultLocationGenerator,
//! };
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
//! use iceberg::{Catalog, Result, TableIdent};
//! use crate::MemoryCatalog;
//! use iceberg::{Catalog, MemoryCatalog, Result, TableIdent};
//! use parquet::file::properties::WriterProperties;
//!
//! #[derive(Clone)]
Expand Down Expand Up @@ -164,9 +160,13 @@
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! // Build your file IO.
//! use iceberg::NamespaceIdent;
//! let file_io = FileIOBuilder::new("memory").build()?;
//! // Connect to a catalog.
//! let catalog = MemoryCatalog::new(file_io, None);
//!
//! // Add customized code to create a table first.
//!
//! // Load table from catalog.
//! let table = catalog
//! .load_table(&TableIdent::from_strs(["hello", "world"])?)
Expand Down
Loading