You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-54377][SQL] Fix COMMENT ON TABLE IS NULL to properly remove table comment
### What changes were proposed in this pull request?
This PR fixes a bug where COMMENT ON TABLE table_name IS NULL was not properly removing the table comment.
### Why are the changes needed?
The syntax COMMENT ON TABLE table_name IS NULL should remove the table comment. However, the previous implementation was setting the comment to null rather than removing the property entirely.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Enhanced test case test("COMMENT ON TABLE") in DataSourceV2SQLSuite verifies:
* Comment can be set and is stored correctly
* Comment is completely removed when set to NULL (property no longer exists)
* Literal string "NULL" can still be set as a comment value
* Works for both session catalog and V2 catalogs
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 4.5
Closes#53091 from ganeshashree/SPARK-54377.
Authored-by: Ganesha S <ganesha.s@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit e8f0a67)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
0 commit comments