Github user juliuszsompolski commented on a diff in the pull request: https://github.com/apache/spark/pull/23152#discussion_r237789881 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala --- @@ -2276,4 +2276,16 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton { } } + + test("SPARK-26181 hasMinMaxStats method of ColumnStatsMap is not correct") { + withSQLConf(SQLConf.CBO_ENABLED.key -> "true") { + withTable("all_null") { + sql("create table all_null (attrInt int)") + sql("insert into all_null values (null)") + sql("analyze table all_null compute statistics for columns attrInt") + checkAnswer(sql("select * from all_null where attrInt < 1"), Nil) --- End diff -- Normal query execution doens't trigger it here, because it doesn't need stats so they never get lazy evaluated. Putting a join over it would probably trigger it without having to force it with .queryExecution.stringWithStats.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org