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 2022/12/22 09:06:28 UTC

[GitHub] [doris] yangzhg commented on a diff in pull request #15224: [Feature](bitmap)Support return bitmap/hll data in select statement in vectoriza…

yangzhg commented on code in PR #15224:
URL: https://github.com/apache/doris/pull/15224#discussion_r1055238772


##########
be/src/vec/sink/vmysql_result_writer.cpp:
##########
@@ -91,7 +93,27 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
             }
 
             if constexpr (type == TYPE_OBJECT) {
-                buf_ret = _buffer.push_null();
+                if (column->is_bitmap() && output_object_data()) {
+                    const vectorized::ColumnComplexType<BitmapValue>* pColumnComplexType =
+                            assert_cast<const vectorized::ColumnComplexType<BitmapValue>*>(
+                                    column.get());
+                    BitmapValue bitmapValue = pColumnComplexType->get_element(i);
+                    size_t size = bitmapValue.getSizeInBytes();
+                    std::unique_ptr<char[]> buf(new char[size]);

Review Comment:
   ```suggestion
                       std::unique_ptr<char[]> buf = std::make_unique<char[]>(size);
   ```



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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