dannycjones commented on code in PR #2937:
URL: https://github.com/apache/iceberg-rust/pull/2937#discussion_r3821767074
##########
crates/iceberg/src/transaction/action.rs:
##########
@@ -34,7 +34,7 @@ pub(crate) type BoxedTransactionAction = Arc<dyn
TransactionAction>;
/// Each action is responsible for generating the updates and requirements
needed
/// to modify the table metadata.
#[async_trait]
-pub(crate) trait TransactionAction: AsAny + Sync + Send {
+pub trait TransactionAction: AsAny + Sync + Send {
Review Comment:
I think we intentionally want to keep this private to the crate. Instead of
making this public, we should remove public references to this trait.
##########
crates/iceberg/src/transaction/mod.rs:
##########
@@ -73,14 +73,14 @@ use crate::error::Result;
use crate::spec::TableProperties;
use crate::table::Table;
use crate::transaction::action::BoxedTransactionAction;
-use crate::transaction::append::FastAppendAction;
-use crate::transaction::expire_snapshots::ExpireSnapshotsAction;
-use crate::transaction::sort_order::ReplaceSortOrderAction;
-use crate::transaction::update_location::UpdateLocationAction;
-use crate::transaction::update_properties::UpdatePropertiesAction;
-use crate::transaction::update_schema::UpdateSchemaAction;
-use crate::transaction::update_statistics::UpdateStatisticsAction;
-use crate::transaction::upgrade_format_version::UpgradeFormatVersionAction;
+pub use crate::transaction::append::FastAppendAction;
+pub use crate::transaction::expire_snapshots::ExpireSnapshotsAction;
+pub use crate::transaction::sort_order::ReplaceSortOrderAction;
+pub use crate::transaction::update_location::UpdateLocationAction;
+pub use crate::transaction::update_properties::UpdatePropertiesAction;
+pub use crate::transaction::update_schema::UpdateSchemaAction;
+pub use crate::transaction::update_statistics::UpdateStatisticsAction;
+pub use crate::transaction::upgrade_format_version::UpgradeFormatVersionAction;
Review Comment:
I think the issue with doing this is that we expose a way to the user to
construct these actions (via `Default`). IMO, we shouldn't be implementing
`Default`.
I'd recommend we remove the `Default` implementations and then publishing
these types is OK (and the right thing to do).
--
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]