Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
type_fwd.h
Go to the documentation of this file.
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 #ifndef ARROW_TYPE_FWD_H
19 #define ARROW_TYPE_FWD_H
20 
21 #include <memory>
22 
23 #include "arrow/util/visibility.h"
24 
25 namespace arrow {
26 
27 class Status;
28 
29 class DataType;
30 class Array;
31 class ArrayBuilder;
32 class Field;
33 class Tensor;
34 
35 class Buffer;
36 class MemoryPool;
37 class RecordBatch;
38 class Schema;
39 
40 class DictionaryType;
41 class DictionaryArray;
42 
43 class NullType;
44 class NullArray;
45 class NullBuilder;
46 
47 class BooleanType;
48 class BooleanArray;
49 class BooleanBuilder;
50 
51 class BinaryType;
52 class BinaryArray;
53 class BinaryBuilder;
54 
55 class FixedSizeBinaryType;
56 class FixedSizeBinaryArray;
57 class FixedSizeBinaryBuilder;
58 
59 class StringType;
60 class StringArray;
61 class StringBuilder;
62 
63 class ListType;
64 class ListArray;
65 class ListBuilder;
66 
67 class StructType;
68 class StructArray;
69 class StructBuilder;
70 
71 class DecimalType;
72 class DecimalArray;
73 class DecimalBuilder;
74 
75 class UnionType;
76 class UnionArray;
77 
78 template <typename TypeClass>
79 class NumericArray;
80 
81 template <typename TypeClass>
82 class NumericBuilder;
83 
84 template <typename TypeClass>
86 
87 #define _NUMERIC_TYPE_DECL(KLASS) \
88  class KLASS##Type; \
89  using KLASS##Array = NumericArray<KLASS##Type>; \
90  using KLASS##Builder = NumericBuilder<KLASS##Type>; \
91  using KLASS##Tensor = NumericTensor<KLASS##Type>;
92 
93 _NUMERIC_TYPE_DECL(Int8);
94 _NUMERIC_TYPE_DECL(Int16);
95 _NUMERIC_TYPE_DECL(Int32);
96 _NUMERIC_TYPE_DECL(Int64);
97 _NUMERIC_TYPE_DECL(UInt8);
98 _NUMERIC_TYPE_DECL(UInt16);
99 _NUMERIC_TYPE_DECL(UInt32);
100 _NUMERIC_TYPE_DECL(UInt64);
101 _NUMERIC_TYPE_DECL(HalfFloat);
102 _NUMERIC_TYPE_DECL(Float);
103 _NUMERIC_TYPE_DECL(Double);
104 
105 #undef _NUMERIC_TYPE_DECL
106 
107 class Date64Type;
110 
111 class Date32Type;
114 
115 class Time32Type;
118 
119 class Time64Type;
122 
123 class TimestampType;
126 
127 class IntervalType;
129 
130 // ----------------------------------------------------------------------
131 // (parameter-free) Factory functions
132 
133 std::shared_ptr<DataType> ARROW_EXPORT null();
134 std::shared_ptr<DataType> ARROW_EXPORT boolean();
135 std::shared_ptr<DataType> ARROW_EXPORT int8();
136 std::shared_ptr<DataType> ARROW_EXPORT int16();
137 std::shared_ptr<DataType> ARROW_EXPORT int32();
138 std::shared_ptr<DataType> ARROW_EXPORT int64();
139 std::shared_ptr<DataType> ARROW_EXPORT uint8();
140 std::shared_ptr<DataType> ARROW_EXPORT uint16();
141 std::shared_ptr<DataType> ARROW_EXPORT uint32();
142 std::shared_ptr<DataType> ARROW_EXPORT uint64();
143 std::shared_ptr<DataType> ARROW_EXPORT float16();
144 std::shared_ptr<DataType> ARROW_EXPORT float32();
145 std::shared_ptr<DataType> ARROW_EXPORT float64();
146 std::shared_ptr<DataType> ARROW_EXPORT utf8();
147 std::shared_ptr<DataType> ARROW_EXPORT binary();
148 
149 std::shared_ptr<DataType> ARROW_EXPORT date32();
150 std::shared_ptr<DataType> ARROW_EXPORT date64();
151 std::shared_ptr<DataType> ARROW_EXPORT decimal_type(int precision, int scale);
152 
153 } // namespace arrow
154 
155 #endif // ARROW_TYPE_FWD_H
Definition: array.h:339
std::shared_ptr< DataType > date64()
std::shared_ptr< DataType > int16()
std::shared_ptr< DataType > uint8()
std::shared_ptr< DataType > binary()
Definition: type_fwd.h:85
Date as int64_t milliseconds since UNIX epoch.
Definition: type.h:580
std::shared_ptr< DataType > uint16()
std::shared_ptr< DataType > int32()
std::shared_ptr< DataType > uint32()
Base class for all Builders that emit an Array of a scalar numerical type.
Definition: builder.h:254
std::shared_ptr< DataType > decimal_type(int precision, int scale)
std::shared_ptr< DataType > uint64()
std::shared_ptr< DataType > int8()
Definition: type.h:657
std::shared_ptr< DataType > float32()
std::shared_ptr< DataType > null()
Definition: type.h:684
std::shared_ptr< DataType > date32()
std::shared_ptr< DataType > int64()
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:29
std::shared_ptr< DataType > boolean()
Date as int32_t days since UNIX epoch.
Definition: type.h:563
std::shared_ptr< DataType > float64()
std::shared_ptr< DataType > utf8()
std::shared_ptr< DataType > float16()
Definition: type.h:642
Definition: type.h:627