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:
[email protected]



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

Reply via email to