java.lang.Object
org.apache.arrow.vector.types.pojo.Schema
An Arrow Schema.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaconvertSchema(Schema schema) Converts a flatbuffer schema to its POJO representation.static Schemadeserialize(ByteBuffer buffer) Deprecated.static SchemadeserializeMessage(ByteBuffer buffer) Deserialize a schema that has been serialized as a message usingserializeAsMessage().booleanSearch for a field by name in this Schema.static FieldSearch for a field by name in given the list of fields.static SchemaintgetSchema(com.google.flatbuffers.FlatBufferBuilder builder) Adds this schema to the builder returning the size of the builder after adding.inthashCode()byte[]Returns the serialized flatbuffer bytes of the schema wrapped in a message table.byte[]Deprecated.This method does not encapsulate the schema in a Message payload which is incompatible with other languages.toJson()Returns the JSON string representation of this schema.toString()
-
Constructor Details
-
Schema
-
Schema
Constructor with metadata.
-
-
Method Details
-
findField
Search for a field by name in given the list of fields.- Parameters:
fields- the list of the fieldsname- the name of the field to return- Returns:
- the corresponding field
- Throws:
IllegalArgumentException- if the field was not found
-
fromJSON
- Throws:
IOException
-
deserialize
Deprecated.Deserialize a schema that has been serialized usingtoByteArray().- Parameters:
buffer- the bytes to deserialize.- Returns:
- The deserialized schema.
-
deserializeMessage
Deserialize a schema that has been serialized as a message usingserializeAsMessage().- Parameters:
buffer- the bytes to deserialize.- Returns:
- The deserialized schema.
-
convertSchema
Converts a flatbuffer schema to its POJO representation. -
getFields
-
getCustomMetadata
-
findField
Search for a field by name in this Schema.- Parameters:
name- the name of the field to return- Returns:
- the corresponding field
- Throws:
IllegalArgumentException- if the field was not found
-
toJson
Returns the JSON string representation of this schema. -
getSchema
public int getSchema(com.google.flatbuffers.FlatBufferBuilder builder) Adds this schema to the builder returning the size of the builder after adding. -
serializeAsMessage
public byte[] serializeAsMessage()Returns the serialized flatbuffer bytes of the schema wrapped in a message table. UsedeserializeMessage(ByteBuffer)to rebuild the Schema. -
toByteArray
Deprecated.This method does not encapsulate the schema in a Message payload which is incompatible with other languages. UseserializeAsMessage()instead.Returns the serialized flatbuffer representation of this schema. -
hashCode
public int hashCode() -
equals
-
toString
-