Class Schema
java.lang.Object
org.apache.arrow.vector.types.pojo.Schema
An Arrow Schema.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Schema
convertSchema
(Schema schema) Converts a flatbuffer schema to its POJO representation.static Schema
deserialize
(ByteBuffer buffer) Deprecated.static Schema
deserializeMessage
(ByteBuffer buffer) Deserialize a schema that has been serialized as a message usingserializeAsMessage()
.boolean
Search for a field by name in this Schema.static Field
Search for a field by name in given the list of fields.static Schema
int
getSchema
(com.google.flatbuffers.FlatBufferBuilder builder) Adds this schema to the builder returning the size of the builder after adding.int
hashCode()
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
-