Skip to content

Instantly share code, notes, and snippets.

@smiklos
Created June 21, 2018 19:01
Show Gist options
  • Save smiklos/90b3f0f593b3afcd7c7233ce99d3158c to your computer and use it in GitHub Desktop.
Save smiklos/90b3f0f593b3afcd7c7233ce99d3158c to your computer and use it in GitHub Desktop.
private[sql] def numericColumns: Seq[Expression] = {
schema.fields.filter(_.dataType.isInstanceOf[NumericType]).map { n =>
queryExecution.analyzed.resolveQuoted(n.name, sparkSession.sessionState.analyzer.resolver).get
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment