LuciferYang commented on code in PR #58333:
URL: https://github.com/apache/spark/pull/58333#discussion_r3878383052


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -495,6 +495,18 @@
     ],
     "sqlState" : "22001"
   },
+  "BUCKET_COLUMN_IN_PARTITION_COLUMNS" : {
+    "message" : [
+      "Bucketing column '<bucketCol>' should not be part of partition columns 
'<normalizedPartCols>'."
+    ],
+    "sqlState" : "42601"

Review Comment:
   Switched to `42713`. The argument in the description had a hole: I cited 
`STATIC_PARTITION_COLUMN_IN_INSERT_COLUMN_LIST` as the precedent for the name 
shape without noticing it sits on `42713` for exactly this shape. The five 
siblings I listed are neighbours by feature area, and none of them is a 
cross-clause column conflict. The split now reads `42711` for a name repeated 
inside one list (`COLUMN_ALREADY_EXISTS`, which 
`SchemaUtils.checkColumnNameDuplication` already checks on the normalized 
partition columns before the bucket check runs), `42713` for one column claimed 
by two clauses, `42601` for plain clause errors. One correction to the note: 
`BIN_BY_DUPLICATE_DISTRIBUTE_COLUMN` is a within-list duplicate rather than a 
cross-list one, so `STATIC_PARTITION_COLUMN_IN_INSERT_COLUMN_LIST` carries that 
precedent on its own.



##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -495,6 +495,18 @@
     ],
     "sqlState" : "22001"
   },
+  "BUCKET_COLUMN_IN_PARTITION_COLUMNS" : {
+    "message" : [
+      "Bucketing column '<bucketCol>' should not be part of partition columns 
'<normalizedPartCols>'."

Review Comment:
   Applied: `toSQLId()` per column, bare placeholders in the template. It also 
fixes a smaller thing in the legacy text: `'<normalizedPartCols>'` put one pair 
of quotes around a comma-joined list, so two partition columns rendered as `'i, 
j'` and read like a single identifier. Now `` `i`, `j` ``.



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