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

Method Inspect

r/src/altrep.cpp:129–147  ·  view source on GitHub ↗

What gets printed on .Internal(inspect( ))

Source from the content-addressed store, hash-verified

127
128 // What gets printed on .Internal(inspect(<the altrep object>))
129 static Rboolean Inspect(SEXP alt, int pre, int deep, int pvec,
130 void (*inspect_subtree)(SEXP, int, int, int)) {
131 SEXP class_sym = R_altrep_class_name(alt);
132 const char* class_name = CHAR(PRINTNAME(class_sym));
133
134 if (IsMaterialized(alt)) {
135 Rprintf("materialized %s len=%ld\n", class_name,
136 static_cast<long>(Rf_xlength(Representation(alt)))); // NOLINT: runtime/int
137 } else {
138 const auto& chunked_array = GetChunkedArray(alt);
139 Rprintf("%s<%p, %s, %d chunks, %ld nulls> len=%ld\n", class_name,
140 reinterpret_cast<void*>(chunked_array.get()),
141 chunked_array->type()->ToString().c_str(), chunked_array->num_chunks(),
142 static_cast<long>(chunked_array->null_count()), // NOLINT: runtime/int
143 static_cast<long>(chunked_array->length())); // NOLINT: runtime/int
144 }
145
146 return TRUE;
147 }
148
149 // Materialize and then duplicate data2
150 static SEXP Duplicate(SEXP alt, Rboolean /* deep */) {

Calls 7

R_altrep_class_nameFunction · 0.85
getMethod · 0.45
ToStringMethod · 0.45
typeMethod · 0.45
num_chunksMethod · 0.45
null_countMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected