You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Felix Neutatz (JIRA)" <ji...@apache.org> on 2017/06/28 11:45:00 UTC
[jira] [Created] (FLINK-7029) Documentation for WindowFunction is
confusing
Felix Neutatz created FLINK-7029:
------------------------------------
Summary: Documentation for WindowFunction is confusing
Key: FLINK-7029
URL: https://issues.apache.org/jira/browse/FLINK-7029
Project: Flink
Issue Type: Improvement
Components: Documentation
Reporter: Felix Neutatz
Priority: Trivial
Hi,
in the [example of the WindowFunction in the documentation|https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/windows.html#windowfunction---the-generic-case] we use WindowFunction<Tuple<String, Long>, String, String, TimeWindow>. That means that our key data-type is a String. For me, this is highly confusing, since we can only have a String data type for the key, if we implement a custom key selector. Usually people, especially beginners, will use something like keyBy(ID), keyBy("attributeName"), which will always return a tuple e.g. a Tuple1<String>. It would be great if somebody could change this to a tuple key type in the example. I am sure this might help beginners to understand that by default the key type is a tuple.
Moreover, another suggestion would be that we overwrite keyBy() in a way that if we just get one attribute, we return this type directly instead of wrapping it in a Tuple1.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)