badalprasadsingh opened a new pull request, #1244:
URL: https://github.com/apache/iceberg-go/pull/1244

   ## Description
   
   Resolves the case where the same database has already been initialised by 
the JDBC catalog at its default V0 schema-version, which omits the 
`iceberg_type` column added in V1. Iceberg-Go currently assumes V1 
unconditionally, so every query fails immediately with `no such column: 
iceberg_type`.
   
   ## Solution
   - **migrateVOSchema** step after `CreateSQLTables` If `iceberg_type` is 
missing, it issues `ALTER TABLE iceberg_tables ADD COLUMN iceberg_type 
VARCHAR(5)` (nullable, so legacy rows keep `NULL`), along with 
`icebergTypeColumnExists` check
   - Every table-scoped query that filtered on `iceberg_type = 'TABLE'` now 
uses `(iceberg_type = ? OR iceberg_type IS NULL)` so legacy rows continue to 
load, list, commit, drop, and rename. View queries are deliberately untouched.
   
   ## Files changed
   
   | File | Description |
   |---|---|
   | `catalog/sql/sql.go` | Bug Fix |
   | `catalog/sql/sql_test.go` | Regression Test |
   
   ## Testing
   - Tested against `JDBC` catalog with `postgres` as db


-- 
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]

Reply via email to