You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "tafia (via GitHub)" <gi...@apache.org> on 2026/01/26 06:11:15 UTC

[I] column "iceberg_type" does not exist [iceberg-rust]

tafia opened a new issue, #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068

   ### Apache Iceberg Rust version
   
   0.6.0 (latest version)
   
   ### Describe the bug
   
   I am trying to connect to an existing lake which is mostly used with python pyiceberg 0.9.x. 
   
   I am using a `SqlCatalog` and I get what I understand is some format mismatch related error:
   ```
   column "iceberg_type" does not exist
   ```
   
   Is there any way to work around it? maybe downgrade what protocol we use etc? I am new to iceberg.
   
   
   Note: I am using version 0.8.0 (could only select up to v0.6.0 in the form).
   
   ### To Reproduce
   
   This is a private lake so I am not sure how to reproduce it.
   
   ### Expected behavior
   
   Being able to load from existing (even if old) lake without error. Updating the lake is I believe not possible given how widely used it is already.
   
   ### Willingness to contribute
   
   None


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY closed issue #2068: column "iceberg_type" does not exist
URL: https://github.com/apache/iceberg-rust/issues/2068


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3821760726

   i dug into this a bit. 
   Looks like in iceberg-rust, the database schema for SqlCatalog contains the `iceberg_type` column. 
   https://github.com/apache/iceberg-rust/blob/c56411a31945591dc600b95206d956ce0a7bb85c/crates/catalog/sql/src/catalog.rs#L259
   
   However, this is not the case in pyiceberg and java's implementation: 
   https://github.com/apache/iceberg-python/blob/062a252dd9f0f445ed5062a950db9ebd26682406/pyiceberg/catalog/sql.py#L84-L91
   https://github.com/apache/iceberg/blob/8072acd66e69bd0888ca67c8ffb9b213501be8fc/core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java#L126-L147
   
   Perhaps we can make `iceberg_type` optional and eventually removed 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824954022

   Looks like for java, schema evolution is on the write path (updating the database) https://github.com/apache/iceberg/pull/10111/files#diff-1daee532e0ff506f3e2fa8186deb993eec463498c6aea8c814dcd604891aa1e1R534-R536
   
   I think to resolve this specific issue, we can do the same and evolve the schema if the `iceberg_type` column is not present. 
   
   For further improvements, we might want to introduce the concept of schema versions (v0/v1) that can be optionally set for SqlCatalog. SqlCatalog with V0 will not attempt to evolve the schema, but V1 will. This is just some additional hardening and give users the optionality to not evolve schema if they should choose (or they dont have the permission to) 
   
   WDDYT? 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3825086026

   Is it worth emulating the NULL behavior? If views didn't exist in V0, we could have an opportunity to avoid putting more NULLs into the world here. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824840537

   @kevinjqliu Actually, it is used in the Java implementation for the V1 methods
   
   ```
     private static final String V1_DO_COMMIT_TABLE_SQL =
         "UPDATE "
             + CATALOG_TABLE_VIEW_NAME
             + " SET "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ? , "
             + JdbcTableOperations.PREVIOUS_METADATA_LOCATION_PROP
             + " = ?"
             + " WHERE "
             + CATALOG_NAME
             + " = ? AND "
             + TABLE_NAMESPACE
             + " = ? AND "
             + TABLE_NAME
             + " = ? AND "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ? AND ("
             + RECORD_TYPE
             + " = '"
             + TABLE_RECORD_TYPE
             + "'"
             + " OR "
             + RECORD_TYPE
             + " IS NULL)";
     private static final String V1_DO_COMMIT_VIEW_SQL =
         "UPDATE "
             + CATALOG_TABLE_VIEW_NAME
             + " SET "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ? , "
             + JdbcTableOperations.PREVIOUS_METADATA_LOCATION_PROP
             + " = ?"
             + " WHERE "
             + CATALOG_NAME
             + " = ? AND "
             + TABLE_NAMESPACE
             + " = ? AND "
             + TABLE_NAME
             + " = ? AND "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ? AND "
             + RECORD_TYPE
             + " = "
             + "'"
             + VIEW_RECORD_TYPE
             + "'";
     private static final String V0_DO_COMMIT_SQL =
         "UPDATE "
             + CATALOG_TABLE_VIEW_NAME
             + " SET "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ? , "
             + JdbcTableOperations.PREVIOUS_METADATA_LOCATION_PROP
             + " = ?"
             + " WHERE "
             + CATALOG_NAME
             + " = ? AND "
             + TABLE_NAMESPACE
             + " = ? AND "
             + TABLE_NAME
             + " = ? AND "
             + JdbcTableOperations.METADATA_LOCATION_PROP
             + " = ?";
   ```


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "tafia (via GitHub)" <gi...@apache.org>.
tafia commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3852903624

   1. Why is it expensive
   2. For my use case it might be unrealistic to ask my company to migrate a full table schema, they'll want testing etc ... I'd very much prefer some support for different versions, eventually with some warnings.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824984192

   I'm all for more choice, but depending on how things change later it might become unrealistic to support different logic paths for all previous versions. I'll go sketch out an implementation that does this exact thing and maybe we can get a better idea of what it would look like. 
   
   For maximum clarity to users, I think a good design could be a simple "migrate_schema" option in the builder. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3825151946

   V0 -> V1 migration (ie adding the `iceberg_type`) will create NULL values for existing entries. These are assumed to be tables, since the view concept did not exist in V0. 
   Back filling NULL with "TABLE" is an option, but is too expensive IMO


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824839187

   ah ok, `iceberg_type` is used to distinguish between tables and views
   added in https://github.com/apache/iceberg/pull/9487 and https://github.com/apache/iceberg/pull/10111
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3825394961

   @kevinjqliu I've sketched up this behavior in #2092 if you wouldn't mind taking a peek! Backfills with NULLs on write if you allow it. Needs more testing, but let me know if you have thoughts on the overall structure and implementation strategy. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824843084

   Looks like java and rust are correct here, and its pyiceberg that lacks this field. This makes sense since we dont have support for views yet in pyiceberg. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824916126

   That makes sense. For schema evolution from V0 to V1, is adding the column all that's required, or would that involve pieces outside of `iceberg-catalog-sql`? I suppose it's safe to assume everything is a table unless `iceberg_type` is present. 
   
   I could pursue a solution like this:
   (1) On first open, set a flag if `iceberg_type` is present. Something like `SqlCatalog.views_supported: bool`. We could then factor out the query strings into utility functions or constants like Java does and use match statements in the catalog code to select them based on whether the `iceberg_type` column is present. 
   (2) On first write, we can add the `iceberg_type` column to the table with the assumption that all rows were TABLEs and change the flag on SqlCatalog to match. 
   
   What do you think of this approach? 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "brodiealexander (via GitHub)" <gi...@apache.org>.
