-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-53422][SQL][TEST] Make SPARK-30269 test case robust #52168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1616,11 +1616,10 @@ class StatisticsSuite extends StatisticsCollectionTestBase with TestHiveSingleto | |
| Seq(tbl, ext_tbl).foreach { tblName => | ||
| sql(s"INSERT INTO $tblName VALUES (1, 'a', '2019-12-13')") | ||
|
|
||
| val expectedSize = 690 | ||
| // analyze table | ||
| sql(s"ANALYZE TABLE $tblName COMPUTE STATISTICS NOSCAN") | ||
| var tableStats = getTableStats(tblName) | ||
| assert(tableStats.sizeInBytes == expectedSize) | ||
| val expectedSize = tableStats.sizeInBytes | ||
|
||
| assert(tableStats.rowCount.isEmpty) | ||
|
|
||
| sql(s"ANALYZE TABLE $tblName COMPUTE STATISTICS") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we compare with the size as unexpected before insertion instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when
spark.sql.statistics.size.autoUpdate.enabledisfalse(it's the default value), table stats is None until executingANALYZE TABLE ...I update the test to reflect that.