Skip to content

Commit 0f8c501

Browse files
authored
Improve error message for DELTA_ROW_ID_ASSIGNMENT_WITHOUT_STATS (delta-io#4702)
#### Which Delta project/connector is this regarding? <!-- Please add the component selected below to the beginning of the pull request title For example: [Spark] Title of my pull request --> - [ ] Spark - [ ] Standalone - [ ] Flink - [ ] Kernel - [ ] Other (fill in here) ## Description As titled. ## How was this patch tested? N/A ## Does this PR introduce _any_ user-facing changes? No.
1 parent cbdc133 commit 0f8c501

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

spark/src/main/resources/error/delta-error-classes.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,13 +2215,8 @@
22152215
"DELTA_ROW_ID_ASSIGNMENT_WITHOUT_STATS" : {
22162216
"message" : [
22172217
"Cannot assign row IDs without row count statistics.",
2218-
"Collect statistics for the table by running the following code and retry:",
2219-
"import org.apache.spark.sql.catalyst.TableIdentifier",
2220-
"import org.apache.spark.sql.delta.DeltaLog",
2221-
"import org.apache.spark.sql.delta.stats.StatisticsCollection",
2222-
"",
2223-
"val log = DeltaLog.forTable(spark, TableIdentifier(table_name))",
2224-
"StatisticsCollection.recompute(spark, log)"
2218+
"Collect statistics for the table by running the ANALYZE TABLE command:",
2219+
"ANALYZE TABLE tableName COMPUTE DELTA STATISTICS"
22252220
],
22262221
"sqlState" : "22000"
22272222
},

0 commit comments

Comments
 (0)