Class SparkScalaUtils

java.lang.Object
com.linkedin.venice.spark.utils.SparkScalaUtils

public final class SparkScalaUtils extends Object
Utility methods for restricting Scala-ism in Spark code in a single class.
  • Method Details

    • getFieldIndex

      public static int getFieldIndex(org.apache.spark.sql.types.StructType dataSchema, String fieldName)
      Get the index of a field in a StructType. If the field does not exist, return -1.