]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/go/arrow/internal/flatbuf/FieldNode.go
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / go / arrow / internal / flatbuf / FieldNode.go
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, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16
17 // Code generated by the FlatBuffers compiler. DO NOT EDIT.
18
19 package flatbuf
20
21 import (
22 flatbuffers "github.com/google/flatbuffers/go"
23 )
24
25 /// ----------------------------------------------------------------------
26 /// Data structures for describing a table row batch (a collection of
27 /// equal-length Arrow arrays)
28 /// Metadata about a field at some level of a nested type tree (but not
29 /// its children).
30 ///
31 /// For example, a List<Int16> with values `[[1, 2, 3], null, [4], [5, 6], null]`
32 /// would have {length: 5, null_count: 2} for its List node, and {length: 6,
33 /// null_count: 0} for its Int16 node, as separate FieldNode structs
34 type FieldNode struct {
35 _tab flatbuffers.Struct
36 }
37
38 func (rcv *FieldNode) Init(buf []byte, i flatbuffers.UOffsetT) {
39 rcv._tab.Bytes = buf
40 rcv._tab.Pos = i
41 }
42
43 func (rcv *FieldNode) Table() flatbuffers.Table {
44 return rcv._tab.Table
45 }
46
47 /// The number of value slots in the Arrow array at this level of a nested
48 /// tree
49 func (rcv *FieldNode) Length() int64 {
50 return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(0))
51 }
52 /// The number of value slots in the Arrow array at this level of a nested
53 /// tree
54 func (rcv *FieldNode) MutateLength(n int64) bool {
55 return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(0), n)
56 }
57
58 /// The number of observed nulls. Fields with null_count == 0 may choose not
59 /// to write their physical validity bitmap out as a materialized buffer,
60 /// instead setting the length of the bitmap buffer to 0.
61 func (rcv *FieldNode) NullCount() int64 {
62 return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(8))
63 }
64 /// The number of observed nulls. Fields with null_count == 0 may choose not
65 /// to write their physical validity bitmap out as a materialized buffer,
66 /// instead setting the length of the bitmap buffer to 0.
67 func (rcv *FieldNode) MutateNullCount(n int64) bool {
68 return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(8), n)
69 }
70
71 func CreateFieldNode(builder *flatbuffers.Builder, length int64, nullCount int64) flatbuffers.UOffsetT {
72 builder.Prep(8, 16)
73 builder.PrependInt64(nullCount)
74 builder.PrependInt64(length)
75 return builder.Offset()
76 }