cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error on ANALYZE TABLE [...] COMPUTE STATISTICS FOR COLUMNS [...]

leungi
Contributor

End goal is to apply OPTIMIZE and ZORDER table.

However, one of the columns to be ZORDER doesn't have stats collected.

Running ANALYZE generates the error below.

Query

ANALYZE TABLE <catalog>.<schema>.<table> COMPUTE STATISTICS FOR COLUMNS my_col_1, my_col_2;
 
Error
[INTERNAL_ERROR] Eagerly executed command failed. You hit a bug in Spark or the Spark plugins you use. Please, report this bug to the corresponding communities or vendors, and provide the full stack trace. SQLSTATE: XX000
1 REPLY 1

@Retired_mod , thanks for the detailed suggestions.

1. Running SHOW COLUMN STATS yields the following error:

[PARSE_SYNTAX_ERROR] Syntax error at or near 'CHECK'. SQLSTATE: 42601 line 1, pos 0

== SQL ==
CHECK COLUMN STATS <catalog>.<schema>.<table> 
^^^

Ran DESCRIBE DETAIL <catalog>.<schema>.<table> successfully, and it indicates no column stats are currently being collected.

leungi_0-1720714440270.png

3. Ran ANALYZE TABLE <catalog>.<schema>.<table> COMPUTE STATISTICS FOR COLUMN my_col_1; for a single column, and faced the same error.

 

Any further troubleshooting tips are much appreciated!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group