See https://reviews.apache.org/r/25160/diff/1-2/