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

    https://github.com/apache/spark/pull/8132#discussion_r36951210
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/sources/hadoopFsRelationSuites.scala
 ---
    @@ -554,6 +556,21 @@ abstract class HadoopFsRelationTest extends QueryTest 
with SQLTestUtils {
           clonedConf.foreach(entry => configuration.set(entry.getKey, 
entry.getValue))
         }
       }
    +
    +  test("SPARK-8887: Explicitly define which data types can be used as 
dynamic partition columns") {
    +    val df = Seq(
    +      (1, "v1", Date.valueOf("2015-08-10")),
    +      (2, "v2", Date.valueOf("2015-08-11")),
    +      (3, "v3", Date.valueOf("2015-08-12"))).toDF("a", "b", "c")
    +    withTempDir { file =>
    +      intercept[AnalysisException] {
    +        
df.write.format(dataSourceName).partitionBy("c").save(file.getCanonicalPath)
    +      }
    +    }
    +    intercept[AnalysisException] {
    +      df.write.format(dataSourceName).partitionBy("c").saveAsTable("t")
    +    }
    --- End diff --
    
    Oh I see, makes sense.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to