com.sparkutils.shim.expressions.functions.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shim_runtime_3.5.0.oss_3.5_2.13 Show documentation
Show all versions of shim_runtime_3.5.0.oss_3.5_2.13 Show documentation
Runtime Shims to ease developing multi version Spark libraries, these should only be used as compiled scope for your target platform or test for OSS when deploying to non-OSS
The newest version!
package com.sparkutils.shim.expressions
import org.apache.spark.sql
import org.apache.spark.sql.Column
import org.apache.spark.sql.catalyst.expressions.{Coalesce, CreateNamedStruct, CreateStruct, Expression}
// TODO add back in after dropping 2.4 / 2.11
// import scala.annotation.nowarn
/*
* Collection of shims on really stable interfaces for functional expressions
*/
object Coalesce1 {
def apply(seq: scala.Seq[Expression]): Coalesce =
Coalesce(seq)
def unapply(coalesce: Coalesce): Option[scala.Seq[Expression]] =
Coalesce.unapply(coalesce)
}
// frameless has 5 deprecated functions which are now errors, but for source compat they need to stay, no idea as to when they will
// be removed, shim later..
object functions {
def sumDistinct(e: Column): Column = sql.functions.sumDistinct(e)
def shiftRightUnsigned(e: Column, numBits: Int): Column = sql.functions.shiftRightUnsigned(e, numBits)
def shiftRight(e: Column, numBits: Int): Column = sql.functions.shiftRight(e, numBits)
def shiftLeft(e: Column, numBits: Int): Column = sql.functions.shiftLeft(e, numBits)
def bitwiseNOT(e: Column): Column = sql.functions.bitwiseNOT(e)
}
object CreateStruct1 {
def apply(children: scala.Seq[Expression]): CreateNamedStruct =
CreateStruct.apply(children)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy