Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
pretty_print.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_PRETTY_PRINT_H
19 #define ARROW_PRETTY_PRINT_H
20 
21 #include <ostream>
22 #include <string>
23 
24 #include "arrow/type_fwd.h"
25 #include "arrow/util/visibility.h"
26 
27 namespace arrow {
28 
29 class Array;
30 class Status;
31 
33  int indent;
34 };
35 
37 ARROW_EXPORT
38 Status PrettyPrint(const RecordBatch& batch, int indent, std::ostream* sink);
39 
41 ARROW_EXPORT
42 Status PrettyPrint(const Array& arr, int indent, std::ostream* sink);
43 
44 ARROW_EXPORT
45 Status PrettyPrint(const Schema& schema, const PrettyPrintOptions& options,
46  std::ostream* sink);
47 
48 ARROW_EXPORT
49 Status PrettyPrint(const Schema& schema, const PrettyPrintOptions& options,
50  std::string* result);
51 
52 ARROW_EXPORT
53 Status DebugPrint(const Array& arr, int indent);
54 
55 } // namespace arrow
56 
57 #endif // ARROW_PRETTY_PRINT_H
Collection of equal-length arrays matching a particular Schema.
Definition: table.h:118
Definition: status.h:106
Definition: pretty_print.h:32
int indent
Definition: pretty_print.h:33
Status DebugPrint(const Array &arr, int indent)
Sequence of arrow::Field objects describing the columns of a record batch or table data structure...
Definition: type.h:741
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:29
Array base type Immutable data array with some logical type and some length.
Definition: array.h:180
Status PrettyPrint(const RecordBatch &batch, int indent, std::ostream *sink)
Print human-readable representation of RecordBatch.
std::shared_ptr< Schema > schema(const std::vector< std::shared_ptr< Field >> &fields, const std::shared_ptr< const KeyValueMetadata > &metadata=NULLPTR)
Create a Schema instance.