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

[SPARK-12387][SQL]JDBC IN operator push down #10345

Closed
wants to merge 1 commit into from
Closed

[SPARK-12387][SQL]JDBC IN operator push down #10345

wants to merge 1 commit into from

Conversation

huaxingao
Copy link
Contributor

Will push down SQL IN operator such as the following to JDBC datasource

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@@ -269,6 +269,13 @@ private[sql] class JDBCRDD(
case stringValue: String => s"'${escapeSql(stringValue)}'"
case timestampValue: Timestamp => "'" + timestampValue + "'"
case dateValue: Date => "'" + dateValue + "'"
case objectValue: Array[Object] => {
val str = objectValue.map {
case string: String => "'" + string + "'"
Copy link
Contributor

Choose a reason for hiding this comment

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

change line 274 to:
case stringValue: String => s"'${escapeSql(stringValue)}'"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bomeng
Thanks a lot for your comment. I will change.

@huaxingao
Copy link
Contributor Author

Close for now. Will put the filter changes in one PR so it's easier to merge

@huaxingao huaxingao closed this Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants