Skip to content

Commit

Permalink
Remove Configuration.getPropsWithPrefix to be compatible with lower…
Browse files Browse the repository at this point in the history
… versions of Hadoop
  • Loading branch information
Kontinuation committed Dec 27, 2023
1 parent 4a9b163 commit 4f856f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class GeoParquetWriteSupport extends WriteSupport[InternalRow] with Logging {
case version: String => Some(version)
}
defaultGeoParquetCrs = Option(configuration.get(GEOPARQUET_CRS_KEY)).map(parse(_))
configuration.getPropsWithPrefix(GEOPARQUET_CRS_KEY + ".").asScala.foreach {
case (key, value) => geoParquetColumnCrsMap.put(key, parse(value))
geometryColumnInfoMap.keys.map(schema(_).name).foreach { name =>
Option(configuration.get(GEOPARQUET_CRS_KEY + "." + name)).foreach(crs => geoParquetColumnCrsMap.put(name, parse(crs)))
}

val messageType = new SparkToParquetSchemaConverter(configuration).convert(schema)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class GeoParquetWriteSupport extends WriteSupport[InternalRow] with Logging {
case version: String => Some(version)
}
defaultGeoParquetCrs = Option(configuration.get(GEOPARQUET_CRS_KEY)).map(parse(_))
configuration.getPropsWithPrefix(GEOPARQUET_CRS_KEY + ".").asScala.foreach {
case (key, value) => geoParquetColumnCrsMap.put(key, parse(value))
geometryColumnInfoMap.keys.map(schema(_).name).foreach { name =>
Option(configuration.get(GEOPARQUET_CRS_KEY + "." + name)).foreach(crs => geoParquetColumnCrsMap.put(name, parse(crs)))
}

val messageType = new SparkToParquetSchemaConverter(configuration).convert(schema)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class GeoParquetWriteSupport extends WriteSupport[InternalRow] with Logging {
case version: String => Some(version)
}
defaultGeoParquetCrs = Option(configuration.get(GEOPARQUET_CRS_KEY)).map(parse(_))
configuration.getPropsWithPrefix(GEOPARQUET_CRS_KEY + ".").asScala.foreach {
case (key, value) => geoParquetColumnCrsMap.put(key, parse(value))
geometryColumnInfoMap.keys.map(schema(_).name).foreach { name =>
Option(configuration.get(GEOPARQUET_CRS_KEY + "." + name)).foreach(crs => geoParquetColumnCrsMap.put(name, parse(crs)))
}

val messageType = new SparkToParquetSchemaConverter(configuration).convert(schema)
Expand Down

0 comments on commit 4f856f5

Please sign in to comment.