Class PartitionPathUtils

java.lang.Object
dev.vortex.spark.read.PartitionPathUtils

public final class PartitionPathUtils extends Object
Utilities for discovering and materializing Hive-style partition columns from file paths.
  • Method Details

    • parsePartitionValues

      public static Map<String,String> parsePartitionValues(String filePath)
      Parses Hive-style key=value segments from a file path.
      Returns:
      an ordered map of partition column names to their string values
    • inferPartitionColumnType

      public static org.apache.spark.sql.types.DataType inferPartitionColumnType(String value)
      Infers a Spark DataType from a partition value string. Tries integer, long, double, boolean, and falls back to string.
    • createConstantVector

      public static org.apache.spark.sql.execution.vectorized.ConstantColumnVector createConstantVector(int numRows, org.apache.spark.sql.types.DataType type, String value)
      Creates a Spark ConstantColumnVector populated with the given partition value, parsed according to the target DataType.