imay commented on a change in pull request #359: Fix stream load failure when 
target table contains HLL and insert fai…
URL: https://github.com/apache/incubator-doris/pull/359#discussion_r236939075
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java
 ##########
 @@ -329,24 +329,13 @@ private void finalizeParams() throws UserException {
     }
 
     private Expr castToSlot(SlotDescriptor slotDesc, Expr expr) throws 
UserException {
-        if (slotDesc.getType().isNull()) {
-            return expr;
-        }
         PrimitiveType dstType = slotDesc.getType().getPrimitiveType();
         PrimitiveType srcType = expr.getType().getPrimitiveType();
-        if (dstType.isStringType()) {
-            if (srcType.isStringType()) {
-                return expr;
-            } else {
-                CastExpr castExpr = (CastExpr)expr.castTo(Type.VARCHAR);
-                return castExpr;
-            }
-        } else if (dstType != srcType) {
-            CastExpr castExpr = (CastExpr)expr.castTo(slotDesc.getType());
-            return castExpr;
+        if (dstType != srcType) {
 
 Review comment:
   why you delete origin `stringType` check
   
   `stringType` check is used to make work with `char` and `varchar`, do you 
have test your path with `char` and `varchar` type with convert function which 
return is not these type?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to