ihuzenko commented on a change in pull request #1945: DRILL-7502: Invalid 
codegen for typeof() with UNION
URL: https://github.com/apache/drill/pull/1945#discussion_r362869398
 
 

 ##########
 File path: exec/java-exec/src/main/codegen/templates/TypeHelper.java
 ##########
 @@ -82,28 +82,28 @@ public static JType getHolderType(JCodeModel model, 
MinorType type, DataMode mod
     case MAP:
     case LIST:
       return model._ref(ComplexHolder.class);
-      
+
 <#list vv.types as type>
   <#list type.minor as minor>
-      case ${minor.class?upper_case}:
-        switch (mode) {
-          case REQUIRED:
-            return model._ref(${minor.class}Holder.class);
-          case OPTIONAL:
-            return model._ref(Nullable${minor.class}Holder.class);
-          case REPEATED:
-            return model._ref(Repeated${minor.class}Holder.class);
-        }
+    case ${minor.class?upper_case}:
+      switch (mode) {
+        case REQUIRED:
+          return model._ref(${minor.class}Holder.class);
+        case OPTIONAL:
+          return model._ref(Nullable${minor.class}Holder.class);
+        case REPEATED:
+          return model._ref(Repeated${minor.class}Holder.class);
+      }
   </#list>
 </#list>
-      case GENERIC_OBJECT:
-        return model._ref(ObjectHolder.class);
+    case GENERIC_OBJECT:
+      return model._ref(ObjectHolder.class);
     case NULL:
       return model._ref(UntypedNullHolder.class);
-      default:
-        break;
-      }
-      throw new UnsupportedOperationException(buildErrorMessage("get holder 
type", type, mode));
+    default:
+      break;
+    }
+    throw new UnsupportedOperationException(buildErrorMessage("get holder 
type", type, mode));
 
 Review comment:
   I think the line may be located under ```default:``` inside switch-case. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to