Class SchemaToStructTypeConverter
- java.lang.Object
-
- uk.gov.gchq.gaffer.spark.operation.dataframe.converter.schema.SchemaToStructTypeConverter
-
public class SchemaToStructTypeConverter extends Object
Converts a GafferSchemato a SparkStructType. Only groups that are present in the providedVieware used. Properties that can either automatically be converted into a value that can be used in a Spark Dataframe, or for which aConverteris provided, will be present in theStructType. If the same property is present in more than one group, then it must be consistent, i.e. of the same type. The converter will ignore any properties which share a name with the key property names required by a Spark Dataframe. This will result in these properties being missed if they are specified in the GafferSchema. I.e ifRows are converted back into GafferElements it will not be possible to recreate the original Elements.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDIRECTED_COL_NAMEstatic StringDST_COL_NAMEstatic StringGROUPstatic StringIDstatic StringMATCHED_VERTEX_COL_NAMEstatic StringSRC_COL_NAMEstatic StringVERTEX_COL_NAME
-
Constructor Summary
Constructors Constructor Description SchemaToStructTypeConverter(Schema schema, View view, List<Converter> converters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Converter>getConverterByProperty()LinkedHashSet<String>getGroups()Map<String,Boolean>getPropertyNeedsConversion()org.apache.spark.sql.types.StructTypegetStructType()LinkedHashSet<String>getUsedProperties()
-
-
-
Field Detail
-
GROUP
public static final String GROUP
- See Also:
- Constant Field Values
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
VERTEX_COL_NAME
public static final String VERTEX_COL_NAME
- See Also:
- Constant Field Values
-
SRC_COL_NAME
public static final String SRC_COL_NAME
- See Also:
- Constant Field Values
-
DST_COL_NAME
public static final String DST_COL_NAME
- See Also:
- Constant Field Values
-
DIRECTED_COL_NAME
public static final String DIRECTED_COL_NAME
- See Also:
- Constant Field Values
-
MATCHED_VERTEX_COL_NAME
public static final String MATCHED_VERTEX_COL_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGroups
public LinkedHashSet<String> getGroups()
-
getStructType
public org.apache.spark.sql.types.StructType getStructType()
-
getUsedProperties
public LinkedHashSet<String> getUsedProperties()
-
-