This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f82237  [SPARK-27501][SQL][TEST] Add test for HIVE-13083: Writing 
HiveDecimal to ORC can wrongly suppress present stream
8f82237 is described below

commit 8f82237a5b1865fc78778231c310bc7f3d66cf42
Author: Yuming Wang <yumw...@ebay.com>
AuthorDate: Fri Apr 19 10:12:21 2019 +0900

    [SPARK-27501][SQL][TEST] Add test for HIVE-13083: Writing HiveDecimal to 
ORC can wrongly suppress present stream
    
    ## What changes were proposed in this pull request?
    
    This PR add test for 
[HIVE-13083](https://issues.apache.org/jira/browse/HIVE-13083): Writing 
HiveDecimal to ORC can wrongly suppress present stream.
    
    ## How was this patch tested?
    manual tests:
    ```
    build/sbt  "hive/testOnly *HiveOrcQuerySuite" -Phive -Phadoop-3.2
    ```
    
    Closes #24397 from wangyum/SPARK-26437.
    
    Authored-by: Yuming Wang <yumw...@ebay.com>
    Signed-off-by: HyukjinKwon <gurwls...@apache.org>
---
 .../org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala      | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala
index 597b0f5..94f35b0 100644
--- 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala
+++ 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala
@@ -218,4 +218,14 @@ class HiveOrcQuerySuite extends OrcQueryTest with 
TestHiveSingleton {
       }
     }
   }
+
+  test("SPARK-26437 Can not query decimal type when value is 0") {
+    assume(HiveUtils.isHive23, "bad test: This bug fixed by HIVE-13083(Hive 
2.0.1)")
+    withSQLConf(HiveUtils.CONVERT_METASTORE_ORC.key -> "false") {
+      withTable("spark_26437") {
+        sql("CREATE TABLE spark_26437 STORED AS ORCFILE AS SELECT 0.00 AS c1")
+        checkAnswer(spark.table("spark_26437"), Seq(Row(0.00)))
+      }
+    }
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to