forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvisitor.cc
More file actions
101 lines (89 loc) · 3.35 KB
/
Copy pathvisitor.cc
File metadata and controls
101 lines (89 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#include "arrow/visitor.h"
#include <memory>
#include "arrow/array.h"
#include "arrow/status.h"
#include "arrow/type.h"
namespace arrow {
#define ARRAY_VISITOR_DEFAULT(ARRAY_CLASS) \
Status ArrayVisitor::Visit(const ARRAY_CLASS& array) { \
return Status::NotImplemented(array.type()->ToString()); \
}
ARRAY_VISITOR_DEFAULT(NullArray);
ARRAY_VISITOR_DEFAULT(BooleanArray);
ARRAY_VISITOR_DEFAULT(Int8Array);
ARRAY_VISITOR_DEFAULT(Int16Array);
ARRAY_VISITOR_DEFAULT(Int32Array);
ARRAY_VISITOR_DEFAULT(Int64Array);
ARRAY_VISITOR_DEFAULT(UInt8Array);
ARRAY_VISITOR_DEFAULT(UInt16Array);
ARRAY_VISITOR_DEFAULT(UInt32Array);
ARRAY_VISITOR_DEFAULT(UInt64Array);
ARRAY_VISITOR_DEFAULT(HalfFloatArray);
ARRAY_VISITOR_DEFAULT(FloatArray);
ARRAY_VISITOR_DEFAULT(DoubleArray);
ARRAY_VISITOR_DEFAULT(BinaryArray);
ARRAY_VISITOR_DEFAULT(StringArray);
ARRAY_VISITOR_DEFAULT(FixedSizeBinaryArray);
ARRAY_VISITOR_DEFAULT(Date32Array);
ARRAY_VISITOR_DEFAULT(Date64Array);
ARRAY_VISITOR_DEFAULT(Time32Array);
ARRAY_VISITOR_DEFAULT(Time64Array);
ARRAY_VISITOR_DEFAULT(TimestampArray);
ARRAY_VISITOR_DEFAULT(IntervalArray);
ARRAY_VISITOR_DEFAULT(ListArray);
ARRAY_VISITOR_DEFAULT(StructArray);
ARRAY_VISITOR_DEFAULT(UnionArray);
ARRAY_VISITOR_DEFAULT(DictionaryArray);
ARRAY_VISITOR_DEFAULT(DecimalArray);
#undef ARRAY_VISITOR_DEFAULT
// ----------------------------------------------------------------------
// Default implementations of TypeVisitor methods
#define TYPE_VISITOR_DEFAULT(TYPE_CLASS) \
Status TypeVisitor::Visit(const TYPE_CLASS& type) { \
return Status::NotImplemented(type.ToString()); \
}
TYPE_VISITOR_DEFAULT(NullType);
TYPE_VISITOR_DEFAULT(BooleanType);
TYPE_VISITOR_DEFAULT(Int8Type);
TYPE_VISITOR_DEFAULT(Int16Type);
TYPE_VISITOR_DEFAULT(Int32Type);
TYPE_VISITOR_DEFAULT(Int64Type);
TYPE_VISITOR_DEFAULT(UInt8Type);
TYPE_VISITOR_DEFAULT(UInt16Type);
TYPE_VISITOR_DEFAULT(UInt32Type);
TYPE_VISITOR_DEFAULT(UInt64Type);
TYPE_VISITOR_DEFAULT(HalfFloatType);
TYPE_VISITOR_DEFAULT(FloatType);
TYPE_VISITOR_DEFAULT(DoubleType);
TYPE_VISITOR_DEFAULT(StringType);
TYPE_VISITOR_DEFAULT(BinaryType);
TYPE_VISITOR_DEFAULT(FixedSizeBinaryType);
TYPE_VISITOR_DEFAULT(Date64Type);
TYPE_VISITOR_DEFAULT(Date32Type);
TYPE_VISITOR_DEFAULT(Time32Type);
TYPE_VISITOR_DEFAULT(Time64Type);
TYPE_VISITOR_DEFAULT(TimestampType);
TYPE_VISITOR_DEFAULT(IntervalType);
TYPE_VISITOR_DEFAULT(DecimalType);
TYPE_VISITOR_DEFAULT(ListType);
TYPE_VISITOR_DEFAULT(StructType);
TYPE_VISITOR_DEFAULT(UnionType);
TYPE_VISITOR_DEFAULT(DictionaryType);
#undef TYPE_VISITOR_DEFAULT
} // namespace arrow