Alexander Behm created SPARK-22073: -------------------------------------- Summary: Add workaround for HIVE-15653 to avoid stats being accidentally wiped Key: SPARK-22073 URL: https://issues.apache.org/jira/browse/SPARK-22073 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 2.2.0 Reporter: Alexander Behm
The alterTable() RPC to the Hive Metastore has the subtle and undesirable side-effect of sometimes wiping/recreating useful stats like 'numRows' and 'totalSize'. Further, the alterTable() causes extra "hidden" load on the NameNode/S3/whatever to list all the files and get the 'totalSize' and 'numFiles'. This behavior can lead to confusion, e.g., if a SparkSQL query suddenly becomes slow due to a bad plan because somebody ran an unrelated ALTER TABLE from Hive/SparkSQL which wiped the stats (not fun to do the RCA). One way to avoid this problem is to always add a special table property DO_NOT_UPDATE_STATS to the altered table before doing the alterTable() RPC to the Metastore. See HIVE-15653 for more details. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org