cswangzheng opened a new issue, #4437:
URL: https://github.com/apache/incubator-seatunnel/issues/4437

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   we have found some issue when use jdbc partition column 
   
   1. id which use NUMBER(*) type can't be used as partition column since only 
int and long is supported in isNumber method. 
   
   2. if the result set is empty when get max(id) and min(id), npe will happen
   
   ### SeaTunnel Version
   
   2.3.0
   
   ### SeaTunnel Config
   
   ```conf
   env {
      # You can set flink configuration here
      execution.parallelism = 1
      job.mode = "BATCH"
    }
   
    source {
      # This is a example source plugin **only for test and demonstrate the 
feature source plugin**
   
     Jdbc {
             url = "jdbc:oracle:thin:@localhost:1521:helowin"
             driver = "oracle.jdbc.OracleDriver"
             connection_check_timeout_sec = 100
             user = "system"
             password = "system"
             query = "select * from OE.ORDERS"
             partition_column = "order_id"
   
         }
   
      # If you would like to get more information about how to configure 
seatunnel and see full list of source plugins,
      # please go to https://seatunnel.apache.org/docs/category/source-v2
    }
   
    transform {
    }
   
   sink {
   console {
   }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config ./config/example.conf -e local
   ```
   
   
   ### Error Exception
   
   ```log
   1. Decimal is not number
   
org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException:
 ErrorCode:[COMMON-06], ErrorDescription:[Illegal argument] - ORDER_ID is not 
numeric type
   
   2. NPE when use  partition column with empty result
   2023-03-29 09:52:17,577 ERROR org.apache.seatunnel.core.starter.Seatunnel    
              [] - Exception 
StackTrace:org.apache.seatunnel.api.common.PrepareFailException: 
ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - 
PluginName: jdbc, PluginType: source, Message: java.lang.NumberFormatException: 
null
        at 
org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSource.prepare(JdbcSource.java:89)
        at 
org.apache.seatunnel.core.starter.flink.execution.SourceExecuteProcessor.initializePlugins(SourceExecuteProcessor.java:115)
        at 
org.apache.seatunnel.core.starter.flink.execution.AbstractPluginExecuteProcessor.<init>(AbstractPluginExecuteProcessor.java:54)
        at 
org.apache.seatunnel.core.starter.flink.execution.SourceExecuteProcessor.<init>(SourceExecuteProcessor.java:56)
   ```
   
   
   ### Flink or Spark Version
   
   1.16
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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