ic4y commented on code in PR #3362:
URL:
https://github.com/apache/incubator-seatunnel/pull/3362#discussion_r1024827496
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcUtils.java:
##########
@@ -39,21 +47,31 @@ public class JdbcUtils {
* attempted in order to insert a null value but it's not guaranteed that
the JDBC driver
* handles PreparedStatement.setObject(pos, null))
*
- * @param upload The prepared statement.
+ * @param upload The prepared statement.
* @param typesArray The jdbc types of the row.
- * @param row The records to add to the output.
+ * @param row The records to add to the output.
* @see PreparedStatement
*/
public static void setRecordToStatement(PreparedStatement upload, int[]
typesArray, SeaTunnelRow row)
- throws SQLException {
+ throws SQLException {
if (typesArray != null && typesArray.length > 0 && typesArray.length
!= row.getFields().length) {
LOG.warn(
- "Column SQL types array doesn't match arity of passed Row!
Check the passed array...");
+ "Column SQL types array doesn't match arity of passed Row!
Check the passed array...");
}
if (typesArray == null) {
// no types provided
for (int index = 0; index < row.getFields().length; index++) {
- upload.setObject(index + 1, row.getFields()[index]);
Review Comment:
In #3444, there is a better way to do it. It is recommended to wait for
#3444 to be merged first
--
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]