suhuruli commented on code in PR #60680:
URL: https://github.com/apache/spark/pull/60680#discussion_r4623107214


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala:
##########
@@ -294,8 +294,18 @@ class V2SessionCatalog(catalog: SessionCatalog)
     val properties = 
CatalogV2Util.applyPropertiesChanges(catalogTable.properties, changes)
     val schema = CatalogV2Util.applySchemaChanges(
       catalogTable.schema, changes, catalogTable.provider, "ALTER TABLE")
-    val comment = properties.get(TableCatalog.PROP_COMMENT)
-    val collation = properties.get(TableCatalog.PROP_COLLATION)
+    // The dedicated CatalogTable fields hold these values, not properties; 
keep them unless a
+    // change names the key.

Review Comment:
   Good catch, thanks. `createTable0` does pass the whole v2 property map into 
`CatalogTable.properties`, so the old wording was too strong for tables created 
through this catalog. I took your sentence as is: the comment above `val 
comment` and `val collation` in `V2SessionCatalog.alterTable` now reads "These 
live in dedicated CatalogTable fields and `properties` may not hold them; keep 
the fields unless a change names the key." It is a comment-only change, so no 
test was added or changed. I also softened the same claim in the PR description.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to