shahidki31 commented on a change in pull request #32498: URL: https://github.com/apache/spark/pull/32498#discussion_r631162814
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ########## @@ -759,6 +759,10 @@ case class Range( } override def computeStats(): Statistics = { + if (!conf.cboEnabled) { + return Statistics(sizeInBytes = LongType.defaultSize * numElements) + } + Review comment: I removed the condition as we have all the statistics available for the operator. I have added the condition earlier because, if cbo is not enabled, other operators are not returning other statistics. Do we also need to remove histogram check as well? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org