Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/src/arrow/ipc/metadata-internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static Status TypeFromFlatbuffer(flatbuf::Type type, const void* type_data,
}
*out = std::make_shared<ListType>(children[0]);
return Status::OK();
case flatbuf::Type_Tuple:
case flatbuf::Type_Struct_:
*out = std::make_shared<StructType>(children);
return Status::OK();
case flatbuf::Type_Union:
Expand Down Expand Up @@ -153,7 +153,7 @@ static Status StructToFlatbuffer(FBB& fbb, const std::shared_ptr<DataType>& type
RETURN_NOT_OK(FieldToFlatbuffer(fbb, type->child(i), &field));
out_children->push_back(field);
}
*offset = flatbuf::CreateTuple(fbb).Union();
*offset = flatbuf::CreateStruct_(fbb).Union();
return Status::OK();
}

Expand Down Expand Up @@ -197,7 +197,7 @@ static Status TypeToFlatbuffer(FBB& fbb, const std::shared_ptr<DataType>& type,
*out_type = flatbuf::Type_List;
return ListToFlatbuffer(fbb, type, children, offset);
case Type::STRUCT:
*out_type = flatbuf::Type_Tuple;
*out_type = flatbuf::Type_Struct_;
return StructToFlatbuffer(fbb, type, children, offset);
default:
*out_type = flatbuf::Type_NONE; // Make clang-tidy happy
Expand Down
10 changes: 5 additions & 5 deletions format/Message.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ namespace org.apache.arrow.flatbuf;
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
table Tuple {
/// A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
/// (according to the physical memory layout). We used Struct_ here as
/// Struct is a reserved word in Flatbuffers
table Struct_ {
}

table List {
Expand Down Expand Up @@ -87,7 +87,7 @@ union Type {
IntervalDay,
IntervalYear,
List,
Tuple,
Struct_,
Union,
JSONScalar
}
Expand Down
2 changes: 1 addition & 1 deletion java/vector/src/main/codegen/data/ArrowTypes.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
fields: []
},
{
name: "Tuple",
name: "Struct_",
fields: []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.apache.arrow.vector.holders.ComplexHolder;
import org.apache.arrow.vector.types.Types;
import org.apache.arrow.vector.types.Types.MinorType;
import org.apache.arrow.vector.types.pojo.ArrowType.Tuple;
import org.apache.arrow.vector.types.pojo.ArrowType.Struct_;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.util.CallBack;
import org.apache.arrow.vector.util.JsonStringHashMap;
Expand Down Expand Up @@ -290,7 +290,7 @@ public Field getField() {
for (ValueVector child : getChildren()) {
children.add(child.getField());
}
return new Field(name, false, Tuple.INSTANCE, children);
return new Field(name, false, Struct_.INSTANCE, children);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import org.apache.arrow.vector.types.pojo.ArrowType.Null;
import org.apache.arrow.vector.types.pojo.ArrowType.Time;
import org.apache.arrow.vector.types.pojo.ArrowType.Timestamp;
import org.apache.arrow.vector.types.pojo.ArrowType.Tuple;
import org.apache.arrow.vector.types.pojo.ArrowType.Struct_;
import org.apache.arrow.vector.types.pojo.ArrowType.Union;
import org.apache.arrow.vector.types.pojo.ArrowType.Utf8;

Expand All @@ -54,7 +54,7 @@
/**
* The layout of vectors for a given type
* It defines its own vectors followed by the vectors for the children
* if it is a nested type (Tuple, List, Union)
* if it is a nested type (Struct_, List, Union)
*/
public class TypeLayout {

Expand Down Expand Up @@ -88,7 +88,7 @@ public static TypeLayout getTypeLayout(final ArrowType arrowType) {
return new TypeLayout(vectors);
}

@Override public TypeLayout visit(Tuple type) {
@Override public TypeLayout visit(Struct_ type) {
List<VectorLayout> vectors = asList(
validityVector()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
import org.apache.arrow.vector.types.pojo.ArrowType.Null;
import org.apache.arrow.vector.types.pojo.ArrowType.Time;
import org.apache.arrow.vector.types.pojo.ArrowType.Timestamp;
import org.apache.arrow.vector.types.pojo.ArrowType.Tuple;
import org.apache.arrow.vector.types.pojo.ArrowType.Struct_;
import org.apache.arrow.vector.types.pojo.ArrowType.Union;
import org.apache.arrow.vector.types.pojo.ArrowType.Utf8;
import org.apache.arrow.vector.types.pojo.Field;
Expand Down Expand Up @@ -131,7 +131,7 @@ public FieldWriter getNewFieldWriter(ValueVector vector) {
return null;
}
},
MAP(Tuple.INSTANCE) {
MAP(Struct_.INSTANCE) {
@Override
public Field getField() {
throw new UnsupportedOperationException("Cannot get simple field for Map type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.arrow.vector.types.pojo.ArrowType.Int;
import org.apache.arrow.vector.types.pojo.ArrowType.List;
import org.apache.arrow.vector.types.pojo.ArrowType.Timestamp;
import org.apache.arrow.vector.types.pojo.ArrowType.Tuple;
import org.apache.arrow.vector.types.pojo.ArrowType.Struct_;
import org.apache.arrow.vector.types.pojo.ArrowType.Union;
import org.apache.arrow.vector.types.pojo.ArrowType.Utf8;
import org.apache.arrow.vector.types.pojo.Field;
Expand All @@ -53,7 +53,7 @@ public void complex() {
childrenBuilder.add(new Field("child1", true, Utf8.INSTANCE, null));
childrenBuilder.add(new Field("child2", true, new FloatingPoint(SINGLE), ImmutableList.<Field>of()));

Field initialField = new Field("a", true, Tuple.INSTANCE, childrenBuilder.build());
Field initialField = new Field("a", true, Struct_.INSTANCE, childrenBuilder.build());
run(initialField);
}

Expand All @@ -71,7 +71,7 @@ public void nestedSchema() {
ImmutableList.Builder<Field> childrenBuilder = ImmutableList.builder();
childrenBuilder.add(new Field("child1", true, Utf8.INSTANCE, null));
childrenBuilder.add(new Field("child2", true, new FloatingPoint(SINGLE), ImmutableList.<Field>of()));
childrenBuilder.add(new Field("child3", true, new Tuple(), ImmutableList.<Field>of(
childrenBuilder.add(new Field("child3", true, new Struct_(), ImmutableList.<Field>of(
new Field("child3.1", true, Utf8.INSTANCE, null),
new Field("child3.2", true, new FloatingPoint(DOUBLE), ImmutableList.<Field>of())
)));
Expand Down