Skip to content

Commit b931828

Browse files
rootroot
authored andcommitted
[fix](binlog) Fix nullable type mismatch for timestamp column in _fill_binlog_columns
1 parent 1316d4b commit b931828

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

be/src/storage/segment/row_binlog_segment_writer.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,13 @@ Status RowBinlogSegmentWriter::_fill_binlog_columns(size_t num_rows,
331331
// (SegmentIterator::_update_tso_col_if_needed), so its on-disk value is never used.
332332
// Write a NULL placeholder.
333333
IColumn* ts_col_ptr = binlog_prefix_columns[2].get();
334-
auto* ts_nullable_column = assert_cast<ColumnNullable*>(ts_col_ptr);
335-
ts_nullable_column->insert_many_defaults(num_rows); // NULL placeholder (value + null map)
334+
auto* ts_nullable_column = check_and_get_column<ColumnNullable>(ts_col_ptr);
335+
if (ts_nullable_column != nullptr) {
336+
ts_nullable_column->insert_many_defaults(
337+
num_rows); // NULL placeholder (value + null map)
338+
} else {
339+
ts_col_ptr->insert_many_defaults(num_rows);
340+
}
336341

337342
// finally update null map for op column (timestamp null map set by insert_many_defaults)
338343
for (int i = 0; i < num_rows; i++) {

0 commit comments

Comments
 (0)