chaoyli commented on a change in pull request #3734:
URL: https://github.com/apache/incubator-doris/pull/3734#discussion_r433597310



##########
File path: be/src/olap/memory/mem_tablet_scan.h
##########
@@ -0,0 +1,82 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include "olap/memory/common.h"
+#include "olap/memory/row_block.h"
+#include "olap/memory/schema.h"
+
+namespace doris {
+namespace memory {
+
+class ScanSpec {
+public:
+    ScanSpec(vector<std::string>&& columns, uint64_t version = UINT64_MAX,
+             uint64_t limit = UINT64_MAX)
+            : _version(version), _limit(limit), _columns(std::move(columns)) {}
+
+    uint64_t version() const { return _version; }
+
+    uint64_t limit() const { return _limit; }
+
+    const vector<std::string> columns() const { return _columns; }
+
+private:
+    friend class MemTablet;
+
+    uint64_t _version = UINT64_MAX;
+    uint64_t _limit = UINT64_MAX;

Review comment:
       What's the use of _limit?

##########
File path: be/src/olap/memory/mem_tablet.h
##########
@@ -79,6 +81,8 @@ class MemTablet : public BaseTablet {
 
     std::mutex _write_lock;
 
+    std::atomic<uint64_t> _latest_version;

Review comment:
       use max_version may be better.

##########
File path: be/src/olap/base_tablet.cpp
##########
@@ -44,11 +43,13 @@ OLAPStatus BaseTablet::set_tablet_state(TabletState state) {
 }
 
 void BaseTablet::_gen_tablet_path() {
-    std::string path = _data_dir->path() + DATA_PREFIX;
-    path = path_util::join_path_segments(path, 
std::to_string(_tablet_meta->shard_id()));
-    path = path_util::join_path_segments(path, 
std::to_string(_tablet_meta->tablet_id()));
-    path = path_util::join_path_segments(path, 
std::to_string(_tablet_meta->schema_hash()));
-    _tablet_path = path;
+    if (_data_dir != nullptr) {

Review comment:
       In what situation, _data_dir is nullptr?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to