HangyuanLiu commented on a change in pull request #4858:
URL: https://github.com/apache/incubator-doris/pull/4858#discussion_r521183126
##########
File path: be/src/exec/schema_scanner/schema_columns_scanner.cpp
##########
@@ -236,9 +238,22 @@ Status SchemaColumnsScanner::fill_one_row(Tuple *tuple,
MemPool *pool) {
{
void *slot = tuple->get_slot(_tuple_desc->slots()[6]->tuple_offset());
StringValue* str_slot = reinterpret_cast<StringValue*>(slot);
- str_slot->len = strlen("NO") + 1;
- str_slot->ptr = (char *)pool->allocate(str_slot->len);
- memcpy(str_slot->ptr, "NO", str_slot->len);
+
+ if
(_desc_result.columns[_column_index].columnDesc.__isset.isAllowNull) {
+ if (_desc_result.columns[_column_index].columnDesc.isAllowNull) {
+ str_slot->len = strlen("YES");
Review comment:
I don't think +1 is necessary here, and +1 will cause the character
matching of the SQL result to fail. Such as IS_NULLABLE = "YES" is false
----------------------------------------------------------------
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]