Shekharrajak commented on code in PR #59432:
URL: https://github.com/apache/doris/pull/59432#discussion_r2757112136


##########
be/src/vec/exec/format/table/fluss_reader.cpp:
##########
@@ -0,0 +1,57 @@
+// 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.
+
+#include "vec/exec/format/table/fluss_reader.h"
+
+#include "common/logging.h"
+#include "common/status.h"
+#include "runtime/runtime_state.h"
+
+namespace doris::vectorized {
+#include "common/compile_check_begin.h"
+
+FlussReader::FlussReader(std::unique_ptr<GenericReader> file_format_reader,
+                         RuntimeProfile* profile, RuntimeState* state,
+                         const TFileScanRangeParams& params, const 
TFileRangeDesc& range,
+                         io::IOContext* io_ctx, FileMetaCache* meta_cache)
+        : TableFormatReader(std::move(file_format_reader), state, profile, 
params, range, io_ctx,
+                            meta_cache) {
+    // Log tier information for debugging
+    if (range.__isset.table_format_params && 
+        range.table_format_params.__isset.fluss_params) {
+        const auto& fluss_params = range.table_format_params.fluss_params;
+        LOG(INFO) << "FlussReader initialized for table: " 
+                  << fluss_params.database_name << "." << 
fluss_params.table_name
+                  << ", bucket: " << fluss_params.bucket_id
+                  << ", format: " << fluss_params.file_format
+                  << ", lake_snapshot_id: " << fluss_params.lake_snapshot_id
+                  << ", lake_files: " << (fluss_params.__isset.lake_file_paths 
? 
+                                          fluss_params.lake_file_paths.size() 
: 0);
+    }
+}
+
+Status FlussReader::get_next_block_inner(Block* block, size_t* read_rows, 
bool* eof) {
+    // For MVP, we read from lake tier (Parquet/ORC files) using the 
underlying reader.
+    // The FE has already determined which files to read based on the 
LakeSnapshot.
+    // Future phases will add support for LOG_ONLY and HYBRID tiers via JNI 
bridge.

Review Comment:
   We can also think of phasewise rollout : 
   
    Phase 1: MVP (Current)
   
    Doris BE → Parquet/ORC Reader → Lake Tier Files (S3/MinIO)
    -  Implemented
    - Only LAKE_ONLY tier support
   
    Phase 2: JNI Bridge (Planned)
   
    Doris BE -> JNI -> Java Fluss SDK -> Fluss TabletServer -> Log Tier Data
    - Will add LOG_ONLY and HYBRID tier support
    - Uses Java SDK - since that have more stable features
   
    Phase 3: Native Optimization (Future)
   
    Doris BE → fluss-cpp/Rust bindings → Fluss TabletServer
    - If/when C++ client reaches feature parity
    - Performance optimization path
    - Collaborate with fluss team to make cpp client with all the features 
required that we have for java SDK already implemented 
    



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

Reply via email to