amorynan commented on code in PR #39258:
URL: https://github.com/apache/doris/pull/39258#discussion_r1714621373


##########
be/src/vec/data_types/serde/data_type_ipv6_serde.cpp:
##########
@@ -68,6 +68,28 @@ Status DataTypeIPv6SerDe::write_column_to_mysql(const 
IColumn& column,
     return _write_column_to_mysql(column, row_buffer, row_idx, col_const, 
options);
 }
 
+void DataTypeIPv6SerDe::read_one_cell_from_jsonb(IColumn& column, const 
JsonbValue* arg) const {
+    IPv6 val = 0;
+    const auto* str_value = static_cast<const JsonbStringVal*>(arg);
+    ReadBuffer rb(reinterpret_cast<const unsigned char*>(str_value->getBlob()),
+                  str_value->getBlobLen());
+    if (!read_ipv6_text_impl(val, rb)) {
+        throw doris::Exception(ErrorCode::INVALID_ARGUMENT, "parse ipv6 fail, 
string: '{}'",
+                               rb.to_string());
+    }
+    assert_cast<ColumnIPv6&>(column).insert_value(val);
+}
+
+void DataTypeIPv6SerDe::write_one_cell_to_jsonb(const IColumn& column,
+                                                JsonbWriterT<JsonbOutStream>& 
result,
+                                                Arena* mem_pool, int col_id, 
int row_num) const {
+    // we make ipv6 as string in jsonb

Review Comment:
   yes jsonb has not support uint128_t



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

Reply via email to