Skip to content

Commit 9a0f743

Browse files
committed
Merge pull request JanKaul#223 from JanKaul/more-context-for-unimplemented
provide more context for unimplemented macro
2 parents 2e2cf62 + 5cfe002 commit 9a0f743

File tree

25 files changed

+73
-97
lines changed

25 files changed

+73
-97
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Free disk space
17+
uses: jlumbroso/free-disk-space@main
18+
with:
19+
tool-cache: false
20+
android: true
21+
dotnet: true
22+
haskell: true
23+
large-packages: false
24+
docker-images: false
25+
swap-storage: false
1626
- uses: actions/checkout@v3
1727
- name: Build
1828
run: cargo build --verbose

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ test-iceberg-rust:
77
cargo test -p iceberg-rust --lib
88

99
test-datafusion_iceberg:
10-
cargo test -p datafusion_iceberg --tests -j 2 && cargo clean -p datafusion_iceberg
10+
cargo test -p datafusion_iceberg --tests -j 2
1111

1212
test-rest-catalog:
13-
cargo test -p iceberg-rest-catalog --lib && cargo clean -p iceberg-rest-catalog
13+
cargo test -p iceberg-rest-catalog --lib
1414

1515
test-file-catalog:
16-
cargo test -p iceberg-file-catalog --lib && cargo clean -p iceberg-file-catalog
16+
cargo test -p iceberg-file-catalog --lib
1717

1818
test-sql-catalog:
19-
cargo test -p iceberg-sql-catalog --lib && cargo clean -p iceberg-sql-catalog
19+
cargo test -p iceberg-sql-catalog --lib
2020
clippy:
2121
cargo clippy --all-targets --all-features -- -D warnings
2222
fmt:

catalogs/iceberg-file-catalog/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ impl Catalog for FileCatalog {
506506
_identifier: Identifier,
507507
_metadata_location: &str,
508508
) -> Result<Table, IcebergError> {
509-
unimplemented!()
509+
unimplemented!("Register table for file catalog")
510510
}
511511
}
512512

datafusion_iceberg/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub enum Error {
5656
ParseInt(#[from] std::num::ParseIntError),
5757
/// parse int error
5858
#[error(transparent)]
59-
ConfigBuilder(#[from] crate::table::DataFusionTableConfigBuilderError),
59+
DeriveBuilder(#[from] derive_builder::UninitializedFieldError),
6060
}
6161

6262
impl From<Error> for DataFusionError {

datafusion_iceberg/src/table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ impl From<MaterializedView> for DataFusionTable {
107107
}
108108

109109
#[derive(Clone, Debug, Builder)]
110+
#[builder(build_fn(error = "Error"))]
110111
pub struct DataFusionTableConfig {
111112
/// With this option, an additional "__data_file_path" column is added to the output of the
112113
/// TableProvider that contains the path of the data-file the row originates from.

iceberg-rust-spec/src/error.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -55,30 +55,9 @@ pub enum Error {
5555
/// parse int error
5656
#[error(transparent)]
5757
ParseInt(#[from] std::num::ParseIntError),
58-
/// table metadata builder
58+
/// derive builder
5959
#[error(transparent)]
60-
TableMetadataBuilder(#[from] crate::spec::table_metadata::TableMetadataBuilderError),
61-
/// view metadata builder
62-
#[error(transparent)]
63-
ViewMetadataBuilder(#[from] crate::spec::view_metadata::GeneralViewMetadataBuilderError),
64-
/// version builder
65-
#[error(transparent)]
66-
VersionBuilder(#[from] crate::spec::view_metadata::VersionBuilderError),
67-
/// manifest builder
68-
#[error(transparent)]
69-
ManifestEntryBuilder(#[from] crate::spec::manifest::ManifestEntryBuilderError),
70-
/// datafile builder
71-
#[error(transparent)]
72-
DatafileBuilder(#[from] crate::spec::manifest::DataFileBuilderError),
73-
/// snapshot builder
74-
#[error(transparent)]
75-
SnapshotBuilder(#[from] crate::spec::snapshot::SnapshotBuilderError),
76-
/// structype builder
77-
#[error(transparent)]
78-
StructTypeBuilder(#[from] crate::spec::types::StructTypeBuilderError),
79-
/// partition spec builder
80-
#[error(transparent)]
81-
PartitionSpec(#[from] crate::spec::partition::PartitionSpecBuilderError),
60+
DeriveBuilder(#[from] derive_builder::UninitializedFieldError),
8261
}
8362

8463
impl From<apache_avro::Error> for Error {

iceberg-rust-spec/src/spec/manifest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use super::{
3434
/// Entry in manifest with the iceberg spec version 2.
3535
#[derive(Debug, Serialize, PartialEq, Clone, Getters, Builder)]
3636
#[serde(into = "ManifestEntryEnum")]
37-
#[builder(setter(prefix = "with"))]
37+
#[builder(build_fn(error = "Error"), setter(prefix = "with"))]
3838
pub struct ManifestEntry {
3939
/// Table format version
4040
format_version: FormatVersion,
@@ -516,7 +516,7 @@ impl From<HashMap<i32, Value>> for AvroMap<ByteBuf> {
516516
}
517517

518518
#[derive(Debug, PartialEq, Clone, Getters, Builder)]
519-
#[builder(setter(prefix = "with"))]
519+
#[builder(build_fn(error = "Error"), setter(prefix = "with"))]
520520
/// DataFile found in Manifest.
521521
pub struct DataFile {
522522
///Type of content in data file.

iceberg-rust-spec/src/spec/materialized_view_metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub type MaterializedViewMetadata = GeneralViewMetadata<FullIdentifier>;
2929
pub type MaterializedViewMetadataBuilder = GeneralViewMetadataBuilder<FullIdentifier>;
3030

3131
impl MaterializedViewMetadata {
32-
pub fn as_ref(&self) -> TabularMetadataRef {
32+
pub fn as_ref(&self) -> TabularMetadataRef<'_> {
3333
TabularMetadataRef::MaterializedView(self)
3434
}
3535
}

iceberg-rust-spec/src/spec/partition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl PartitionField {
169169

170170
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder, Getters)]
171171
#[serde(rename_all = "kebab-case")]
172-
#[builder(setter(prefix = "with"))]
172+
#[builder(build_fn(error = "Error"), setter(prefix = "with"))]
173173
/// Partition spec that defines how to produce a tuple of partition values from a record.
174174
pub struct PartitionSpec {
175175
/// Identifier for PartitionSpec

iceberg-rust-spec/src/spec/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use _serde::SnapshotEnum;
2929

3030
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Builder, Getters)]
3131
#[serde(from = "SnapshotEnum", into = "SnapshotEnum")]
32-
#[builder(setter(prefix = "with"))]
32+
#[builder(build_fn(error = "Error"), setter(prefix = "with"))]
3333
/// A snapshot represents the state of a table at some time and is used to access the complete set of data files in the table.
3434
pub struct Snapshot {
3535
/// A unique long ID

0 commit comments

Comments
 (0)