We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33ddd2e commit 8c42b57Copy full SHA for 8c42b57
mllib/src/main/scala/org/apache/spark/ml/util/SchemaUtils.scala
@@ -34,10 +34,11 @@ object SchemaUtils {
34
* @param colName column name
35
* @param dataType required column data type
36
*/
37
- def checkColumnType(schema: StructType,
38
- colName: String,
39
- dataType: DataType,
40
- msg: String = ""): Unit = {
+ def checkColumnType(
+ schema: StructType,
+ colName: String,
+ dataType: DataType,
41
+ msg: String = ""): Unit = {
42
val actualDataType = schema(colName).dataType
43
val message = if (msg != null && msg.trim.length > 0) " " + msg else ""
44
require(actualDataType.equals(dataType),
0 commit comments