be/src/format/table/paimon_jni_reader.h
Line | Count | Source |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <cstddef> |
21 | | #include <string> |
22 | | #include <unordered_map> |
23 | | #include <unordered_set> |
24 | | #include <vector> |
25 | | |
26 | | #include "common/status.h" |
27 | | #include "format/jni/jni_reader.h" |
28 | | #include "storage/olap_scan_common.h" |
29 | | |
30 | | namespace doris { |
31 | | class RuntimeProfile; |
32 | | class RuntimeState; |
33 | | class SlotDescriptor; |
34 | | class Block; |
35 | | } // namespace doris |
36 | | |
37 | | namespace doris { |
38 | | #include "common/compile_check_begin.h" |
39 | | /** |
40 | | * The demo usage of JniReader, showing how to read data from java scanner. |
41 | | * The java side is also a mock reader that provide values for each type. |
42 | | * This class will only be retained during the functional testing phase to verify that |
43 | | * the communication and data exchange with the jvm are correct. |
44 | | */ |
45 | | class PaimonJniReader : public JniReader { |
46 | | ENABLE_FACTORY_CREATOR(PaimonJniReader); |
47 | | |
48 | | public: |
49 | | static const std::string PAIMON_OPTION_PREFIX; |
50 | | static const std::string HADOOP_OPTION_PREFIX; |
51 | | PaimonJniReader(const std::vector<SlotDescriptor*>& file_slot_descs, RuntimeState* state, |
52 | | RuntimeProfile* profile, const TFileRangeDesc& range, |
53 | | const TFileScanRangeParams* range_params); |
54 | | |
55 | 0 | ~PaimonJniReader() override = default; |
56 | | |
57 | | Status get_next_block(Block* block, size_t* read_rows, bool* eof) override; |
58 | | |
59 | | Status init_reader(); |
60 | | |
61 | | private: |
62 | | int64_t _remaining_table_level_row_count; |
63 | | }; |
64 | | |
65 | | #include "common/compile_check_end.h" |
66 | | } // namespace doris |