Skip to content

Commit

Permalink
Re-add convertToScala(), since a Hive test still needs it
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 29, 2015
1 parent 3f7b2d8 commit 6edf7f8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,15 @@ object CatalystTypeConverters {
case other => other
}

/**
* Converts Catalyst types used internally in rows to standard Scala types
* This method is slow, and for batch conversion you should be using converter
* produced by createToScalaConverter.
*/
def convertToScala(catalystValue: Any, dataType: DataType): Any = {
getConverterForType(dataType).toScala(catalystValue)
}

/**
* Creates a converter function that will convert Catalyst types to Scala type.
* Typical use case would be converting a collection of rows that have the same schema. You will
Expand Down

0 comments on commit 6edf7f8

Please sign in to comment.