]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/java/format/src/main/java/org/apache/arrow/flatbuf/DictionaryBatch.java
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / java / format / src / main / java / org / apache / arrow / flatbuf / DictionaryBatch.java
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, 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// automatically generated by the FlatBuffers compiler, do not modify
18
19package org.apache.arrow.flatbuf;
20
21import java.nio.*;
22import java.lang.*;
23import java.util.*;
24import com.google.flatbuffers.*;
25
26@SuppressWarnings("unused")
27/**
28 * For sending dictionary encoding information. Any Field can be
29 * dictionary-encoded, but in this case none of its children may be
30 * dictionary-encoded.
31 * There is one vector / column per dictionary, but that vector / column
32 * may be spread across multiple dictionary batches by using the isDelta
33 * flag
34 */
35public final class DictionaryBatch extends Table {
36 public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); }
37 public static DictionaryBatch getRootAsDictionaryBatch(ByteBuffer _bb) { return getRootAsDictionaryBatch(_bb, new DictionaryBatch()); }
38 public static DictionaryBatch getRootAsDictionaryBatch(ByteBuffer _bb, DictionaryBatch obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
39 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
40 public DictionaryBatch __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
41
42 public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
43 public org.apache.arrow.flatbuf.RecordBatch data() { return data(new org.apache.arrow.flatbuf.RecordBatch()); }
44 public org.apache.arrow.flatbuf.RecordBatch data(org.apache.arrow.flatbuf.RecordBatch obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
45 /**
46 * If isDelta is true the values in the dictionary are to be appended to a
47 * dictionary with the indicated id. If isDelta is false this dictionary
48 * should replace the existing dictionary.
49 */
50 public boolean isDelta() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
51
52 public static int createDictionaryBatch(FlatBufferBuilder builder,
53 long id,
54 int dataOffset,
55 boolean isDelta) {
56 builder.startTable(3);
57 DictionaryBatch.addId(builder, id);
58 DictionaryBatch.addData(builder, dataOffset);
59 DictionaryBatch.addIsDelta(builder, isDelta);
60 return DictionaryBatch.endDictionaryBatch(builder);
61 }
62
63 public static void startDictionaryBatch(FlatBufferBuilder builder) { builder.startTable(3); }
64 public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); }
65 public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(1, dataOffset, 0); }
66 public static void addIsDelta(FlatBufferBuilder builder, boolean isDelta) { builder.addBoolean(2, isDelta, false); }
67 public static int endDictionaryBatch(FlatBufferBuilder builder) {
68 int o = builder.endTable();
69 return o;
70 }
71
72 public static final class Vector extends BaseVector {
73 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
74
75 public DictionaryBatch get(int j) { return get(new DictionaryBatch(), j); }
76 public DictionaryBatch get(DictionaryBatch obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
77 }
78}
79