You should remove this method and just inherit the default, which returns false. The preservesOrder() and getKeyFormationDirective() functions are not documented as well as they should be. The preservesOrder() function is used to control whether a GROUP BY can be done on-the-fly when the group by expression uses leading row key columns. For example, assuming that host is your PK:
SELECT host FROM my_table GROUP BY host

This group by can be executed on-the-fly at the back-end, since host values with the same value will be adjacent to each other. For this one:
SELECT host FROM my_table GROUP BY upper(host)
you could have cases where non adjacent rows would end up in the same group. For example, with the following host values:

A
B
a
b

The "A" and "a" would end up in the same group by bucket, but they're not adjacent, same with "B" and "b". So by returning false (which is the default), you're telling the query compiler that this optimization can't be performed through this function.