Hisoka-X commented on code in PR #41855:
URL: https://github.com/apache/spark/pull/41855#discussion_r1314497081


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -180,6 +180,37 @@ abstract class JdbcDialect extends Serializable with 
Logging {
     statement.executeUpdate(s"CREATE TABLE $tableName ($strSchema) 
$createTableOptions")
   }
 
+  /**
+   * Returns an Insert SQL statement for inserting a row into the target table 
via JDBC conn.
+   * @param table The name of the table.
+   * @param rddSchema The schema of the row that will be inserted.
+   * @param tableSchema The schema of the table.
+   * @return The SQL query to use for insert data into table.
+   */
+  @Since("4.0.0")
+  def getInsertStatement(

Review Comment:
   I mean the behavior of `getInsertStatement` is return the string SQL, unlike 
`createTable`, `alterTable`, `dropTable` do create/alter/drop to database. The 
`getInsertStatement` dosen't insert data into table, it just used to prepare 
JDBCStatement, change it to `insertIntoTable` seem like not match with it 
behavior.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to