Skip to content

Commit

Permalink
ARROW-259: Use Flatbuffer Field type instead of MaterializedField
Browse files Browse the repository at this point in the history
Remove MaterializedField, MajorType, RepeatedTypes

Add code to convert from FlatBuf representation to Pojo

also adds tests to test the conversion
  • Loading branch information
StevenMPhillips committed Aug 18, 2016
1 parent 011ade7 commit fe2591b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
22 changes: 21 additions & 1 deletion format/Message.fbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
namespace apache.arrow.flatbuf;
namespace org.apache.arrow.flatbuf;

/// ----------------------------------------------------------------------
/// Logical types and their metadata (if any)
///
/// These are stored in the flatbuffer in the Type union below

table Null {
}

/// A Tuple in the flatbuffer metadata is the same as an Arrow Struct
/// (according to the physical memory layout). We used Tuple here as Struct is
/// a reserved word in Flatbuffers
Expand Down Expand Up @@ -45,10 +48,22 @@ table Decimal {
scale: int;
}

table Date {
}

table Time {
}

table Timestamp {
timezone: string;
}

table IntervalDay {
}

table IntervalYear {
}

table JSONScalar {
dense:bool=true;
}
Expand All @@ -58,13 +73,18 @@ table JSONScalar {
/// add new logical types to Type without breaking backwards compatibility

union Type {
Null,
Int,
FloatingPoint,
Binary,
Utf8,
Bool,
Decimal,
Date,
Time,
Timestamp,
IntervalDay,
IntervalYear,
List,
Tuple,
Union,
Expand Down
16 changes: 16 additions & 0 deletions header
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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.

0 comments on commit fe2591b

Please sign in to comment.