Description
The query below seems to ignore the coalesce. This is running spark 2.2 or spark 2.3 against hive, which is reading orc:
Query:
spark.sql("SELECT COUNT(DISTINCT(something)) FROM sometable WHERE dt >= '20170301' AND dt <= '20170331' AND something IS NOT NULL").coalesce(160000).show()