Package com.linkedin.venice.spark.utils
Class SparkScalaUtils
java.lang.Object
com.linkedin.venice.spark.utils.SparkScalaUtils
Utility methods for restricting Scala-ism in Spark code in a single class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getFieldIndex
(org.apache.spark.sql.types.StructType dataSchema, String fieldName) Get the index of a field in a StructType.
-
Method Details
-
getFieldIndex
Get the index of a field in a StructType. If the field does not exist, return -1.
-