You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by GitBox <gi...@apache.org> on 2022/11/06 06:49:28 UTC

[GitHub] [orc] guiyanakuang commented on a diff in pull request #1305: ORC-1306: Fixed indented code style for Java modules

guiyanakuang commented on code in PR #1305:
URL: https://github.com/apache/orc/pull/1305#discussion_r1014777920


##########
java/core/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java:
##########
@@ -118,62 +121,62 @@ protected void assignStringGroupVectorEntry(BytesColumnVector bytesColVector,
      * length for the string group which can be (STRING, CHAR, VARCHAR).
      */
     protected void assignStringGroupVectorEntry(BytesColumnVector bytesColVector,
-        int elementNum, TypeDescription readerType, byte[] bytes, int start, int length) {
+                                                int elementNum,
+                                                TypeDescription readerType,
+                                                byte[] bytes,
+                                                int start,
+                                                int length) {
       switch (readerType.getCategory()) {
-      case STRING:
-        bytesColVector.setVal(elementNum, bytes, start, length);
-        break;
-      case CHAR:
-        {
+        case STRING:
+          bytesColVector.setVal(elementNum, bytes, start, length);
+          break;
+        case CHAR: {
           int adjustedDownLen =
               StringExpr.rightTrimAndTruncate(bytes, start, length, readerType.getMaxLength());
           bytesColVector.setVal(elementNum, bytes, start, adjustedDownLen);
+          break;
         }
-        break;

Review Comment:
   @dongjoon-hyun. Here I chose to move the break inside the brackets. Because if remove the {} . The context will show the problem of duplicate variables with the same name (`adjustedDownLen `) being defined. 



-- 
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-unsubscribe@orc.apache.org

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