Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
visitor.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_VISITOR_H
19 #define ARROW_VISITOR_H
20 
21 #include "arrow/status.h"
22 #include "arrow/type_fwd.h"
23 #include "arrow/util/visibility.h"
24 
25 namespace arrow {
26 
27 class ARROW_EXPORT ArrayVisitor {
28  public:
29  virtual ~ArrayVisitor() = default;
30 
31  virtual Status Visit(const NullArray& array);
32  virtual Status Visit(const BooleanArray& array);
33  virtual Status Visit(const Int8Array& array);
34  virtual Status Visit(const Int16Array& array);
35  virtual Status Visit(const Int32Array& array);
36  virtual Status Visit(const Int64Array& array);
37  virtual Status Visit(const UInt8Array& array);
38  virtual Status Visit(const UInt16Array& array);
39  virtual Status Visit(const UInt32Array& array);
40  virtual Status Visit(const UInt64Array& array);
41  virtual Status Visit(const HalfFloatArray& array);
42  virtual Status Visit(const FloatArray& array);
43  virtual Status Visit(const DoubleArray& array);
44  virtual Status Visit(const StringArray& array);
45  virtual Status Visit(const BinaryArray& array);
46  virtual Status Visit(const FixedSizeBinaryArray& array);
47  virtual Status Visit(const Date32Array& array);
48  virtual Status Visit(const Date64Array& array);
49  virtual Status Visit(const Time32Array& array);
50  virtual Status Visit(const Time64Array& array);
51  virtual Status Visit(const TimestampArray& array);
52  virtual Status Visit(const IntervalArray& array);
53  virtual Status Visit(const Decimal128Array& array);
54  virtual Status Visit(const ListArray& array);
55  virtual Status Visit(const StructArray& array);
56  virtual Status Visit(const UnionArray& array);
57  virtual Status Visit(const DictionaryArray& type);
58 };
59 
60 class ARROW_EXPORT TypeVisitor {
61  public:
62  virtual ~TypeVisitor() = default;
63 
64  virtual Status Visit(const NullType& type);
65  virtual Status Visit(const BooleanType& type);
66  virtual Status Visit(const Int8Type& type);
67  virtual Status Visit(const Int16Type& type);
68  virtual Status Visit(const Int32Type& type);
69  virtual Status Visit(const Int64Type& type);
70  virtual Status Visit(const UInt8Type& type);
71  virtual Status Visit(const UInt16Type& type);
72  virtual Status Visit(const UInt32Type& type);
73  virtual Status Visit(const UInt64Type& type);
74  virtual Status Visit(const HalfFloatType& type);
75  virtual Status Visit(const FloatType& type);
76  virtual Status Visit(const DoubleType& type);
77  virtual Status Visit(const StringType& type);
78  virtual Status Visit(const BinaryType& type);
79  virtual Status Visit(const FixedSizeBinaryType& type);
80  virtual Status Visit(const Date64Type& type);
81  virtual Status Visit(const Date32Type& type);
82  virtual Status Visit(const Time32Type& type);
83  virtual Status Visit(const Time64Type& type);
84  virtual Status Visit(const TimestampType& type);
85  virtual Status Visit(const IntervalType& type);
86  virtual Status Visit(const Decimal128Type& type);
87  virtual Status Visit(const ListType& type);
88  virtual Status Visit(const StructType& type);
89  virtual Status Visit(const UnionType& type);
90  virtual Status Visit(const DictionaryType& type);
91 };
92 
93 } // namespace arrow
94 
95 #endif // ARROW_VISITOR_H
Definition: type.h:469
Definition: array.h:566
Definition: array.h:369
Definition: type.h:364
Definition: type.h:316
Definition: type.h:378
Definition: array.h:397
Date as int64_t milliseconds since UNIX epoch.
Definition: type.h:581
Definition: status.h:93
Definition: type.h:328
Definition: type.h:658
Definition: type.h:340
Definition: type.h:291
Definition: type.h:421
Definition: visitor.h:60
Definition: type.h:303
Definition: type.h:685
Definition: type.h:385
Definition: type.h:458
Definition: visitor.h:27
Definition: array.h:543
Top-level namespace for Apache Arrow C++ API.
Definition: adapter.h:32
Definition: array.h:419
Definition: type.h:508
Definition: type.h:371
Definition: type.h:334
Definition: type.h:346
Date as int32_t days since UNIX epoch.
Definition: type.h:564
Definition: array.h:476
Definition: array.h:643
Definition: array.h:595
Definition: array.h:736
Definition: type.h:710
Definition: type.h:643
Definition: type.h:352
Definition: array.h:613
Definition: type.h:322
Definition: type.h:628
Definition: type.h:524
Definition: type.h:358
Definition: type.h:437
Degenerate null type Array.
Definition: array.h:326