You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/03/20 21:22:00 UTC
[jira] [Updated] (FLINK-7029) Documentation for WindowFunction is
confusing
[ https://issues.apache.org/jira/browse/FLINK-7029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Metzger updated FLINK-7029:
----------------------------------
Component/s: API / DataStream
> Documentation for WindowFunction is confusing
> ---------------------------------------------
>
> Key: FLINK-7029
> URL: https://issues.apache.org/jira/browse/FLINK-7029
> Project: Flink
> Issue Type: Improvement
> Components: API / DataStream, Documentation
> Reporter: Felix Neutatz
> Priority: Trivial
> Labels: documentation
>
> 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
(v8.3.4#803005)