[
https://issues.apache.org/jira/browse/FLINK-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519268#comment-14519268
]
ASF GitHub Bot commented on FLINK-1911:
---------------------------------------
Github user mbalassi commented on a diff in the pull request:
https://github.com/apache/flink/pull/630#discussion_r29330901
--- Diff:
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/operators/ProjectWithoutClassTest.java
---
@@ -0,0 +1,22 @@
+package org.apache.flink.streaming.api.operators;
+
+import org.apache.flink.api.common.functions.MapFunction;
+import org.apache.flink.api.java.tuple.Tuple3;
+import
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+
+public class ProjectWithoutClassTest {
+
+ public static void main(String[] args) throws Exception {
+ final StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
+
+ env.generateSequence(1, 100).map(new MapFunction<Long,
Tuple3<Long, Character, Double>>() {
+
+ @Override
+ public Tuple3<Long, Character, Double> map(Long value)
throws Exception {
+ return new Tuple3<Long, Character,
Double>(value, 'c', (double) value);
+ }
+ }).project(0,2).print();
+
+ env.execute("ProjectWithoutClassTest");
+ }
--- End diff --
Wow, this test has a couple of problems:
* Why create a separate file, not just have another function in
`ProjectTest`?
* Why start a `StreamExecutionEnvironment` instead of using `MockContext`?
* Why print?
* Why no assert?
I'll assume it was just for internally making sure that the code "works",
not really testing. :)
> DataStream and DataSet projection is out of sync
> ------------------------------------------------
>
> Key: FLINK-1911
> URL: https://issues.apache.org/jira/browse/FLINK-1911
> Project: Flink
> Issue Type: Bug
> Components: Java API, Streaming
> Reporter: Gyula Fora
> Assignee: Péter Szabó
>
> Since the DataSet projection has been reworked to not require the .types(...)
> call the Streaming and Batch methods are out of sync.
> The streaming api projection needs to be modified accordingly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)