You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2018/11/28 04:45:00 UTC
[GitHub] imay commented on a change in pull request #359: Fix stream load failure when target table contains HLL and insert fai…
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org