Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2633#discussion_r114289764
--- Diff:
flink-streaming-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
---
@@ -389,4 +403,54 @@ private TestCassandraTupleWriteAheadSink(String
tableName, TypeSerializer<IN> se
this.tableName = tableName;
}
}
+
+ @Test
+ public void testCassandraScalaTupleAtLeastOnceSinkBuilderDetection()
throws Exception {
+ Class<Tuple1<String>> c = (Class<Tuple1<String>>) new
Tuple1<>("hello").getClass();
+ Seq<TypeInformation<?>> typeInfos =
JavaConverters.asScalaBufferConverter(
+ Arrays.<TypeInformation<?>>asList(new
TypeInformation[]{BasicTypeInfo.STRING_TYPE_INFO})).asScala();
+ Seq<String> fieldNames = JavaConverters.asScalaBufferConverter(
+ Arrays.asList(new String[]{"_1"})).asScala();
+
+ CaseClassTypeInfo<Tuple1<String>> typeInfo = new
CaseClassTypeInfo<Tuple1<String>>(c, null, typeInfos, fieldNames) {
+ @Override
+ public TypeSerializer<Tuple1<String>>
createSerializer(ExecutionConfig config) {
+ return null;
+ }
+ };
+
+ StreamExecutionEnvironment env =
mock(StreamExecutionEnvironment.class);
--- End diff --
I'll fix this and rebase the PR later today.
---
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.
---