Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update checkInputColumn to print more info if needed
  • Loading branch information
rekhajoshm committed Jul 3, 2015
commit 8c42b57cd2539f9e8b9aadb76c702ef6cacb9712
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ object SchemaUtils {
* @param colName column name
* @param dataType required column data type
*/
def checkColumnType(schema: StructType,
colName: String,
dataType: DataType,
msg: String = ""): Unit = {
def checkColumnType(
schema: StructType,
colName: String,
dataType: DataType,
msg: String = ""): Unit = {
val actualDataType = schema(colName).dataType
val message = if (msg != null && msg.trim.length > 0) " " + msg else ""
require(actualDataType.equals(dataType),
Expand Down