tkalkirill commented on code in PR #13375:
URL: https://github.com/apache/ignite/pull/13375#discussion_r3729813481


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteSqlValidator.java:
##########
@@ -262,36 +265,39 @@ private void validateFetchOffset(@Nullable SqlNode n, 
String clauseName) {
             checkLimitOffset(offsetFetchLimit, n, clauseName);
         }
         else if (n instanceof SqlDynamicParam dynamicParam) {
-            // Dynamic parameters are nullable.
-            RelDataType expectType = 
typeFactory.createTypeWithNullability(typeFactory.createSqlType(SqlTypeName.DECIMAL),
 true);
-
             if (definedDynParam(dynamicParam)) {
                 Object param = parameters[dynamicParam.getIndex()];
 
                 if (!(param instanceof Number)) {
                     Resources.ExInst<SqlValidatorException> err;
 
                     if (param == null)
-                        err = 
IgniteResource.INSTANCE.incorrectDynamicParameterType(SqlTypeName.BIGINT.toString(),
 "null");
+                        err = 
IgniteResource.INSTANCE.incorrectDynamicParameterType(SqlTypeName.DECIMAL.toString(),
 "null");
                     else {
                         SqlTypeName paramType = 
typeFactory().createType(param.getClass()).getSqlTypeName();
-                        err = 
IgniteResource.INSTANCE.incorrectDynamicParameterType(SqlTypeName.BIGINT.toString(),
 paramType.getName());
+                        err = 
IgniteResource.INSTANCE.incorrectDynamicParameterType(SqlTypeName.DECIMAL.toString(),
 paramType.getName());

Review Comment:
   Why? That’s how it is in the CALCITE main branch right now.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to