Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/360#discussion_r11932307
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/dataTypes.scala
---
@@ -29,25 +31,36 @@ abstract class DataType {
case e: Expression if e.dataType == this => true
case _ => false
}
+
+ def isPrimitive(): Boolean = false
}
case object NullType extends DataType
+trait PrimitiveType extends DataType {
--- End diff --
What are the semantics of `PrimitiveType`? Specifically, I'm surprised that
`StringType` and `DecimalType` are considered `PrimitiveTypes`. Also I wonder
if we can unify this with `NativeType` somehow. I'm not really sure, but I'd
like to avoid too much explosion here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---