javalover123 commented on PR #5014:
URL: https://github.com/apache/seatunnel/pull/5014#issuecomment-1659442509

   Update, please check, thanks. @wu-a-ge 
   In another way, Number.*Value() method performance should be better when run 
with JDK 9 or above.  
   
![image](https://github.com/apache/seatunnel/assets/9191388/5fa9ebeb-7f13-4d73-be6a-f75e924ec3a7)
   
   ```java
                   case TINYINT:
                       statement.setByte(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).byteValue());
                       break;
                   case SMALLINT:
                       statement.setShort(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).shortValue());
                       break;
                   case INT:
                       statement.setInt(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).intValue());
                       break;
                   case BIGINT:
                       statement.setLong(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).longValue());
                       break;
                   case FLOAT:
                       statement.setFloat(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).floatValue());
                       break;
                   case DOUBLE:
                       statement.setDouble(
                               statementIndex, ((Number) 
row.getField(fieldIndex)).doubleValue());
   ```


-- 
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]

Reply via email to