ivandasch commented on a change in pull request #9315:
URL: https://github.com/apache/ignite/pull/9315#discussion_r688295572



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java
##########
@@ -646,11 +646,15 @@ else if 
(coCtx.kernalContext().cacheObjects().typeId(prop.type().getName()) !=
             if (propVal == null || prop.precision() == -1)
                 continue;
 
-            if (String.class == propVal.getClass() &&
-                ((String)propVal).length() > prop.precision()) {
-                throw new IgniteSQLException("Value for a column '" + 
prop.name() + "' is too long. " + 
-                    "Maximum length: " + prop.precision() + ", actual length: 
" + ((CharSequence)propVal).length(),
-                    isKey ? TOO_LONG_KEY : TOO_LONG_VALUE);
+            if (String.class == propVal.getClass() || byte[].class == 
propVal.getClass()) {
+                int propValLen = propVal.getClass() == String.class ? 
((String) propVal).length()

Review comment:
       According to codestyle it should be
   `((String)propVal).length())`
   The same is for casting to `byte[]`




-- 
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