Skip to content

Instantly share code, notes, and snippets.

@izeigerman
Created January 29, 2021 19:06
Show Gist options
  • Save izeigerman/812aa85c52ddf23a865fa46080d9e4d8 to your computer and use it in GitHub Desktop.
Save izeigerman/812aa85c52ddf23a865fa46080d9e4d8 to your computer and use it in GitHub Desktop.
import shapeless.::
import shapeless.ops.hlist.Prepend
object implicits {
implicit class AnnotatedDataFrameSyntax[L, LJ <: JoinList](left: AnnotatedDataFrame[L, LJ]) {
def join[R, RJ <: JoinList](
right: AnnotatedDataFrame[R, RJ]
)(implicit J: Join[L, LJ, R, RJ], P: Prepend[J, RJ]): AnnotatedDataFrame[L, R :: P.Out] =
J.join(left, right)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment