Skip to content

Conversation

@maropu
Copy link
Member

@maropu maropu commented Aug 10, 2020

What changes were proposed in this pull request?

This is a follow-up PR of #29192 that adds integration tests for character arrays in PostgresIntegrationSuite.

Why are the changes needed?

For better test coverage.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add tests.

@maropu
Copy link
Member Author

maropu commented Aug 10, 2020

@dongjoon-hyun Sorry to bother you, but could you check it again?

@kujon
Copy link
Contributor

kujon commented Aug 10, 2020

It's probably worth adding a SELECT query as well. That's how I discovered the issue.

@maropu
Copy link
Member Author

maropu commented Aug 10, 2020

Thanks for the comment, @kujon. A SELECT query has the almost same code path, so I think the curreent tests look fine.

@maropu maropu closed this in 7990ea1 Aug 10, 2020
maropu added a commit that referenced this pull request Aug 10, 2020
…ray types in PostgresIntegrationSuite

### What changes were proposed in this pull request?

This is a follow-up PR of #29192 that adds integration tests for character arrays in `PostgresIntegrationSuite`.

### Why are the changes needed?

For better test coverage.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Add tests.

Closes #29397 from maropu/SPARK-32576-FOLLOWUP.

Authored-by: Takeshi Yamamuro <[email protected]>
Signed-off-by: Takeshi Yamamuro <[email protected]>
(cherry picked from commit 7990ea1)
Signed-off-by: Takeshi Yamamuro <[email protected]>
@maropu
Copy link
Member Author

maropu commented Aug 10, 2020

Thanks, all! Merged to master/branch-3.0.

test("SPARK-32576: character array type tests") {
val df = sqlContext.read.jdbc(jdbcUrl, "char_array_types", new Properties)
val row = df.collect()
assert(row.length == 1)
Copy link
Member

Choose a reason for hiding this comment

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

super nit: ===

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I missed that. But, its trivial, so I'll fix it next time I update this file. Anyway, thanks for the check, @yaooqinn

Copy link
Member

Choose a reason for hiding this comment

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

That's alright. We don't currently have a style rule for that. == is already being used here and there too though I prefer === as well because it can compare, for example, arrays properly with a good error message.

@SparkQA
Copy link

SparkQA commented Aug 10, 2020

Test build #127275 has finished for PR 29397 at commit 37e7c32.

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

@SparkQA
Copy link

SparkQA commented Aug 10, 2020

Test build #127277 has finished for PR 29397 at commit 9907bf5.

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

@dongjoon-hyun
Copy link
Member

Thank you for adding the test coverage, @maropu ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants