marin-ma commented on code in PR #12360:
URL: https://github.com/apache/gluten/pull/12360#discussion_r3480965131


##########
gluten-substrait/src/main/scala/org/apache/spark/shuffle/GlutenShuffleUtils.scala:
##########
@@ -76,6 +76,13 @@ object GlutenShuffleUtils {
             .toLowerCase(Locale.ROOT)
         val supportedCodecs = 
BackendsApiManager.getSettings.shuffleSupportedCodec()
         if (!supportedCodecs.contains(codec)) {
+          if (codec == "none") {
+            throw new IllegalArgumentException(
+              s"Gluten shuffle does not support codec 'none'. " +
+                s"To disable shuffle compression, set 
spark.shuffle.compress=false. " +
+                s"To use a supported codec, set 
${GlutenConfig.COLUMNAR_SHUFFLE_CODEC.key} " +
+                s"to ${supportedCodecs.mkString(" or ")}.")
+          }
           throw new IllegalArgumentException(

Review Comment:
   Instead of adding a special judgment for "none", can you just refine the 
current error message for all invalid input?
   
   ```
               throw new IllegalArgumentException(
                 s"Gluten shuffle does not support codec '$codec'. " +
                   s"To disable shuffle compression, set 
spark.shuffle.compress=false. " +
                   s"To use a supported codec, set 
${GlutenConfig.COLUMNAR_SHUFFLE_CODEC.key} " +
                   s"to ${supportedCodecs.mkString(" or ")}.")
   ```
   
   In fact, spark throws same exception for all invalid codecs, and I don't 
find there's any document in spark saying "none" means uncompressed in spark.



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