pitrou commented on a change in pull request #7992: URL: https://github.com/apache/arrow/pull/7992#discussion_r472355484
########## File path: cpp/src/arrow/ipc/dictionary.h ########## @@ -21,34 +21,75 @@ #include <cstdint> #include <memory> -#include <unordered_map> #include <utility> #include <vector> -#include "arrow/memory_pool.h" +#include "arrow/result.h" #include "arrow/status.h" +#include "arrow/type_fwd.h" #include "arrow/util/macros.h" #include "arrow/util/visibility.h" namespace arrow { +namespace ipc { -class Array; -class DataType; -class Field; -class RecordBatch; +class FieldPosition { + public: + FieldPosition() : parent_(NULLPTR), index_(-1), depth_(0) {} Review comment: @bkietz The idea here is to keep track of the current position in a schema without allocating a `std::vector<int>` for each visited field, only when necessary (e.g. when a dictionary is encountered). What do you think? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org