cpcloud commented on a change in pull request #10934: URL: https://github.com/apache/arrow/pull/10934#discussion_r712422002
########## File path: experimental/computeir/Literal.fbs ########## @@ -0,0 +1,203 @@ +// 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. + +namespace org.apache.arrow.computeir.flatbuf; + +table ListLiteral { + values: [Literal]; +} + +table StructLiteral { + values: [KeyValue]; +} + +table KeyValue { + key: string; + value: Literal; +} + +table MapLiteral { + values: [KeyValue]; +} + +table Int8Literal { + value: int8; +} + +table Int16Literal { + value: int16; +} + +table Int32Literal { + value: int32; +} + +table Int64Literal { + value: int64; +} + +table UInt8Literal { + value: uint8; +} + +table UInt16Literal { + value: uint16; +} + +table UInt32Literal { + value: uint32; +} + +table UInt64Literal { + value: uint64; +} + +table Float16Literal { + value: uint16; +} + +table Float32Literal { + value: float32; +} + +table Float64Literal { + value: float64; +} + +table DecimalLiteral { + value: [byte]; + scale: uint8; + precision: uint8; +} + +table BooleanLiteral { + value: bool; +} + +table NullLiteral {} + +enum DateUnit : uint8 { + DAY, + MILLISECOND, +} + +table DateLiteral { + value: int64; + + // unit of `value` + unit: DateUnit = MILLISECOND; +} + +enum TimeUnit : uint8 { + SECOND, + MILLISECOND, + MICROSECOND, + NANOSECOND, +} + +table TimeLiteral { + value: int64; + + // unit of `value` + unit: TimeUnit = MILLISECOND; +} + +table TimestampLiteral { + value: int64; + + // unit of `value` + unit: TimeUnit; + + // timezone value, same definition as used in Schema.fbs. + timezone: string; +} + +table IntervalLiteralMonths { + months: int32; +} + +table IntervalLiteralDaysMilliseconds { + days: int32; + milliseconds: int32; +} Review comment: Unresolving this to get your thoughts. It's likely that substrait will not have support for nanoseconds here. If we add it in arrow, and then write a bunch of code that accepts nanos intervals I don't think we can move to substrait without a ton of hassle and breakage. I think it would make sense to add this only if we absolutely need it. Maybe we will need it immediately and I am just unaware. -- 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]
