Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
compare.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 // Functions for comparing Arrow data structures
19 
20 #ifndef ARROW_COMPARE_H
21 #define ARROW_COMPARE_H
22 
23 #include <cstdint>
24 
25 #include "arrow/util/visibility.h"
26 
27 namespace arrow {
28 
29 class Array;
30 class DataType;
31 class Status;
32 class Tensor;
33 
35 bool ARROW_EXPORT ArrayEquals(const Array& left, const Array& right);
36 
37 bool ARROW_EXPORT TensorEquals(const Tensor& left, const Tensor& right);
38 
41 bool ARROW_EXPORT ArrayApproxEquals(const Array& left, const Array& right);
42 
44 bool ARROW_EXPORT ArrayRangeEquals(const Array& left, const Array& right,
45  int64_t start_idx, int64_t end_idx,
46  int64_t other_start_idx);
47 
49 bool ARROW_EXPORT TypeEquals(const DataType& left, const DataType& right);
50 
51 } // namespace arrow
52 
53 #endif // ARROW_COMPARE_H
bool ArrayApproxEquals(const Array &left, const Array &right)
Returns true if the arrays are approximately equal.
bool TypeEquals(const DataType &left, const DataType &right)
Returns true if the type metadata are exactly equal.
bool ArrayEquals(const Array &left, const Array &right)
Returns true if the arrays are exactly equal.
Top-level namespace for Apache Arrow C++ API.
Definition: adapter.h:32
bool ArrayRangeEquals(const Array &left, const Array &right, int64_t start_idx, int64_t end_idx, int64_t other_start_idx)
Returns true if indicated equal-length segment of arrays is exactly equal.
bool TensorEquals(const Tensor &left, const Tensor &right)