Github user tarekauel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7034#discussion_r33746831
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCheckResult.scala
 ---
    @@ -43,3 +47,96 @@ object TypeCheckResult {
         def isSuccess: Boolean = false
       }
     }
    +
    +/**
    + * Describe what data type of the child expression can be accepted by a 
expression.
    + */
    +abstract class AcceptType {
    +  def accept(dt: DataType): Boolean
    +}
    +
    +/**
    + * Accept all of the data types for the child expression.
    + */
    +case object AcceptAllType extends AcceptType {
    +  def accept(dt: DataType): Boolean = true
    +  override def toString(): String = {
    +    "AcceptAllType"
    +  }
    +}
    +
    +/**
    + * Accept all of the data types, except the [[UserDefinedType]] for the 
child expression.
    + */
    +case object AcceptAllTypeExceptUserDefinedType extends AcceptType {
    +  def accept(dt: DataType): Boolean = if 
(dt.isInstanceOf[UserDefinedType[_]]) false else true
    --- End diff --
    
    `!(dt.isInstanceOf[UserDefinedType[_]])`


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to