Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: Implement serialize/deserialize for datatypes #6

Merged
merged 15 commits into from
Jul 24, 2023
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ license = "Apache-2.0"
keywords = ["iceberg"]

[dependencies]
apache-avro = "0.15.0"
chrono = { version = "0.4.23", default-features = false, features = ["serde"] }
rust_decimal = "1.27.0"
serde = "^1.0"
serde_bytes = "0.11.8"
serde_json = "^1.0"
serde_derive = "^1.0"
thiserror = "1.0.44"
11 changes: 11 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use thiserror::Error;

#[derive(Error, Debug)]
pub enum IcebergError {
#[error("The type `{0}` cannot be stored as bytes.")]
ValueByteConversion(String),
#[error("Failed to convert slice to array")]
TryFromSlice(#[from] std::array::TryFromSliceError),
#[error("Failed to convert u8 to string")]
Utf8(#[from] std::str::Utf8Error),
}
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
// under the License.

//! Native Rust implementation of Apache Iceberg
pub mod error;
pub mod spec;
Loading