Herd/Spark - FactoryCQ - Add support for Spark 3.2 (3.2.1) and remove for Spark 2.2
update code work with spark 3.2.1
@@ -756,8 +756,8 @@ class DefaultSource(apiClientFactory: (String, Option[String], Option[String]) =
def toComplexHerdType(column: StructField): String = {
- val typeString = if (column.metadata.contains(HIVE_TYPE_STRING)) {
- column.metadata.getString(HIVE_TYPE_STRING)
+ val typeString = if (column.metadata.contains("HIVE_TYPE_STRING")) {
+ column.metadata.getString("HIVE_TYPE_STRING")
} else {
column.dataType.catalogString
}
