Type of NULL can be inferred as a component type of Array.
Marking closed as of release 1.13.0 (2017-06-26).
I improved the fix in http://git-wip-us.apache.org/repos/asf/calcite/commit/4069013f. Now SQL such as the above query runs end-to-end, and similar queries that use MULTISET.
Force-pushed https://git-wip-us.apache.org/repos/asf?p=calcite.git;a=commit;h=32747d794bc7dae41b98bf508f350b4be878e67e to change the commit message.
After this commit, the validator is OK with null literals in arrays but sql-to-rel isn't. I tried to run the following query but it gave errors:
select array[1,null,2] as a from (values (1))
Rather than re-open this case, let's get that working as part of CALCITE-1804.
Merged in f9f2ec149