]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/experimental/computeir/Literal.fbs
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / experimental / computeir / Literal.fbs
CommitLineData
1d09f67e
TL
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18include "../../format/Schema.fbs";
19
20namespace org.apache.arrow.computeir.flatbuf;
21
22table ListLiteral {
23 values: [Literal] (required);
24}
25
26table StructLiteral {
27 /// Values for each struct field; the order must match the order of fields
28 /// in the `type` field of `Literal`.
29 values: [Literal] (required);
30}
31
32table KeyValue {
33 key: Literal (required);
34 value: Literal (required);
35}
36
37table MapLiteral {
38 values: [KeyValue] (required);
39}
40
41table Int8Literal {
42 value: int8;
43}
44
45table Int16Literal {
46 value: int16;
47}
48
49table Int32Literal {
50 value: int32;
51}
52
53table Int64Literal {
54 value: int64;
55}
56
57table UInt8Literal {
58 value: uint8;
59}
60
61table UInt16Literal {
62 value: uint16;
63}
64
65table UInt32Literal {
66 value: uint32;
67}
68
69table UInt64Literal {
70 value: uint64;
71}
72
73table Float16Literal {
74 value: uint16;
75}
76
77table Float32Literal {
78 value: float32;
79}
80
81table Float64Literal {
82 value: float64;
83}
84
85table DecimalLiteral {
86 /// Bytes of a Decimal value; bytes must be in little-endian order.
87 value: [byte] (required);
88}
89
90table BooleanLiteral {
91 value: bool;
92}
93
94table DateLiteral {
95 value: int64;
96}
97
98table TimeLiteral {
99 value: int64;
100}
101
102table TimestampLiteral {
103 value: int64;
104}
105
106table IntervalLiteralMonths {
107 months: int32;
108}
109
110table IntervalLiteralDaysMilliseconds {
111 days: int32;
112 milliseconds: int32;
113}
114
115union IntervalLiteralImpl {
116 IntervalLiteralMonths,
117 IntervalLiteralDaysMilliseconds,
118}
119
120table IntervalLiteral {
121 value: IntervalLiteralImpl (required);
122}
123
124table DurationLiteral {
125 value: int64;
126}
127
128table BinaryLiteral {
129 value: [byte] (required);
130}
131
132table FixedSizeBinaryLiteral {
133 value: [byte] (required);
134}
135
136table StringLiteral {
137 value: string (required);
138}
139
140// no union literal is defined as only one branch of a union can be resolved.
141// no literals for large string/binary types as flatbuffer is limited to 2gb.
142
143union LiteralImpl {
144 BooleanLiteral,
145
146 Int8Literal,
147 Int16Literal,
148 Int32Literal,
149 Int64Literal,
150
151 UInt8Literal,
152 UInt16Literal,
153 UInt32Literal,
154 UInt64Literal,
155
156 DateLiteral,
157 TimeLiteral,
158 TimestampLiteral,
159 IntervalLiteral,
160 DurationLiteral,
161
162 DecimalLiteral,
163
164 Float16Literal,
165 Float32Literal,
166 Float64Literal,
167
168 ListLiteral,
169 StructLiteral,
170 MapLiteral,
171
172 StringLiteral,
173 BinaryLiteral,
174 FixedSizeBinaryLiteral,
175}
176
177table Literal {
178 /// Literal value data; for null literals do not include this field.
179 impl: LiteralImpl;
180 /// Type of the literal value. This must match `impl`.
181 type: org.apache.arrow.flatbuf.Field (required);
182}
183
184root_type Literal;