OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TypedParquetDetectBuffer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 namespace foreign_storage {
20 
22 
24  int8_t* const destination,
25  const size_t num_bytes,
26  const size_t offset,
27  const Data_Namespace::MemoryLevel destination_buffer_type,
28  const int destination_device_id) {
29  UNREACHABLE();
30 }
31 
32 void TypedParquetDetectBuffer::reserve(size_t additional_num_bytes) {
33  UNREACHABLE();
34 }
35 
37  int8_t* source,
38  const size_t num_bytes,
39  const Data_Namespace::MemoryLevel source_buffer_type,
40  const int device_id) {
42  auto strings = data_to_string_converter_->convert(source, num_bytes);
43  buffer_.insert(buffer_.end(), strings.begin(), strings.end());
44 }
45 
47  UNREACHABLE();
48  return {};
49 }
50 
52  UNREACHABLE();
53  return 0;
54 }
55 
57  UNREACHABLE();
59 }
60 
61 void TypedParquetDetectBuffer::write(int8_t* source,
62  const size_t num_bytes,
63  const size_t offset,
64  const Data_Namespace::MemoryLevel source_buffer_type,
65  const int source_device_id) {
66  UNREACHABLE();
67 }
68 
70  UNREACHABLE();
71  return 0; // Added to avoid "no return statement" compiler warning
72 }
73 
75  UNREACHABLE();
76  return 0; // Added to avoid "no return statement" compiler warning
77 }
78 
79 void TypedParquetDetectBuffer::reserveNumElements(size_t additional_num_elements) {
80  buffer_.reserve(buffer_.size() + additional_num_elements);
81 }
82 
83 } // namespace foreign_storage
std::unique_ptr< AbstractDataTypeToStringConverter > data_to_string_converter_
#define UNREACHABLE()
Definition: Logger.h:266
void append(int8_t *source, const size_t num_bytes, const Data_Namespace::MemoryLevel source_buffer_type=Data_Namespace::CPU_LEVEL, const int device_id=-1) override
void reserveNumElements(size_t additional_num_elements)
void write(int8_t *source, const size_t num_bytes, const size_t offset=0, const Data_Namespace::MemoryLevel source_buffer_type=Data_Namespace::CPU_LEVEL, const int source_device_id=-1) override
Data_Namespace::MemoryLevel getType() const override
void reserve(size_t additional_num_bytes) override
void read(int8_t *const destination, const size_t num_bytes, const size_t offset=0, const Data_Namespace::MemoryLevel destination_buffer_type=Data_Namespace::CPU_LEVEL, const int destination_device_id=-1) override
#define CHECK(condition)
Definition: Logger.h:222