Package org.apache.spark.sql.util
Class ArrowUtils
Object
org.apache.spark.sql.util.ArrowUtils
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic DataTypefromArrowField(org.apache.arrow.vector.types.pojo.Field field) static StructTypefromArrowSchema(org.apache.arrow.vector.types.pojo.Schema schema) static DataTypefromArrowType(org.apache.arrow.vector.types.pojo.ArrowType dt) static booleanisVariantField(org.apache.arrow.vector.types.pojo.Field field) static org.apache.arrow.memory.RootAllocatorstatic org.apache.arrow.vector.types.pojo.FieldtoArrowField(String name, DataType dt, boolean nullable, String timeZoneId, boolean largeVarTypes) Maps field from Spark to Arrow.static org.apache.arrow.vector.types.pojo.SchematoArrowSchema(StructType schema, String timeZoneId, boolean errorOnDuplicatedFieldNames, boolean largeVarTypes) Maps schema from Spark to Arrow.static org.apache.arrow.vector.types.pojo.ArrowTypetoArrowType(DataType dt, String timeZoneId, boolean largeVarTypes) Maps data type from Spark to Arrow.
- 
Constructor Details- 
ArrowUtilspublic ArrowUtils()
 
- 
- 
Method Details- 
rootAllocatorpublic static org.apache.arrow.memory.RootAllocator rootAllocator()
- 
toArrowTypepublic static org.apache.arrow.vector.types.pojo.ArrowType toArrowType(DataType dt, String timeZoneId, boolean largeVarTypes) Maps data type from Spark to Arrow. NOTE: timeZoneId required for TimestampTypes
- 
fromArrowType
- 
toArrowFieldpublic static org.apache.arrow.vector.types.pojo.Field toArrowField(String name, DataType dt, boolean nullable, String timeZoneId, boolean largeVarTypes) Maps field from Spark to Arrow. NOTE: timeZoneId required for TimestampType
- 
isVariantFieldpublic static boolean isVariantField(org.apache.arrow.vector.types.pojo.Field field) 
- 
fromArrowField
- 
toArrowSchemapublic static org.apache.arrow.vector.types.pojo.Schema toArrowSchema(StructType schema, String timeZoneId, boolean errorOnDuplicatedFieldNames, boolean largeVarTypes) Maps schema from Spark to Arrow. NOTE: timeZoneId required for TimestampType in StructType- Parameters:
- schema- (undocumented)
- timeZoneId- (undocumented)
- errorOnDuplicatedFieldNames- (undocumented)
- largeVarTypes- (undocumented)
- Returns:
- (undocumented)
 
- 
fromArrowSchema
 
-