HIVE-9153: port to trunk