HappenLee commented on code in PR #42888:
URL: https://github.com/apache/doris/pull/42888#discussion_r1821836351


##########
be/src/vec/data_types/serde/data_type_bitmap_serde.cpp:
##########
@@ -52,17 +53,17 @@ Status 
DataTypeBitMapSerDe::deserialize_one_cell_from_json(IColumn& column, Slic
     return Status::OK();
 }
 
-Status DataTypeBitMapSerDe::write_column_to_pb(const IColumn& column, PValues& 
result, int start,
-                                               int end) const {
+Status DataTypeBitMapSerDe::write_column_to_pb(const IColumn& column, PValues& 
result,
+                                               int64_t start, int64_t end) 
const {
     auto ptype = result.mutable_type();
     ptype->set_id(PGenericType::BITMAP);
     auto& data_column = assert_cast<const ColumnBitmap&>(column);
-    int row_count = end - start;
+    auto row_count = cast_set<int>(end - start);

Review Comment:
   why here need cast ?  use int64_t?



##########
be/src/vec/data_types/serde/data_type_bitmap_serde.cpp:
##########
@@ -81,12 +82,12 @@ Status DataTypeBitMapSerDe::read_column_from_pb(IColumn& 
column, const PValues&
 
 void DataTypeBitMapSerDe::write_one_cell_to_jsonb(const IColumn& column, 
JsonbWriter& result,
                                                   Arena* mem_pool, int32_t 
col_id,
-                                                  int row_num) const {
+                                                  int64_t row_num) const {
     auto& data_column = assert_cast<const ColumnBitmap&>(column);
-    result.writeKey(col_id);
+    result.writeKey(cast_set<JsonbKeyValue::keyid_type>(col_id));
     auto bitmap_value = 
const_cast<BitmapValue&>(data_column.get_element(row_num));
     // serialize the content of string
-    auto size = bitmap_value.getSizeInBytes();
+    auto size = cast_set<uint32_t>(bitmap_value.getSizeInBytes());

Review Comment:
   why here need cast  ? if the byte over uint32_t is a danger behaviror



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