Package org.apache.spark.sql.types
Class MetadataBuilder
Object
org.apache.spark.sql.types.MetadataBuilder
Builder for
Metadata
. If there is a key collision, the latter will overwrite the former.
- Since:
- 1.3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theMetadata
instance.putBoolean
(String key, boolean value) Puts a Boolean.putBooleanArray
(String key, boolean[] value) Puts a Boolean array.Puts a Double.putDoubleArray
(String key, double[] value) Puts a Double array.Puts a Long.putLongArray
(String key, long[] value) Puts a Long array.putMetadata
(String key, Metadata value) Puts aMetadata
.putMetadataArray
(String key, Metadata[] value) Puts aMetadata
array.Puts a null.Puts a String.putStringArray
(String key, String[] value) Puts a String array.withMetadata
(Metadata metadata) Include the content of an existingMetadata
instance.
-
Constructor Details
-
MetadataBuilder
public MetadataBuilder()
-
-
Method Details
-
build
Builds theMetadata
instance. -
putBoolean
Puts a Boolean. -
putBooleanArray
Puts a Boolean array. -
putDouble
Puts a Double. -
putDoubleArray
Puts a Double array. -
putLong
Puts a Long. -
putLongArray
Puts a Long array. -
putMetadata
Puts aMetadata
. -
putMetadataArray
Puts aMetadata
array. -
putNull
Puts a null. -
putString
Puts a String. -
putStringArray
Puts a String array. -
remove
-
withMetadata
Include the content of an existingMetadata
instance.
-