Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11464#discussion_r54843475
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala
 ---
    @@ -148,6 +148,19 @@ private[sql] class ParquetRelation(
         .get(ParquetRelation.METASTORE_SCHEMA)
         .map(DataType.fromJson(_).asInstanceOf[StructType])
     
    +  private val compressionCodec: Option[String] = parameters
    +    .get("compression")
    +    .map { codecName =>
    +      // Validate if given compression codec is supported or not.
    +      val shortParquetCompressionCodecNames = 
ParquetRelation.shortParquetCompressionCodecNames
    +      if 
(!shortParquetCompressionCodecNames.contains(codecName.toLowerCase)) {
    +        val availableCodecs = 
shortParquetCompressionCodecNames.keys.map(_.toLowerCase)
    +        throw new IllegalArgumentException(s"Codec [$codecName] " +
    +          s"is not available. Available codecs are 
${availableCodecs.mkString(", ")}.")
    +      }
    --- End diff --
    
    Ops. This indentation is weird.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to