Skip to content

Commit 5970876

Browse files
committed
address comments
1 parent 4c8b7be commit 5970876

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/ml/fpm/FPGrowth.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ object FPGrowthModel extends MLReadable[FPGrowthModel] {
329329
instance.freqItemsets.write.parquet(dataPath)
330330
val itemDataType = instance.freqItemsets.schema(instance.getItemsCol).dataType match {
331331
case ArrayType(et, _) => et
332-
case other => throw new RuntimeException(s"Expected ${ArrayType.simpleString}, but got " +
333-
other.catalogString + ".")
332+
case other => throw new IllegalArgumentException(
333+
s"Expected ${ArrayType.simpleString}, but got ${other.catalogString}.")
334334
}
335335
val itemSupportPath = new Path(path, "itemSupport").toString
336336
val itemSupportRows = instance.itemSupport.map {

0 commit comments

Comments
 (0)