You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/06/22 04:37:44 UTC

[GitHub] [incubator-doris] yangzhg commented on pull request #3898: Support import true or false as boolean value

yangzhg commented on pull request #3898:
URL: https://github.com/apache/incubator-doris/pull/3898#issuecomment-647270265


   > @yangzhg Hi, I think the result of processing bool value for stream load and insert stmt should keep consistent.
   > For now, like insert into xx values(1), result=true, insert into xx values(0) result=false, insert into xxx values("false") result=true insert into xx values(false) result=false insert into xx values("0") result=true, insert into xx values(true) result=true.
   > This is because insert stmt can analyze the real data type for insert value, so like 1 2 3, will use int_cast_to_bool, even can analyze boolean type. but for stream load, we lost the data type information. we don't know the real data type of the value, we treat all column values as string, so I think may be stream load should be processed specially to keep consistent with insert stmt. maybe need more discussion.
   
   
   
   > @yangzhg Hi, I think the result of processing bool value for stream load and insert stmt should keep consistent.
   > For now, like insert into xx values(1), result=true, insert into xx values(0) result=false, insert into xxx values("false") result=true insert into xx values(false) result=false insert into xx values("0") result=true, insert into xx values(true) result=true.
   > This is because insert stmt can analyze the real data type for insert value, so like 1 2 3, will use int_cast_to_bool, even can analyze boolean type. but for stream load, we lost the data type information. we don't know the real data type of the value, we treat all column values as string, so I think may be stream load should be processed specially to keep consistent with insert stmt. maybe need more discussion.
   
   insert into xx values("0") and stream load import file 0 result itself is contradictory, in the current code insert into xx values("0") result=true, stream load 0 result=false, and now cast_to_bool Only occurs when the type of the column is bool, so it is not contradictory to the current insert


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org