Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support insert for Postgres hstore #1894

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Conversation

kasiafi
Copy link
Member

@kasiafi kasiafi commented Oct 29, 2019

This change allows to insert values of type MAP(VARCHAR, VARCHAR)
into a column of type Postgres hstore.

Complementary to #1101

This change allows to insert values of type MAP(VARCHAR, VARCHAR)
into a column of type Postgres hstore.
@cla-bot cla-bot bot added the cla-signed label Oct 29, 2019
Copy link
Member

@martint martint left a comment

Choose a reason for hiding this comment

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

Just one minor comment, but otherwise looks good.

@Override
public TestTable setupTestTable(List<DataTypeTest.Input<?>> inputs)
{
TestTable testTable = createTestTable(inputs);
Copy link
Member

Choose a reason for hiding this comment

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

You can use try-with-resouces

try (TestTable testTable = createTestTable(inputs)) {
    insertRows(testTable, inputs);
    return testTable;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think I can do this. testTable must survive beyond this block.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, that's right. I just saw the close() in the catch block and missed that.

@martint martint merged commit f4e5002 into trinodb:master Oct 30, 2019
@martint martint added this to the 324 milestone Oct 30, 2019
@martint martint mentioned this pull request Oct 31, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants