andygrove commented on code in PR #6996:
URL: https://github.com/apache/datafusion-comet/pull/6996#discussion_r4541738472


##########
spark/src/main/scala/org/apache/comet/serde/operator/IcebergWriteProtoTranslation.scala:
##########
@@ -100,6 +100,9 @@ object IcebergWriteProtoTranslation {
       }
     }
 
+  /** True when the write compresses with brotli. Unlike `resolveCompression`, 
never throws. */
+  def compressesWithBrotli(props: Map[String, String]): Boolean = 
codecName(props) == "brotli"

Review Comment:
   Done in `47bb72e3c9`. Brotli detection now matches the name as iceberg-java 
does: it upper-cases with `Locale.ENGLISH` and compares to `BROTLI`. It also 
trims, because the codec parsing on `main` still trims, so a padded `brotli` is 
accepted natively there and needs the class check too. The detection test now 
sets the table property to `BROTLI`, and a unit test pins `brotli`, `BROTLI`, 
`Brotli` and a padded name, and checks that zstd, snappy, gzip, uncompressed 
and the unset default do not count.
   
   I merged this branch with #7027 locally, taking #7027's `codecName`, and ran 
the translation and detection suites on the result: 106 pass. With the old `== 
"brotli"` comparison on that merged tree, both new tests fail, which is the 
case you described. So neither order loses the check.
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to