yangzhg commented on code in PR #15224:
URL: https://github.com/apache/doris/pull/15224#discussion_r1055238967
##########
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]);
+ bitmapValue.write(buf.get());
+ buf_ret = _buffer.push_string(buf.get(), size);
+ } else if (column->is_hll() && output_object_data()) {
+ const vectorized::ColumnComplexType<HyperLogLog>*
pColumnComplexType =
+ assert_cast<const
vectorized::ColumnComplexType<HyperLogLog>*>(
+ column.get());
+ HyperLogLog hyperLogLog =
pColumnComplexType->get_element(i);
+ size_t size = hyperLogLog.max_serialized_size();
+ std::unique_ptr<char[]> buf(new char[size]);
Review Comment:
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]