emkornfield commented on a change in pull request #10856: URL: https://github.com/apache/arrow/pull/10856#discussion_r681384803
########## File path: format/ComputeIR.fbs ########## @@ -0,0 +1,521 @@ +/// 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. + +/// Arrow Compute IR (Intermediate Representation) +/// +/// The purpose of these data structures is to provide a language- and compute +/// engine-agnostic representation of common analytical operations on Arrow +/// data. This may include so-called "logical query plans" generated by SQL +/// systems, but it can be used to serialize different types of expression or +/// query fragments for various purposes. For example, a system could use this +/// to serialize array expressions for transmitting filters/predicates. +/// +/// The three main types of data objects dealt with in this IR are: +/// +/// * Table: a data source having an Arrow schema, resolvable algebraically to +/// a collection of Arrow record batches +/// * Array: logically, a field in a Table +/// * Scalar: a single value, which is broadcastable to Array as needed +/// +/// This IR specifically does not provide for query planning or physical +/// execution details. It also aims to be as comprehensive as possible in +/// capturing compute operations expressible in different query engines or data +/// frame libraries. Engines are not expected to implement everything here. +/// +/// One of the most common areas of divergence in query engines are the names +/// and semantics of functions that operation on scalar or array +/// inputs. Efforts to standardize function names and their expected semantics +/// will happen outside of the serialized IR format defined here. + +// We use the IPC Schema types to represent data typesa +include "Schema.fbs"; + +namespace org.apache.arrow.flatbuf.computeir; + +/// ---------------------------------------------------------------------- +/// Data serialization for literal (constant / scalar) values. This assumes +/// that the consumer has basic knowledge of the Arrow format and data types +/// such that the binary scalar data that is encoded here can be unpacked into +/// an appropriate literal value object. For example, if the Type for a Literal +/// is FloatingPoint with Precision::DOUBLE, then we would expect to have a +/// PrimitiveLiteralData with an 8-byte value. Review comment: nit: is it worth mentioning endianness? -- 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]
