github-actions[bot] commented on code in PR #16731:
URL: https://github.com/apache/doris/pull/16731#discussion_r1112933467
##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -116,35 +118,46 @@ Status BetaRowsetWriter::add_block(const
vectorized::Block* block) {
return _add_block(block, &_segment_writer);
}
-RowwiseIteratorUPtr BetaRowsetWriter::_get_segcompaction_reader(
- SegCompactionCandidatesSharedPtr segments, std::shared_ptr<Schema>
schema,
- OlapReaderStatistics* stat, uint64_t* merged_row_stat) {
+std::unique_ptr<vectorized::VerticalBlockReader>
BetaRowsetWriter::_get_segcompaction_reader(
Review Comment:
warning: method '_get_segcompaction_reader' can be made const
[readability-make-member-function-const]
be/src/olap/rowset/beta_rowset_writer.cpp:124:
```diff
- std::vector<uint32_t>& return_columns) {
+ std::vector<uint32_t>& return_columns) const {
```
```suggestion
std::vector<uint32_t>& return_columns) const;
```
##########
be/test/olap/segcompaction_test.cpp:
##########
@@ -184,6 +186,27 @@
rowset_writer_context->tablet_schema = tablet_schema;
rowset_writer_context->version.first = 10;
rowset_writer_context->version.second = 10;
+
+#if 0
+ TCreateTabletReq req;
+ req.table_id =
+ req.tablet_id =
+ req.tablet_scheme =
+ req.partition_id =
+ l_engine->create_tablet(req);
+ rowset_writer_context->tablet =
l_engine->tablet_manager()->get_tablet(TTabletId tablet_id);
+#endif
+ std::shared_ptr<DataDir> data_dir =
std::make_shared<DataDir>(lTestDir);
+ TabletMetaSharedPtr tablet_meta = std::make_shared<TabletMeta>();
+ tablet_meta->_tablet_id = 1;
+ tablet_meta->_schema = tablet_schema;
Review Comment:
warning: '_schema' is a private member of 'doris::TabletMeta'
[clang-diagnostic-error]
```cpp
tablet_meta->_schema = tablet_schema;
^
```
**be/src/olap/tablet_meta.h:229:** declared private here
```cpp
TabletSchemaSPtr _schema;
^
```
##########
be/test/olap/segcompaction_test.cpp:
##########
@@ -184,6 +186,27 @@ class SegCompactionTest : public testing::Test {
rowset_writer_context->tablet_schema = tablet_schema;
rowset_writer_context->version.first = 10;
rowset_writer_context->version.second = 10;
+
+#if 0
+ TCreateTabletReq req;
+ req.table_id =
+ req.tablet_id =
+ req.tablet_scheme =
+ req.partition_id =
+ l_engine->create_tablet(req);
+ rowset_writer_context->tablet =
l_engine->tablet_manager()->get_tablet(TTabletId tablet_id);
+#endif
+ std::shared_ptr<DataDir> data_dir =
std::make_shared<DataDir>(lTestDir);
+ TabletMetaSharedPtr tablet_meta = std::make_shared<TabletMeta>();
+ tablet_meta->_tablet_id = 1;
Review Comment:
warning: '_tablet_id' is a private member of 'doris::TabletMeta'
[clang-diagnostic-error]
```cpp
tablet_meta->_tablet_id = 1;
^
```
**be/src/olap/tablet_meta.h:217:** declared private here
```cpp
int64_t _tablet_id = 0;
^
```
--
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]