All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bio.ferlab.datalake.spark3.transformation.Implicits.scala Maven / Gradle / Ivy

There is a newer version: 14.8.0
Show newest version
package bio.ferlab.datalake.spark3.transformation

import org.apache.spark.sql.{Column, DataFrame}

object Implicits {
  implicit class DataFrameOperations(df: DataFrame) {

    def dropDuplicates(partitionByExpr: Seq[String],
                       orderByExpr: Column*): DataFrame =
      DropDuplicates(partitionByExpr, orderByExpr:_*).transform(df)

    @deprecated("use [[dropDuplicates]]", "0.2.3")
    def keepFirstWithinPartition(partitionByExpr: Seq[String],
                                 orderByExpr: Column*): DataFrame =
      KeepFirstWithinPartition(partitionByExpr, orderByExpr:_*).transform(df)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy