Skip to content

Instantly share code, notes, and snippets.

View rmarsch's full-sized avatar

Richard Marscher rmarsch

View GitHub Profile
@rmarsch
rmarsch / rddStyleDatasetJoins.scala
Last active June 1, 2016 18:46
Dataset with enriched joins
implicit class DatasetEnrichedJoinWiths[T](ds: Dataset[T])(implicit ct: ClassTag[T]) {
val Inner = "inner"
val Outer = "outer"
val LeftOuter = "left_outer"
val RightOuter = "right_outer"
val LeftSemi = "leftsemi"
def outerJoin[U](other: Dataset[U], expr: Column): Dataset[(Option[T], Option[U])] = {
// Ideally use a better encoder, but this compiles for now
implicit val enc = Encoders.kryo[(Option[T], Option[U])]
@rmarsch
rmarsch / orbfountain.html
Created April 11, 2013 22:04
Orb Fountain
<!DOCTYPE html>
<html>
<head>
<title>Orb Fountain</title>
<meta charset="UTF-8" />
<style type="text/css">
* { font-family: Verdana, Arial, sans-serif; }
body { background-color: #000; cursor: default; }
h1 { font-size: 15pt; }