Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14712#discussion_r76921588
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala ---
    @@ -168,6 +169,81 @@ class StatisticsSuite extends QueryTest with 
TestHiveSingleton with SQLTestUtils
           TableIdentifier("tempTable"), ignoreIfNotExists = true, purge = 
false)
       }
     
    +  private def checkMetastoreRelationStats(
    +      tableName: String,
    +      totalSize: Long,
    +      rowCount: Option[BigInt]): Unit = {
    +    val df = sql(s"SELECT * FROM $tableName")
    +    val relations = df.queryExecution.analyzed.collect { case rel: 
MetastoreRelation =>
    +      rel.statistics
    +      assert(rel.statistics.sizeInBytes === totalSize)
    +      assert(rel.statistics.rowCount === rowCount)
    +    }
    +    assert(relations.size === 1)
    +  }
    +
    +  private def checkLogicalRelationStats(tableName: String, rowCount: 
Option[BigInt]): Unit = {
    +    val df = sql(s"SELECT * FROM $tableName")
    +    val relations = df.queryExecution.analyzed.collect { case rel: 
LogicalRelation =>
    +      assert(rel.statistics.sizeInBytes === rel.relation.sizeInBytes)
    --- End diff --
    
    seems that parquet size is different in Windows and Linux. I set an 
expected value initially, it worked on Windows but it went wrong in Spark CI.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to