Skip to content

Conversation

@conorbmurphy
Copy link

What changes were proposed in this pull request?

The way JDBC writes currently work, they do not properly account for mixed case column names. Instead, the user has to use quotes on each column name. This change avoids that.

How was this patch tested?

Manual tests and working with @dougbateman and @gatorsmile

Please review http://spark.apache.org/contributing.html before opening a pull request.

val stride: Long = upperBound / numPartitions - lowerBound / numPartitions
val column = partitioning.column
val dialect = JdbcDialects.get(jdbcOptions.url)
val column = dialect.quoteIdentifier(partitioning.column)
Copy link
Member

Choose a reason for hiding this comment

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

We should do it in class JDBCOptions. To avoid breaking the behavior, we should eat the quotes if users manually specify them.

Copy link
Member

Choose a reason for hiding this comment

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

We also need to add a test case in PostgresIntegrationSuite

@gatorsmile
Copy link
Member

@conorbmurphy Could you create a JIRA and follow the instruction to make a contribution?

@conorbmurphy
Copy link
Author

Will do!

@dongjoon-hyun
Copy link
Member

Hi, @conorbmurphy .
Could you add a test case for your contribution, too?

@gatorsmile
Copy link
Member

ping @conorbmurphy

@gatorsmile
Copy link
Member

ping @conorbmurphy Are you still working on this? Otherwise, maybe @maropu can continue the work and finish it?

@maropu
Copy link
Member

maropu commented May 19, 2018

ya, I can take it over.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@asfgit asfgit closed this in f596ebe Jun 25, 2018
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.

5 participants