Skip to content

Instantly share code, notes, and snippets.

@vzayaz
Last active September 6, 2020 21:44
Show Gist options
  • Save vzayaz/add82fcf9d22c8fb20a138cdfa42b049 to your computer and use it in GitHub Desktop.
Save vzayaz/add82fcf9d22c8fb20a138cdfa42b049 to your computer and use it in GitHub Desktop.
val res = spark
.range(1000L * 1000 * 1000)
.filter(x => x % 2 == 0) // note that the condition changed
.select(count(col("id")))
.first()
.getAs[Long](0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment