yuqi1129 opened a new issue, #8917:
URL: https://github.com/apache/gravitino/issues/8917
### Version
main branch
### Describe what's wrong
There seems to be something wrong with the column data stored in the entity
store.
### Error message and/or stacktrace
Please see below.
### How to reproduce
1. Create a table with only one column via Gravitino and check the data
store in the Gravitino entity store. The data should be in the following fomrat.
```text
mysql> select * from table_column_version_info where table_id =
'3866769854269019417'\G
*************************** 1. row ***************************
id: 42
metalake_id: 3250898827754213544
catalog_id: 2577629913772623580
schema_id: 2240681406617372892
table_id: 3866769854269019417
table_version: 1
column_id: 3216323358116345090
column_name: id
column_position: 0
column_type: "integer"
column_comment:
column_nullable: 0
column_auto_increment: 1
column_default_value: NULL
column_op_type: 1
deleted_at: 0
audit_info:
{"creator":"anonymous","createTime":"2025-10-27T03:33:53.127735Z","lastModifier":null,"lastModifiedTime":null}
1 row in set (0.01 sec)
mysql> select * from table_meta where table_name = 't1';
+---------------------+------------+---------------------+---------------------+---------------------+----------------------------------------------------------------------------------------------------------------+-----------------+--------------+------------+
| table_id | table_name | metalake_id | catalog_id
| schema_id | audit_info
| current_version |
last_version | deleted_at |
+---------------------+------------+---------------------+---------------------+---------------------+----------------------------------------------------------------------------------------------------------------+-----------------+--------------+------------+
| 3866769854269019417 | t1 | 3250898827754213544 |
2577629913772623580 | 2240681406617372892 |
{"creator":"anonymous","createTime":"2025-10-27T03:33:53.127735Z","lastModifier":null,"lastModifiedTime":null}
| 1 | 1 | 0 |
+---------------------+------------+---------------------+---------------------+---------------------+----------------------------------------------------------------------------------------------------------------+-----------------+--------------+------------+
1 row in set (0.00 sec)
```
2. Then we try to rename the column `id` to `id1` via SQL `alter table t1
change column id id1 int DEFAULT NULL;`
3. Try to load table via Gravitino and check the data stored in entity store.
<img width="1131" height="376" alt="Image"
src="https://github.com/user-attachments/assets/a5962cac-7b6e-41a2-b1bc-914d92ef5037"
/>
```
mysql> select * from table_column_version_info where table_id =
'3866769854269019417'\G
*************************** 1. row ***************************
id: 42
metalake_id: 3250898827754213544
catalog_id: 2577629913772623580
schema_id: 2240681406617372892
table_id: 3866769854269019417
table_version: 1
column_id: 3216323358116345090
column_name: id
column_position: 0
column_type: "integer"
column_comment:
column_nullable: 0
column_auto_increment: 1
column_default_value: NULL
column_op_type: 1
deleted_at: 0
audit_info:
{"creator":"anonymous","createTime":"2025-10-27T03:33:53.127735Z","lastModifier":null,"lastModifiedTime":null}
*************************** 2. row ***************************
id: 43
metalake_id: 3250898827754213544
catalog_id: 2577629913772623580
schema_id: 2240681406617372892
table_id: 3866769854269019417
table_version: 2
column_id: 2989833538553338889
column_name: id1
column_position: 0
column_type: "integer"
column_comment: NULL
column_nullable: 0
column_auto_increment: 1
column_default_value: {"type":"literal","dataType":"null","value":"NULL"}
column_op_type: 2
deleted_at: 0
audit_info:
{"creator":"anonymous","createTime":"2025-10-27T03:39:47.436450Z","lastModifier":null,"lastModifiedTime":null}
*************************** 3. row ***************************
id: 44
metalake_id: 3250898827754213544
catalog_id: 2577629913772623580
schema_id: 2240681406617372892
table_id: 3866769854269019417
table_version: 2
column_id: 3216323358116345090
column_name: id
column_position: 0
column_type: "integer"
column_comment:
column_nullable: 0
column_auto_increment: 1
column_default_value: NULL
column_op_type: 3
deleted_at: 0
audit_info:
{"creator":"anonymous","createTime":"2025-10-27T03:33:53.127735Z","lastModifier":null,"lastModifiedTime":null}
3 rows in set (0.00 sec)
```
**The problem is why do there exist two columns (id, id1) with version 2.**,
though the final result is correct.
### Additional context
_No response_
--
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]