TsukiokaKogane commented on code in PR #63850:
URL: https://github.com/apache/doris/pull/63850#discussion_r3385398786
##########
be/src/exec/scan/olap_scanner.cpp:
##########
@@ -307,6 +313,54 @@ Status OlapScanner::_open_impl(RuntimeState* state) {
return Status::OK();
}
+Status OlapScanner::_init_row_binlog_tso_predicates() {
+ if (_tablet_reader_params.reader_type != ReaderType::READER_BINLOG) {
+ return Status::OK();
+ }
+
+ if (!_start_tso.has_value() && !_end_tso.has_value()) {
+ return Status::OK();
+ }
+
+ auto& tablet_schema = _tablet_reader_params.tablet_schema;
+ int32_t tso_index =
tablet_schema->field_index(std::string(kRowBinlogTimestampColName));
+ if (tso_index < 0) {
+ auto source_tablet_schema =
_tablet_reader_params.tablet->row_binlog_tablet_schema();
+ const int32_t source_tso_index =
+
source_tablet_schema->field_index(std::string(kRowBinlogTimestampColName));
+ if (source_tso_index < 0) {
+ return Status::InternalError("Column {} not found in tablet
schema",
+
std::string(kRowBinlogTimestampColName));
+ }
+
tablet_schema->append_column(TabletColumn(source_tablet_schema->column(source_tso_index)));
+ tso_index =
tablet_schema->field_index(std::string(kRowBinlogTimestampColName));
+ }
+ if (tso_index < 0) {
+ return Status::InternalError("Column {} not found in tablet schema
after append",
+ std::string(kRowBinlogTimestampColName));
+ }
+
+ auto data_type = std::make_shared<DataTypeInt64>();
+ if (_start_tso.has_value()) {
Review Comment:
因为每个partition会不一样
--
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]