Skip to content

Commit 8c42b57

Browse files
committed
update checkInputColumn to print more info if needed
1 parent 33ddd2e commit 8c42b57

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mllib/src/main/scala/org/apache/spark/ml/util/SchemaUtils.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ object SchemaUtils {
3434
* @param colName column name
3535
* @param dataType required column data type
3636
*/
37-
def checkColumnType(schema: StructType,
38-
colName: String,
39-
dataType: DataType,
40-
msg: String = ""): Unit = {
37+
def checkColumnType(
38+
schema: StructType,
39+
colName: String,
40+
dataType: DataType,
41+
msg: String = ""): Unit = {
4142
val actualDataType = schema(colName).dataType
4243
val message = if (msg != null && msg.trim.length > 0) " " + msg else ""
4344
require(actualDataType.equals(dataType),

0 commit comments

Comments
 (0)