code: private boolean validateKeyTypeIsHashable(TypeInformation<?> type) {
  		try {
  			return (type instanceof PojoTypeInfo)
  					? !type.getTypeClass().getMethod("hashCode").getDeclaringClass().equals(Object.class)
  					: !(type instanceof PrimitiveArrayTypeInfo || type instanceof BasicArrayTypeInfo || type instanceof ObjectArrayTypeInfo);
  		} catch (NoSuchMethodException ignored) {
  			// this should never happen as we are just searching for the hashCode() method.
  		}
  		return false;
  	}
docs: Validates that a given type of element (as encoded by the provided {@link TypeInformation}) can be
  used as a key in the {@code DataStream.keyBy()} operation.
  
  @param type The {@link TypeInformation} of the type to check.
  @return {@code false} if:
  <ol>
  <li>it is a POJO type but does not override the {@link #hashCode()} method and relies on
  the {@link Object#hashCode()} implementation.</li>
  <li>it is an array of any type (see {@link PrimitiveArrayTypeInfo}, {@link BasicArrayTypeInfo},
  {@link ObjectArrayTypeInfo}).</li>
  </ol>,
  {@code true} otherwise.