You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2017/07/06 05:51:07 UTC

[GitHub] spark pull request #18460: [SPARK-21247][SQL] Type comparision should respec...

Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18460#discussion_r125815929
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala ---
    @@ -80,7 +81,11 @@ abstract class DataType extends AbstractDataType {
        * (`StructField.nullable`, `ArrayType.containsNull`, and `MapType.valueContainsNull`).
        */
       private[spark] def sameType(other: DataType): Boolean =
    -    DataType.equalsIgnoreNullability(this, other)
    +    if (SQLConf.get.caseSensitiveAnalysis) {
    +      DataType.equalsIgnoreNullability(this, other)
    +    } else {
    +      DataType.equalsIgnoreCaseAndNullability(this, other)
    --- End diff --
    
    Since we already have `DataType.equalsIgnoreCaseAndNullability`, we can use this according to the SQL configuration.


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