OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CsvFileBufferParser.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 OmniSci, 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 
17 #pragma once
18 
20 
21 namespace foreign_storage {
23  public:
25  bool convert_data_blocks,
26  bool columns_are_pre_filtered = false) const override;
27 
29  const ForeignTable* foreign_table) const override;
30 
31  size_t findRowEndPosition(size_t& alloc_size,
32  std::unique_ptr<char[]>& buffer,
33  size_t& buffer_size,
34  const import_export::CopyParams& copy_params,
35  const size_t buffer_first_row_index,
36  unsigned int& num_rows_in_buffer,
37  foreign_storage::FileReader* file_reader) const override;
38 
39  void validateExpectedColumnCount(const std::string& row,
40  const import_export::CopyParams& copy_params,
41  size_t num_cols,
42  int point_cols,
43  const std::string& file_name) const;
44 
45  void validateFiles(const FileReader* file_reader,
46  const ForeignTable* foreign_table) const override{};
47 };
48 } // namespace foreign_storage
ParseBufferResult parseBuffer(ParseBufferRequest &request, bool convert_data_blocks, bool columns_are_pre_filtered=false) const override
size_t findRowEndPosition(size_t &alloc_size, std::unique_ptr< char[]> &buffer, size_t &buffer_size, const import_export::CopyParams &copy_params, const size_t buffer_first_row_index, unsigned int &num_rows_in_buffer, foreign_storage::FileReader *file_reader) const override
import_export::CopyParams validateAndGetCopyParams(const ForeignTable *foreign_table) const override
void validateExpectedColumnCount(const std::string &row, const import_export::CopyParams &copy_params, size_t num_cols, int point_cols, const std::string &file_name) const
void validateFiles(const FileReader *file_reader, const ForeignTable *foreign_table) const override