Package dev.vortex.spark
Record Class VortexFilePartition
java.lang.Object
java.lang.Record
dev.vortex.spark.VortexFilePartition
- Record Components:
paths- the Vortex file paths (or globs) belonging to this input partitionreadSchema- the requested output schema (data columns + partition columns)formatOptions- object-store properties used to open the filespartitionValues- Hive-style partition column values shared by allpaths()
- All Implemented Interfaces:
Serializable,org.apache.spark.sql.connector.read.InputPartition
public record VortexFilePartition(List<String> paths, org.apache.spark.sql.types.StructType readSchema, Map<String,String> formatOptions, Map<String,String> partitionValues)
extends Record
implements org.apache.spark.sql.connector.read.InputPartition, Serializable
An
InputPartition describing a group of Vortex files that a single reader should handle together.
Each executor opens a single Vortex Session, DataSource and Scan over the partition's
paths() and consumes every Vortex partition produced by that scan before moving on to the next Spark
InputPartition.
The requested output schema is carried as a StructType rather than a list of Column objects:
StructType is the stable serialization surface in Spark and survives shipping to executors reliably.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theformatOptionsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepartitionValuesrecord component.paths()Returns the value of thepathsrecord component.org.apache.spark.sql.types.StructTypeReturns the value of thereadSchemarecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.sql.connector.read.InputPartition
preferredLocations
-
Constructor Details
-
VortexFilePartition
public VortexFilePartition(List<String> paths, org.apache.spark.sql.types.StructType readSchema, Map<String, String> formatOptions, Map<String, String> partitionValues) Creates an instance of aVortexFilePartitionrecord class.- Parameters:
paths- the value for thepathsrecord componentreadSchema- the value for thereadSchemarecord componentformatOptions- the value for theformatOptionsrecord componentpartitionValues- the value for thepartitionValuesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
paths
Returns the value of thepathsrecord component.- Returns:
- the value of the
pathsrecord component
-
readSchema
public org.apache.spark.sql.types.StructType readSchema()Returns the value of thereadSchemarecord component.- Returns:
- the value of the
readSchemarecord component
-
formatOptions
Returns the value of theformatOptionsrecord component.- Returns:
- the value of the
formatOptionsrecord component
-
partitionValues
Returns the value of thepartitionValuesrecord component.- Returns:
- the value of the
partitionValuesrecord component
-