zhannngchen commented on code in PR #16832:
URL: https://github.com/apache/doris/pull/16832#discussion_r1109384263
##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -389,6 +388,22 @@ std::string SegmentWriter::_full_encode_keys(
return encoded_keys;
}
+void SegmentWriter::_encode_seq_column(const
vectorized::IOlapColumnDataAccessor* seq_column,
+ size_t pos, string* encoded_keys) {
+ auto field = seq_column->get_data_at(pos);
+ // To facilitate the use of the primary key index, encode the seq column
+ // to the minimum value of the corresponding length when the seq column
+ // is null
+ if (UNLIKELY(!field)) {
+ encoded_keys->push_back(KEY_NULL_FIRST_MARKER);
+ size_t seq_col_length =
_tablet_schema->column(_tablet_schema->sequence_col_idx()).length();
+ encoded_keys->append(seq_col_length, KEY_MINIMAL_MARKER);
Review Comment:
if the sequence columns is type of INT, is it work well if user set negative
values?
--
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]