aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala
diff options
context:
space:
mode:
Diffstat (limited to 'mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala b/mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala
index 65e7e43d5a..a83febd7de 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/attribute/AttributeType.scala
@@ -43,6 +43,12 @@ object AttributeType {
Binary
}
+ /** Unresolved type. */
+ val Unresolved: AttributeType = {
+ case object Unresolved extends AttributeType("unresolved")
+ Unresolved
+ }
+
/**
* Gets the [[AttributeType]] object from its name.
* @param name attribute type name: "numeric", "nominal", or "binary"
@@ -54,6 +60,8 @@ object AttributeType {
Nominal
} else if (name == Binary.name) {
Binary
+ } else if (name == Unresolved.name) {
+ Unresolved
} else {
throw new IllegalArgumentException(s"Cannot recognize type $name.")
}