MCPcopy Create free account
hub / github.com/apache/arrow / PrintTo

Function PrintTo

cpp/src/arrow/compute/exec.cc:84–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void PrintTo(const ExecBatch& batch, std::ostream* os) {
85 *os << "ExecBatch\n";
86
87 static const std::string indent = " ";
88
89 *os << indent << "# Rows: " << batch.length << "\n";
90 if (batch.guarantee != literal(true)) {
91 *os << indent << "Guarantee: " << batch.guarantee.ToString() << "\n";
92 }
93
94 int i = 0;
95 for (const Datum& value : batch.values) {
96 *os << indent << "" << i++ << ": ";
97
98 if (value.is_scalar()) {
99 *os << "Scalar[" << value.scalar()->ToString() << "]\n";
100 } else if (value.is_array() || value.is_chunked_array()) {
101 PrettyPrintOptions options;
102 options.skip_new_lines = true;
103 if (value.is_array()) {
104 auto array = value.make_array();
105 *os << "Array";
106 ARROW_CHECK_OK(PrettyPrint(*array, options, os));
107 } else {
108 auto array = value.chunked_array();
109 *os << "Chunked Array";
110 ARROW_CHECK_OK(PrettyPrint(*array, options, os));
111 }
112 *os << "\n";
113 } else {
114 ARROW_DCHECK(false);
115 }
116 }
117}
118
119int64_t ExecBatch::TotalBufferSize() const {
120 int64_t sum = 0;

Callers 1

ToStringMethod · 0.70

Calls 8

is_scalarMethod · 0.80
is_arrayMethod · 0.80
make_arrayMethod · 0.80
chunked_arrayMethod · 0.80
literalFunction · 0.70
PrettyPrintFunction · 0.50
ToStringMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected