1. A computer-implemented method, comprising: receiving a hierarchical document to be processed by a pipeline of transformations; determining whether a next downstream transformation accesses content of each schema node in an associated input schema, wherein the input schema is a polymorphic schema; in response to determining that the next downstream transformation is not accessing the content of each schema node in the associated input schema, collecting data items corresponding to each schema node that the next downstream transformation is not accessing into a single compressed event; and passing the collected items to the next downstream transformation as the single compressed event.