Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19757#discussion_r153130613
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
 ---
    @@ -366,10 +366,16 @@ case class CatalogStatistics(
        * Convert [[CatalogStatistics]] to [[Statistics]], and match column 
stats to attributes based
        * on column names.
        */
    -  def toPlanStats(planOutput: Seq[Attribute]): Statistics = {
    -    val matched = planOutput.flatMap(a => colStats.get(a.name).map(a -> _))
    -    Statistics(sizeInBytes = sizeInBytes, rowCount = rowCount,
    -      attributeStats = AttributeMap(matched))
    +  def toPlanStats(planOutput: Seq[Attribute], cboEnabled: Boolean): 
Statistics = {
    +    val attrStats = planOutput.flatMap(a => colStats.get(a.name).map(a -> 
_))
    --- End diff --
    
    move into `if`.


---

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

Reply via email to