Apply https://issues.apache.org/jira/browse/HIVE-3455 to fix correlation calculation.