HappenLee commented on code in PR #34042: URL: https://github.com/apache/doris/pull/34042#discussion_r1590010904
########## be/src/vec/data_types/serde/data_type_ipv6_serde.cpp: ########## @@ -112,5 +114,88 @@ Status DataTypeIPv6SerDe::read_column_from_pb(IColumn& column, const PValues& ar return Status::OK(); } +void DataTypeIPv6SerDe::write_column_to_arrow(const IColumn& column, const NullMap* null_map, + arrow::ArrayBuilder* array_builder, int start, + int end, const cctz::time_zone& ctz) const { + const auto& col_data = static_cast<const ColumnIPv6&>(column).get_data(); + auto& string_builder = assert_cast<arrow::StringBuilder&>(*array_builder); + for (size_t i = start; i < end; ++i) { + if (null_map && (*null_map)[i]) { + checkArrowStatus(string_builder.AppendNull(), column.get_name(), + array_builder->type()->name()); + } else { + std::string ipv6_str = IPv6Value::to_string(col_data[i]); + checkArrowStatus(string_builder.Append(ipv6_str.c_str(), ipv6_str.size()), + column.get_name(), array_builder->type()->name()); + } + } +} + +void DataTypeIPv6SerDe::read_column_from_arrow(IColumn& column, const arrow::Array* arrow_array, + int start, int end, + const cctz::time_zone& ctz) const { + auto& col_data = static_cast<ColumnIPv6&>(column).get_data(); + const auto* concrete_array = dynamic_cast<const arrow::StringArray*>(arrow_array); Review Comment: assert_cast? -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org