DATA-4658 sql may fail with distinct columns in having statement https://github.com/facebook/presto/pull/1104