-
Notifications
You must be signed in to change notification settings - Fork 28k
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-10946][SQL]JDBC - Use Statement.executeUpdate instead of PreparedStatement.executeUpdate for DDLs #9733
Conversation
…redStatement.executeUpdate for DDLs
I agree with this, and am OK to merge this. |
Test build #2063 has finished for PR 9733 at commit
|
@@ -120,7 +120,7 @@ private[sql] object JDBCRDD extends Logging { | |||
val dialect = JdbcDialects.get(url) | |||
val conn: Connection = getConnector(properties.getProperty("driver"), url, properties)() | |||
try { | |||
val rs = conn.prepareStatement(s"SELECT * FROM $table WHERE 1=0").executeQuery() | |||
val rs = conn.createStatement.executeQuery(s"SELECT * FROM $table WHERE 1=0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah hang on a sec, I see you've changed some non-DDL statements in this version of the PR. The change is just about avoiding PreparedStatement
for DDL right? My earlier comments were about closing resources for a bunch of queries including non-DDL. But if you're only addressing DDL, then your last PR was fine (before it was corrupted).
OK,I will remove non-DDL statements and create new pull request. |
You don't need a new PR, just push a new commit here. It's better, as it preserves the history of the discussion. |
…redStatement.executeUpdate for DDLs
I have push new commit to SomilBranch-1.1 |
Merged to master/1.6 |
New changes with JDBCRDD