public static double shuffleCompressionRatio(
      SparkSession spark, FileFormat outputFileFormat, String outputCodec) {
    if (outputFileFormat == FileFormat.ORC || outputFileFormat == FileFormat.PARQUET) {
      return columnarCompression(shuffleCodec(spark), outputCodec);
    } else if (outputFileFormat == FileFormat.AVRO) {
      return rowBasedCompression(shuffleCodec(spark), outputCodec);
    } else {
      return 1.0;
    }
  }
@Test
  public void testUnknownCodecNames() {
    configureShuffle("SOME_SPARK_CODEC", true);

    double ratio1 = shuffleCompressionRatio(PARQUET, "SOME_PARQUET_CODEC");
    assertThat(ratio1).isEqualTo(2.0);

    double ratio2 = shuffleCompressionRatio(ORC, "SOME_ORC_CODEC");
    assertThat(ratio2).isEqualTo(2.0);

    double ratio3 = shuffleCompressionRatio(AVRO, "SOME_AVRO_CODEC");
    assertThat(ratio3).isEqualTo(1.0);
  }