emkornfield commented on a change in pull request #11646: URL: https://github.com/apache/arrow/pull/11646#discussion_r755417706
########## File path: format/ColumnBag.fbs ########## @@ -0,0 +1,63 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/// EXPERIMENTAL: A less restrictive version of RecordBatch that can +/// reduce wire overhead for small messages + +include "Schema.fbs"; + +namespace org.apache.arrow.flatbuf; + +/// ---------------------------------------------------------------------- +/// Data structures to represent a bag of columns (a collection of +/// possibly differing length Arrow arrays) + +/// A range of top level field nodes, identified by their ordering in the +/// schema. The offsets are zero-indexed, but only top level field nodes are +/// counted; it is impossible to refer to a child node anywhere in the schema. +struct FieldNodeRange { + /// The starting offset (inclusive) + start: long; + + /// The ending offset (exclusive) + end: long; +} + +/// A data header describing the shared memory layout of a "bag" of "columns". +/// It is similar to a RecordBatch but not every top level node is required +/// to be included in the wire payload. +table ColumnBag { + /// If not provided, all nodes are included and this payload is identical + /// to a RecordBatch. Otherwise the reader needs to skip top level FieldNodes + /// (and the parallel Buffers) that were not included. Note that ranges must + /// be listed in strictly increasing order and be non-overlapping. + includedNodes: [FieldNodeRange]; + + /// Nodes correspond to the pre-ordered flattened logical schema Review comment: For top-level field nodes are they going to be allowed to have separate lengths? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
