jackylee-ch opened a new pull request, #10373: URL: https://github.com/apache/paimon/pull/10373
### Purpose `DataTypeParser.parse_nullability` detected nullability by matching the literal `"NOT NULL"` / `"NULL"` substrings against the *raw* type string. The surrounding `parse_atomic_type_sql_string` already upper-cases the string for its keyword lookup and suffix stripping, but this one helper did not — so a lowercase declaration like `bigint not null` was parsed as **nullable**, silently dropping the `NOT NULL` constraint. This is reachable from the `table alter add-column` / `alter-column --type` CLI (`cli_table.py`), which passes the user's raw `--type` argument straight to the parser. SQL type keywords are conventionally written lowercase, so `--type "bigint not null"` would create/alter the column as nullable without any error. The fix upper-cases the string before matching, consistent with the rest of the parser. ### Tests `data_types_test.py` adds `test_parse_nullability_is_case_insensitive` and `test_parse_atomic_type_lowercase_not_null`: lowercase / mixed-case `not null` now resolves to `NOT NULL`, and the end-to-end atomic parse keeps the constraint for both plain and parameterized types. Both tests fail before the change. ### API and Format No change. ### Documentation No change. -- 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]
