mbutrovich commented on code in PR #3363:
URL: https://github.com/apache/iceberg-rust/pull/3363#discussion_r4201433102
##########
crates/iceberg/src/transaction/snapshot.rs:
##########
@@ -34,6 +34,25 @@ use crate::table::Table;
use crate::transaction::ActionCommit;
use crate::{Error, ErrorKind, TableRequirement, TableUpdate};
+const ENGINE_NAME: &str = "iceberg-rust";
+const ENGINE_NAME_PROP: &str = "engine-name";
+const ENGINE_VERSION_PROP: &str = "engine-version";
+const ICEBERG_VERSION_PROP: &str = "iceberg-version";
+
+fn apply_writer_identity(properties: &mut HashMap<String, String>) {
+ let version = env!("CARGO_PKG_VERSION");
+ properties
+ .entry(ENGINE_NAME_PROP.to_string())
+ .or_insert_with(|| ENGINE_NAME.to_string());
+ properties
+ .entry(ENGINE_VERSION_PROP.to_string())
+ .or_insert_with(|| version.to_string());
Review Comment:
> this feels wrong to me. I don't think iceberg-rust is an engine?
I agree. The defaults can also pair another engine's name with
iceberg-rust's version. I ran a fast append on the head commit with only
`engine-name = datafusion` in the snapshot properties, and the snapshot summary
recorded `engine-version = 0.10.1`, which is the `iceberg` crate version.
@RussellSpitzer could we drop the defaults for [`engine-name` and
`engine-version`](https://github.com/apache/iceberg/blob/4a84ba420e51242ee6bb16c71b849d91e81d7d71/format/spec.md?plain=1#L2121-L2129)
and write only `iceberg-version`, like Java's default
[`EnvironmentContext`](https://github.com/apache/iceberg/blob/4a84ba420e51242ee6bb16c71b849d91e81d7d71/core/src/main/java/org/apache/iceberg/EnvironmentContext.java#L33-L35)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]