Skip to content

Conversation

@maropu
Copy link
Member

@maropu maropu commented Aug 10, 2020

What changes were proposed in this pull request?

This PR intends to add tests to check if all the character types in PostgreSQL supported.

The document for character types in PostgreSQL: https://www.postgresql.org/docs/current/datatype-character.html

Closes #29192.

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 I checked manually that we've already supported the character types. So, I opened this PR to just add some trivial tests in the integration test. Could you check this?

"""ARRAY['{"a": 1, "b": 2, "c": 3}']::jsonb[])"""
)
.executeUpdate()
).executeUpdate()
Copy link
Member Author

Choose a reason for hiding this comment

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

nit: Updated this line to fix the wired format.

@dongjoon-hyun
Copy link
Member

Oh, thanks, @maropu .

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

Since this is an integration test, I verified it manually.

PostgresIntegrationSuite:
- Type mapping for various types
- Basic write test
- Creating a table with shorts and floats
- SPARK-20557: column type TIMESTAMP with TIME ZONE and TIME with TIME ZONE should be recognized
- SPARK-22291: Conversion error when transforming array types of uuid, inet and cidr to StingType in PostgreSQL
- query JDBC option
- write byte as smallint
- character type tests

In addition to that, since the IT has a read test only, I verified that Apache Spark 3.0.0 can write to bpchar column successfully.

Thank you, @maropu .

Merged to master/3.0.

dongjoon-hyun pushed a commit that referenced this pull request Aug 10, 2020
…tgresIntegrationSuite

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

This PR intends to add tests to check if all the character types in PostgreSQL supported.

The document for character types in PostgreSQL: https://www.postgresql.org/docs/current/datatype-character.html

Closes #29192.

### 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 #29394 from maropu/pr29192.

Lead-authored-by: Takeshi Yamamuro <[email protected]>
Co-authored-by: kujon <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit b2c45f7)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Ur, BTW, while updating JIRA, I found that the original JIRA example is different.
We verified that c4 bpchar. But, the original example is ARRAY.

@SparkQA
Copy link

SparkQA commented Aug 10, 2020

Test build #127247 has finished for PR 29394 at commit dd38211.

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

@maropu
Copy link
Member Author

maropu commented Aug 10, 2020

Ur, BTW, while updating JIRA, I found that the original JIRA example is different.
We verified that c4 bpchar. But, the original example is ARRAY.

Ur, I see. I misunderstood it a bit.

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.

4 participants