Skip to content

Commit

Permalink
Disabling Analysis of Table stats to comply with Benchmarking Spec
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 564100634
  • Loading branch information
asaksena authored and copybara-github committed Sep 10, 2023
1 parent 3c27041 commit 5ef57f4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ def main(args):
# the Hive Metastore. I do not believe this interoperates with Hive's own
# statistics. See
# https://jaceklaskowski.gitbooks.io/mastering-spark-sql/content/spark-sql-LogicalPlan-AnalyzeColumnCommand.html
columns = ','.join(spark.table(table).columns)
spark.sql(
'ANALYZE TABLE {} COMPUTE STATISTICS FOR COLUMNS {}'.format(
table, columns))
# Disabling to comply with the TPC spec.
# columns = ','.join(spark.table(table).columns)
# spark.sql(
# 'ANALYZE TABLE {} COMPUTE STATISTICS FOR COLUMNS {}'.format(
# table, columns))


if __name__ == '__main__':
Expand Down

0 comments on commit 5ef57f4

Please sign in to comment.