diqiu50 opened a new issue, #13999:
URL: https://github.com/apache/gravitino/issues/13999
### Version
main branch
### Describe what's wrong
When adding a column to a StarRocks table,
`StarRocksTableOperations#addColumnFieldDefinition` only writes the column
name, type, comment and position. The nullability, default value and
auto-increment attributes of the request are silently dropped, so the column is
always created as nullable without a default value, and the alter still
succeeds.
### Error message and/or stacktrace
No error. The column is created with wrong attributes.
### How to reproduce
1. Create a StarRocks catalog and a table.
2. Add a column via `TableChange.addColumn(new String[] {"created_at"},
Types.TimestampType.withoutTimeZone(), null, ColumnPosition.defaultPos(),
false, false, Column.DEFAULT_VALUE_OF_CURRENT_TIMESTAMP)`.
3. Load the table: `created_at` is nullable and has no default value. Rows
inserted without this column get NULL.
### Additional context
StarRocks does not support adding an `AUTO_INCREMENT` column via `ALTER
TABLE ADD COLUMN`, so that case should be rejected explicitly.
--
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]