spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <>
Subject [jira] [Created] (SPARK-19775) Remove an obsolete `partitionBy().insertInto()` test case
Date Tue, 28 Feb 2017 22:47:45 GMT
Dongjoon Hyun created SPARK-19775:

             Summary: Remove an obsolete `partitionBy().insertInto()` test case
                 Key: SPARK-19775
             Project: Spark
          Issue Type: Bug
          Components: SQL, Tests
    Affects Versions: 2.1.0
            Reporter: Dongjoon Hyun
            Priority: Trivial

This issue removes [a test case|]
which was introduced by [SPARK-16033|]
and was superseded by [SPARK-14459|].
Basically, we cannot use `partitionBy` and `insertInto` together.

  test("Reject partitioning that does not match table") {
    withSQLConf(("hive.exec.dynamic.partition.mode", "nonstrict")) {
      sql("CREATE TABLE partitioned (id bigint, data string) PARTITIONED BY (part string)")
      val data = (1 to 10).map(i => (i, s"data-$i", if ((i % 2) == 0) "even" else "odd"))
          .toDF("id", "data", "part")

      intercept[AnalysisException] {
        // cannot partition by 2 fields when there is only one in the table definition
        data.write.partitionBy("part", "data").insertInto("partitioned")

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message