I am confused by the section at https://ci.apache.org/projects/flink/flink-docs-release-1.11/learn-flink/etl.html#keyby
At first it says
rides
.flatMap(new NYCEnrichment())
.keyBy(value -> value.startCell)
is not good becase
This style of key selection has the drawback that the compiler is unable to infer the type of the field being used for keying, and so Flink will pass around the key values as Tuples, which can be awkward.
But later in that section it says
rides
.flatMap(new NYCEnrichment())
.keyBy(enrichedRide -> enrichedRide.startCell)
is fine, aren't the two identical?