0ec0355611
### What changes were proposed in this pull request? Allow users to specify NOT NULL in CREATE TABLE and ADD COLUMN column definition, and add a new SQL syntax to alter column nullability: ALTER TABLE ... ALTER COLUMN SET/DROP NOT NULL. This is a SQL standard syntax: ``` <alter column definition> ::= ALTER [ COLUMN ] <column name> <alter column action> <alter column action> ::= <set column default clause> | <drop column default clause> | <set column not null clause> | <drop column not null clause> | ... <set column not null clause> ::= SET NOT NULL <drop column not null clause> ::= DROP NOT NULL ``` ### Why are the changes needed? Previously we don't support it because the table schema in hive catalog are always nullable. Since we have catalog plugin now, it makes more sense to support NOT NULL at spark side, and let catalog implementations to decide if they support it or not. ### Does this PR introduce any user-facing change? Yes, this is a new feature ### How was this patch tested? new tests Closes #27110 from cloud-fan/nullable. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
v1.2/src | ||
v2.3/src | ||
pom.xml |