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

    https://github.com/apache/spark/pull/14518#discussion_r73914816
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala ---
    @@ -161,6 +161,29 @@ class OrcQuerySuite extends QueryTest with 
BeforeAndAfterAll with OrcTest {
         }
       }
     
    +  test("SPARK-16610: Respect orc.compress option when compression is 
unset") {
    +    // Respect `orc.compress`.
    +    withTempPath { file =>
    +      spark.range(0, 10).write
    +        .option("orc.compress", "ZLIB")
    +        .orc(file.getCanonicalPath)
    +      val expectedCompressionKind =
    +        
OrcFileOperator.getFileReader(file.getCanonicalPath).get.getCompression
    +      assert("ZLIB" === expectedCompressionKind.name())
    +    }
    +
    +    // `compression` overrides `orc.compress`.
    +    withTempPath { file =>
    +      spark.range(0, 10).write
    +        .option("compression", "ZLIB")
    +        .option("orc.compress", "SNAPPY")
    +        .orc(file.getCanonicalPath)
    +      val expectedCompressionKind =
    +        
OrcFileOperator.getFileReader(file.getCanonicalPath).get.getCompression
    +      assert("ZLIB" === expectedCompressionKind.name())
    +    }
    +  }
    --- End diff --
    
    nice. Thank you for adding this test.


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