brodiealexander commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3820260943

   @liurenjie1024 I have been experiencing this issue too. It seems to also break iceberg-rust for MySQL and SQLite both (I have not tested Postgres yet). Perhaps I can create a test dataset later, but I suspect any pyiceberg db will be cause this issue. I'm going to open an RFC later today to discuss how to make this fault-tolerant. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824994375

   This is how java treats the column after evolution.
   
   After V0 → V1 migration:
   * Existing records (created under V0) have iceberg_type = NULL
   * New tables (created under V1) have iceberg_type = 'TABLE'
   * New views (created under V1) have iceberg_type = 'VIEW'
   
   The queries treat NULL as TABLE type 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3798896730

   Hi, @tafia thanks for reporting this. Could you try to reproduce it with leaking your data? I guess this is a common problem due to the schema mismatch between rust and pyiceberg.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3824868126

   So the issue here seems to be a mismatch of the underlying db's schema. 
   V0 (without "record_type" column) is created by pyiceberg. But rust expects only V1 (with the "record_type"). 
   
   Seems like java solved this by doing a schema migration from V0 -> V1
   - https://github.com/apache/iceberg/issues/10046
   - https://github.com/apache/iceberg/pull/10111
   
   I think there are a couple things here
   * rust should allow reading V0 schema without evolution (for backwards compatibility) 
   * rust should be able to evolve schema from V0 -> V1 
   
   Let me know if this makes sense (@brodiealexander i typically like to have the discussion in the issue rather than the PR since its easier for others to follow) 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "tafia (via GitHub)" <gi...@apache.org>.
tafia commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-3852870031

   Yes, I ended up doing a very simple catalog (just catalog_name, namespace_name, table_name, metadata_location and previous_metadatalocation).


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] column "iceberg_type" does not exist [iceberg-rust]

Posted by "rchowell (via GitHub)" <gi...@apache.org>.
rchowell commented on issue #2068:
URL: https://github.com/apache/iceberg-rust/issues/2068#issuecomment-4337394918

   Here are fixes for iceberg-python and iceberg-rust which match the iceberg-java behavior, details in the [description](https://github.com/apache/iceberg-python/pull/3263).
   
   - https://github.com/apache/iceberg-python/pull/3263
   - https://github.com/apache/iceberg-rust/pull/2380


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org