pnowojski commented on a change in pull request #6787: [FLINK-8577][table] 
Implement proctime DataStream to Table upsert conversion
URL: https://github.com/apache/flink/pull/6787#discussion_r247958035
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/StreamTableEnvironmentTest.scala
 ##########
 @@ -185,4 +198,20 @@ class StreamTableEnvironmentTest extends TableTestBase {
     (jTEnv, ds)
   }
 
+  private def prepareKeyedSchemaExpressionParser:
+    (JStreamTableEnv, DataStream[JTuple2[JBool, JTuple5[JLong, JInt, String, 
JInt, JLong]]]) = {
+
+    val jStreamExecEnv = mock(classOf[JStreamExecEnv])
+    
when(jStreamExecEnv.getStreamTimeCharacteristic).thenReturn(TimeCharacteristic.EventTime)
+    val jTEnv = TableEnvironment.getTableEnvironment(jStreamExecEnv)
+
+    val sType = new TupleTypeInfo(Types.LONG, Types.INT, Types.STRING, 
Types.INT, Types.LONG)
+      .asInstanceOf[TupleTypeInfo[JTuple5[JLong, JInt, String, JInt, JLong]]]
+    val dsType = new TupleTypeInfo(Types.BOOLEAN, sType)
+      .asInstanceOf[TupleTypeInfo[JTuple2[JBool, JTuple5[JLong, JInt, String, 
JInt, JLong]]]]
+    val ds = mock(classOf[DataStream[JTuple2[JBool, JTuple5[JLong, JInt, 
String, JInt, JLong]]]])
+    when(ds.getType).thenReturn(dsType)
 
 Review comment:
   ditto about the mockito and one abbreviated variables (`sType` vs `dsType`?)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to