Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/1053#discussion_r37880533
--- Diff:
flink-tests/src/test/java/org/apache/flink/test/io/CsvReaderITCase.java ---
@@ -123,6 +132,21 @@ public void
testPOJOTypeWithFieldsOrderAndFieldsSelection() throws Exception {
expected = "ABC,3,0.00\nDEF,5,0.00\nDEF,1,0.00\nGHI,10,0.00";
}
+ @Test
+ public void testValueTypes() throws Exception {
+ final String inputData =
"ABC,true,1,2,3,4,5.0,6.0\nBCD,false,1,2,3,4,5.0,6.0";
+ final String dataPath = createInputData(inputData);
+ final ExecutionEnvironment env =
ExecutionEnvironment.getExecutionEnvironment();
+
+ DataSet<Tuple8<StringValue, BooleanValue, ByteValue,
ShortValue, IntValue, LongValue, FloatValue, DoubleValue>> data =
+
env.readCsvFile(dataPath).types(StringValue.class, BooleanValue.class,
ByteValue.class, ShortValue.class, IntValue.class, LongValue.class,
FloatValue.class, DoubleValue.class);
+ data.writeAsText(resultPath);
--- End diff --
If I'm not mistaken, then we wanted to avoid writing data to disk because
this sometimes fails on Travis. Instead we should use `collect` to keep the
data in memory.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---