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/12 13:40:23 UTC

[GitHub] [incubator-doris] morningman commented on pull request #3851: [Enhancement] Replace N/A use NULL

morningman commented on pull request #3851:
URL: https://github.com/apache/incubator-doris/pull/3851#issuecomment-643276175


   Actually, in MySQL protocal, the `null` is represented as `(byte) (251 & 0xff)`.
   
   https://github.com/apache/incubator-doris/blob/88a5429165c65690eb443c017ed0b3bd7d786330/fe/src/main/java/org/apache/doris/mysql/MysqlSerializer.java#L64-L66
   
   https://github.com/apache/incubator-doris/blob/88a5429165c65690eb443c017ed0b3bd7d786330/be/src/util/mysql_row_buffer.cpp#L270-L281
   
   So If we want to make it compatible with real `null`, better to follow the protocol.
   
   I have a suggestion. Currently you are modifying the result set related to `Show`. The current ShowResultSet uses `String`. We can encapsulate a `NullableString`. In this way, when sending ShowResultSet, we can judge and return true `null`.
   
   It is not recommended to use `null` directly, because that will cause some results forwarded from the follower FE to not be able to be serialized to thrift.
   
   


----------------------------------------------------------------
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