jnh5y commented on code in PR #23634:
URL: https://github.com/apache/flink/pull/23634#discussion_r1380547338


##########
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/InputTypeStrategiesTest.java:
##########
@@ -636,7 +639,45 @@ ANY, explicit(DataTypes.INT())
                         .expectSignature("f(<ARRAY>, <ARRAY ELEMENT>)")
                         .expectArgumentTypes(
                                 
DataTypes.ARRAY(DataTypes.INT().notNull()).notNull(),
-                                DataTypes.INT()));
+                                DataTypes.INT()),
+                TestSpec.forStrategy(
+                                "PROCTIME type strategy",
+                                
SpecificInputTypeStrategies.windowTimeIndicator(
+                                        TimestampKind.PROCTIME))
+                        
.calledWithArgumentTypes(timeIndicatorType(TimestampKind.PROCTIME))
+                        .expectSignature("f(<WINDOW REFERENCE>)")
+                        
.expectArgumentTypes(timeIndicatorType(TimestampKind.PROCTIME)),
+                TestSpec.forStrategy(
+                                "PROCTIME type strategy on non time indicator",
+                                
SpecificInputTypeStrategies.windowTimeIndicator(
+                                        TimestampKind.PROCTIME))
+                        .calledWithArgumentTypes(DataTypes.BIGINT())
+                        .expectErrorMessage("Reference to a rowtime or 
proctime window required."),
+                TestSpec.forStrategy(
+                                "ROWTIME type strategy",
+                                
SpecificInputTypeStrategies.windowTimeIndicator(
+                                        TimestampKind.ROWTIME))
+                        
.calledWithArgumentTypes(timeIndicatorType(TimestampKind.ROWTIME))
+                        .expectSignature("f(<WINDOW REFERENCE>)")
+                        
.expectArgumentTypes(timeIndicatorType(TimestampKind.ROWTIME)),
+                TestSpec.forStrategy(
+                                "ROWTIME type strategy on proctime indicator",
+                                
SpecificInputTypeStrategies.windowTimeIndicator(
+                                        TimestampKind.ROWTIME))
+                        
.calledWithArgumentTypes(timeIndicatorType(TimestampKind.PROCTIME))
+                        .expectErrorMessage(
+                                "A proctime window cannot provide a rowtime 
attribute."),

Review Comment:
   Can/should we add a test to cover the other direction?  E.g. using the 
proctime strategy on a rowtime indicator?  (Such a test passes.  I'll admit 
that I don't quite understand how to mix and match the two.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to