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

    https://github.com/apache/spark/pull/16954#discussion_r104301109
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ---
    @@ -109,6 +109,26 @@ object TypeCoercion {
       }
     
       /**
    +   * This function determines the target type of a comparison operator 
when one operand
    +   * is a String and the other is not. It also handles when one op is a 
Date and the
    +   * other is a Timestamp by making the target type to be String. 
Currently this is used
    +   * to coerce types between LHS and RHS of the IN expression.
    +   */
    +  val findCommonTypeForBinaryComparison: (DataType, DataType) => 
Option[DataType] = {
    +    case (StringType, DateType) => Some(StringType)
    +    case (DateType, StringType) => Some(StringType)
    +    case (StringType, TimestampType) => Some(StringType)
    +    case (TimestampType, StringType) => Some(StringType)
    +    case (TimestampType, DateType) => Some(StringType)
    --- End diff --
    
    @hvanhovell Thanks!!. I had tried to do this before as well as this came up 
during the internal review. I have made another try. Please let me know what 
you think.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to