com.sparkutils.shim.expressions.MapGroups.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.Encoder
import org.apache.spark.sql.catalyst.expressions.{Attribute, SortOrder}
import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, MapGroups => SMapGroups}
object MapGroups4 {
def apply[K: Encoder, T: Encoder, U: Encoder](
func: (K, Iterator[T]) => TraversableOnce[U],
groupingAttributes: Seq[Attribute],
dataAttributes: Seq[Attribute],
child: LogicalPlan
): LogicalPlan =
SMapGroups(
func,
groupingAttributes,
dataAttributes,
Seq(), // #698 - no order given
child
)
}
object MapGroups5 {
def apply[K: Encoder, T: Encoder, U: Encoder](
func: (K, Iterator[T]) => TraversableOnce[U],
groupingAttributes: Seq[Attribute],
dataAttributes: Seq[Attribute],
dataOrder: Seq[SortOrder],
child: LogicalPlan
): LogicalPlan =
SMapGroups(
func,
groupingAttributes,
dataAttributes,
dataOrder,
child
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy