spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rxin <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8010][SQL]Promote types to StringType a...
Date Mon, 08 Jun 2015 01:52:19 GMT
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6551#discussion_r31883966
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
---
    @@ -59,6 +59,32 @@ object HiveTypeCoercion {
       }
     
       /**
    +   * Implicit promote the AtomicType to StringType if
    +   * one of the data type in (dt1, dt2) is StringType, and the other is not either
    +   * BooleanType or BinaryType, the TightestCommonType should be StringType
    +   * eg: 1. CaseWhenLike  case when ... then dt1 else dt2 end
    +   *     2. Coalesce(null, dt1, dt2)
    +   */
    +  val promoteToStringTypeOfTwo: (DataType, DataType) => Option[DataType] = {
    --- End diff --
    
    why not make this a function instead?


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

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


Mime
View raw message