cpcloud commented on a change in pull request #10934: URL: https://github.com/apache/arrow/pull/10934#discussion_r712390903
########## File path: experimental/computeir/Relation.fbs ########## @@ -0,0 +1,209 @@ +// 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. + +include "../../format/Schema.fbs"; +include "Literal.fbs"; +include "Expression.fbs"; + +namespace org.apache.arrow.computeir.flatbuf; + +/// A data type indicating that a different mapping of columns +/// should occur in the output. +/// +/// For example: +/// +/// Given a query `SELECT b, a FROM t` where `t` has columns a, b, c +/// the mapping value for the projection would equal [1, 0]. +table Remap { + mapping: [uint32] (required); +} + +// Pass through indicates that no output remapping should occur. +table PassThrough {} + +/// A union for the different colum remapping variants +union Emit { + Remap, + PassThrough, +} + +/// Fields common to every relational operator +table RelBase { + /// Output remapping of ordinal columns for a given operation + output_mapping: Emit (required); +} + +/// Filter operation +table Filter { + /// Common options + base: RelBase (required); + /// Child relation + rel: Relation (required); + /// The expression which will be evaluated against input rows + /// to determine whether they should be excluded from the + /// filter relation's output. + predicate: Expression (required); +} + +/// Projection +table Project { Review comment: If it turns out to simplify the producer/consumer code to roll these into `Call`s then we can certainly make that change and refactor. -- 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]
