Error executing query counting the number of null values in a column

Hello all,
I have been tried to run a query against a table in Dremio and ran into an issue.

The query calculates some statistics about the numerical values of a column. The query:

SELECT MIN(pop) AS Minimum, MAX(pop) AS Maximum, AVG(pop) AS Average, MEDIAN(pop) AS Median, SUM(CASE WHEN pop IS NULL THEN 1 ELSE 0 END) AS "#NULL", (SUM(CASE WHEN pop IS NULL THEN 1 ELSE 0 END) / COUNT(*)) * 100 AS "%NULL" FROM Data.Zipcode LIMIT 1000

When i try to execute this query, I get the following error:

[Error Id: [uuid] on [host]:31010] (java.lang.AssertionError) Type mismatch: rowtype of new rel: RecordType(BIGINT Minimum, BIGINT Maximum, DOUBLE Average, DOUBLE NOT NULL Median, BIGINT NOT NULL #NULL, BIGINT %NULL) NOT NULL rowtype of set: RecordType(BIGINT Minimum, BIGINT Maximum, DOUBLE Average, DOUBLE NOT NULL Median, BIGINT #NULL, BIGINT %NULL) NOT NULL org.apache.calcite.util.Litmus$1.fail():31 org.apache.calcite.plan.RelOptUtil.equal():2128 org.apache.calcite.plan.volcano.RelSubset.add():288 {

The query succeeds (both in the JDBC driver and in Dremio UI) if i remove this part SUM(CASE WHEN pop IS NULL THEN 1 ELSE 0 END) AS "#NULL"

Is that something that can be fixed? Or is there another way to achieve the same thing?