File tree Expand file tree Collapse file tree
chunjun-connectors/chunjun-connector-jdbc-base/src/main/java/com/dtstack/chunjun/connector/jdbc/source
chunjun-core/src/main/java/com/dtstack/chunjun/element Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -868,11 +868,12 @@ protected void executeQuery(String startLocation) throws SQLException {
868868 state = startLocation ;
869869 }
870870 } else {
871- statement = dbConn .createStatement (resultSetType , resultSetConcurrency );
872- statement .setFetchSize (jdbcConf .getFetchSize ());
873- statement .setQueryTimeout (jdbcConf .getQueryTimeOut ());
874- resultSet = statement .executeQuery (jdbcConf .getQuerySql ());
875- hasNext = resultSet .next ();
871+ // statement = dbConn.createStatement(resultSetType, resultSetConcurrency);
872+ // statement.setFetchSize(jdbcConf.getFetchSize());
873+ // statement.setQueryTimeout(jdbcConf.getQueryTimeOut());
874+ // resultSet = statement.executeQuery(jdbcConf.getQuerySql());
875+ // hasNext = resultSet.next();
876+ throw new UnsupportedOperationException ("must be polling" );
876877 }
877878 }
878879
Original file line number Diff line number Diff line change @@ -240,8 +240,13 @@ public StringData getString(int pos) {
240240
241241 @ Override
242242 public DecimalData getDecimal (int pos , int precision , int scale ) {
243- BigDecimal bigDecimal = this .columnList .get (pos ).asBigDecimal ();
244- return DecimalData .fromBigDecimal (bigDecimal , bigDecimal .precision (), bigDecimal .scale ());
243+
244+ // baisui modify 2022/07/29
245+ AbstractBaseColumn col = this .columnList .get (pos );
246+ BigDecimal bigDecimal = (BigDecimal ) col .getData ();
247+ // =this.columnList.get(pos).asBigDecimal();
248+ // return DecimalData.fromBigDecimal(bigDecimal, bigDecimal.precision(), bigDecimal.scale());
249+ return DecimalData .fromBigDecimal (bigDecimal , precision , scale );
245250 }
246251
247252 @ Override
Original file line number Diff line number Diff line change @@ -104,7 +104,13 @@ public String asTimestampStr() {
104104
105105 @ Override
106106 public Integer asInt () {
107- throw new CastException ("java.sql.Time" , "Integer" , this .asString ());
107+ // throw new CastException("java.sql.Time", "Integer", this.asString());
108+
109+ Time time = asTime ();
110+ if (time == null ) {
111+ return null ;
112+ }
113+ return (int ) time .getTime ();
108114 }
109115
110116 @ Override
You can’t perform that action at this time.
0 commit comments