dtenedor commented on code in PR #60588:
URL: https://github.com/apache/spark/pull/60588#discussion_r4635106489


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -9346,6 +9425,24 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_CHANGE_COLUMN" : {
+    "message" : [
+      "ALTER TABLE ... CHANGE COLUMN does not support"
+    ],
+    "subClass" : {
+      "NOT_NULL" : {
+        "message" : [
+          "setting NOT NULL. Use ALTER TABLE ... ALTER COLUMN ... SET NOT NULL 
instead."

Review Comment:
   Applied in 7b90f46bd80. It now reads "ALTER TABLE ... CHANGE COLUMN does not 
support NOT NULL in the column definition. Use ALTER TABLE ... ALTER COLUMN ... 
SET NOT NULL instead." The name, SQLSTATE and test are unchanged.
   



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -2722,8 +2736,9 @@ class PlanParserSuite extends AnalysisTest {
     val fragment = "TIMESTAMP AS OF col"
     checkError(
       exception = parseException(sql),
-      condition = "_LEGACY_ERROR_TEMP_0056",
-      parameters = Map("reason" -> "timestamp expression cannot refer to any 
columns"),
+      condition = "INVALID_TIME_TRAVEL_TIMESTAMP_EXPR.COLUMN_REFERENCE",
+      sqlState = "42K0E",
+      parameters = Map("expr" -> "\"col\""),

Review Comment:
   Added in 7b90f46bd80, so all four call sites are now covered:
   - time travel with a multi-token expression, `TIMESTAMP AS OF col + INTERVAL 
1 DAY`, which pins `expr` to `"col + INTERVAL 1 DAY"` with its spaces 
(`PlanParserSuite`, 'as of syntax');
   - the batch CHANGES end bound, `CHANGES FROM TIMESTAMP '2026-01-01' TO 
TIMESTAMP col_name` (`PlanParserSuite`, 'CHANGES clause - error: column 
reference in timestamp');
   - the streaming CHANGES start bound, `STREAM t CHANGES FROM TIMESTAMP 
col_name` (new test in `StreamRelationParserSuite`).
   



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