lowka commented on code in PR #5682:
URL: https://github.com/apache/ignite-3/pull/5682#discussion_r2063796735


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/sql/fun/IgniteSqlOperatorTable.java:
##########
@@ -60,16 +61,20 @@ public class IgniteSqlOperatorTable extends 
ReflectiveSqlOperatorTable {
     private static final SqlSingleOperandTypeChecker NOT_CUSTOM_TYPE =
             new NotCustomTypeOperandTypeChecker();
 
-    private static final SqlSingleOperandTypeChecker 
PLUS_OPERATOR_TYPES_CHECKER =
+    private static final SqlOperandTypeChecker DATETIME_MATCHING_INTERVAL = 
new SqlDateTimeIntervalTypeChecker(true);
+
+    private static final SqlOperandTypeChecker MATCHING_INTERVAL_DATETIME = 
new SqlDateTimeIntervalTypeChecker(false);
+
+    private static final SqlOperandTypeChecker PLUS_OPERATOR_TYPES_CHECKER =
             OperandTypes.NUMERIC_NUMERIC.and(SAME_SAME)
                     .or(OperandTypes.INTERVAL_SAME_SAME)
-                    .or(OperandTypes.DATETIME_INTERVAL.and(NOT_CUSTOM_TYPE))
-                    .or(OperandTypes.INTERVAL_DATETIME.and(NOT_CUSTOM_TYPE));
+                    
.or(OperandTypes.DATETIME_INTERVAL.and(DATETIME_MATCHING_INTERVAL).and(NOT_CUSTOM_TYPE))
+                    
.or(OperandTypes.INTERVAL_DATETIME.and(MATCHING_INTERVAL_DATETIME).and(NOT_CUSTOM_TYPE));

Review Comment:
   Thanks. Fixed.



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to