You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/05/17 19:12:45 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28557: [SPARK-31737][SQL] SparkSQL can't recognize the modified length of Hive varchar
dongjoon-hyun commented on a change in pull request #28557:
URL: https://github.com/apache/spark/pull/28557#discussion_r426294290
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala
##########
@@ -285,13 +285,26 @@ object DataType {
fromFields.zip(toFields).forall { case (fromField, toField) =>
fromField.name == toField.name &&
(toField.nullable || !fromField.nullable) &&
- equalsIgnoreCompatibleNullability(fromField.dataType, toField.dataType)
+ equalsIgnoreCompatibleNullability(fromField.dataType, toField.dataType) &&
+ equalsMetaData(fromField, toField)
}
case (fromDataType, toDataType) => fromDataType == toDataType
}
}
+ /**
+ * Returns true if the two StructField have the same HIVE_TYPE_STRING,
+ * or none of them have this attribute.
+ */
+ def equalsMetaData(from: StructField, to: StructField): Boolean = {
Review comment:
`def` -> `private def`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org