Skip to content

Commit 560a124

Browse files
authored
chore: expose default schema id (#1526)
## What changes are included in this PR? I'm using `SchemaBuilder` to construct `Schema`, I want to do assertion on schema id to make sure it's properly assigned. Essentially: ```sh // upstream let schema = SchemaBuilder::new().xxx().xxx().build(); // downstream assert_ne!(schema.schema_id(), DEFAULT_SCHEMA_ID); ``` ## Are these changes tested? No-op change, compilation is enough.
1 parent dfbab0d commit 560a124

File tree

1 file changed

+2
-1
lines changed
  • crates/iceberg/src/spec/schema

1 file changed

+2
-1
lines changed

crates/iceberg/src/spec/schema/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ use crate::{Error, ErrorKind, ensure_data_valid};
4949
pub type SchemaId = i32;
5050
/// Reference to [`Schema`].
5151
pub type SchemaRef = Arc<Schema>;
52-
pub(crate) const DEFAULT_SCHEMA_ID: SchemaId = 0;
52+
/// Default schema id.
53+
pub const DEFAULT_SCHEMA_ID: SchemaId = 0;
5354

5455
/// Defines schema in iceberg.
5556
#[derive(Debug, Serialize, Deserialize, Clone)]

0 commit comments

Comments
 (0)