Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Feb 28, 2017

What changes were proposed in this pull request?

This issue removes a test case which was introduced by SPARK-14459 and was superseded by SPARK-16033. 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")
      }
    }
  }

How was this patch tested?

This only removes a test case. Pass the existing Jenkins test.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally @rdblue can confirm

@dongjoon-hyun
Copy link
Member Author

Right, thank you, @srowen .

@rdblue
Copy link
Contributor

rdblue commented Feb 28, 2017

+1

Looks fine to me. partitionBy support with insertInto was removed. This is probably still passing because it expects an analysis exception that is thrown for a different reason. We should update assertions like this to verify the error message to avoid that in the future.

@dongjoon-hyun
Copy link
Member Author

Thank you for the review, @rdblue !

@SparkQA
Copy link

SparkQA commented Mar 1, 2017

Test build #73618 has finished for PR 17106 at commit 6276818.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Mar 1, 2017

Merged to master

@asfgit asfgit closed this in db0ddce Mar 1, 2017
@dongjoon-hyun
Copy link
Member Author

Thank you for merging, @srowen .

@dongjoon-hyun dongjoon-hyun deleted the SPARK-19775 branch March 2, 2017 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants