OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataPreview.h
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 
17 #pragma once
18 
19 #include <optional>
20 #include <string>
21 #include <vector>
22 
23 #include "Shared/sqltypes.h"
24 
25 namespace foreign_storage {
26 using SampleRows = std::vector<std::vector<std::string>>;
27 struct DataPreview {
28  std::vector<std::string> column_names;
29  std::vector<SQLTypeInfo> column_types;
32 };
33 
34 std::optional<SQLTypes> detect_geo_type(const SampleRows& sample_rows,
35  size_t column_index);
36 
37 } // namespace foreign_storage
std::optional< SQLTypes > detect_geo_type(const SampleRows &sample_rows, size_t column_index)
Definition: DataPreview.cpp:22
std::vector< std::string > column_names
Definition: DataPreview.h:28
std::vector< SQLTypeInfo > column_types
Definition: DataPreview.h:29
std::vector< std::vector< std::string >> SampleRows
Definition: DataPreview.h:26
Constants for Builtin SQL Types supported by HEAVY.AI.