blackmwk commented on code in PR #2380:
URL: https://github.com/apache/iceberg-rust/pull/2380#discussion_r3159302104
##########
crates/catalog/sql/src/catalog.rs:
##########
@@ -297,6 +297,24 @@ impl SqlCatalog {
.await
.map_err(from_sqlx_error)?;
+ // Check if the catalog table has the iceberg_type column, if not,
it's a V0 schema.
+ let needs_migration = sqlx::query(&format!(
Review Comment:
I don't think it's a good idea to do migration silently. We should do
followings:
1. Add a config to do auto migration if need, and this should be disabled by
default.
2. If auto migration is disabled, and we detected that it's v0, we should
return error.
3. Add a pub api in SqlCatalog to allow user to do migration.
--
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]