KONEONE opened a new issue, #9936:
URL: https://github.com/apache/seatunnel/issues/9936

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   这是我的定义,sink为终端。
   ```json
   env {  
       parallelism = 1  
       job.mode = "STREAMING"  
       job.name = "demo_ETL"  
       checkpoint.interval = 1000  
   }  
     
   source {  
       Kafka {  
          plugin_output = "kafka_table"  
          topic = "demo"  
          bootstrap.servers = "localhost:9092"  
          start_mode = "latest"  
          consumer.group = "demo_group"  
          kafka.config = {  
               security.protocol = SASL_PLAINTEXT  
               sasl.mechanism = PLAIN  
               sasl.jaas.config = 
"org.apache.kafka.common.security.plain.PlainLoginModule required 
username=\"admin\" password=\"admin\";"  
               max.poll.records = 10000  
               fetch.max.bytes = 20971520  
          }  
           format = json  
           schema = {  
               fields = {   
                   organization_id = string   
                   source = {  
                       name = string  
                       link = string  
                       }  
                   }  
               }  
       }  
   }  
   
   ```
   
   在初始化kafka 
source的时候报错,报错为:https://github.com/apache/seatunnel/blob/dev/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/SeaTunnelDataTypeConvertorUtil.java
 的 115行报错空指针。具体代码如下:
   ```java
    switch (declare.trim().toUpperCase()) {    <- 这行报空指针了
               case "LONG":
                   return "BIGINT";
               case "SHORT":
                   return "SMALLINT";
               case "BYTE":
                   return "TINYINT";
               default:
                   return declare;
           }
   ````
   
   我在测试的时候,进行如下操作:
   ```json
   -- 1. 删除:source
   fields = {   
                   organization_id = string   
                   }  
   
   -- 2. 修改 source
     fields = {   
                   organization_id = string   
                   source = string
   }
   ```
   上面这2种都没有问题。但是如果是复杂类型就报错了。
   
   ### SeaTunnel Version
   
   2.3.12
   
   ### SeaTunnel Config
   
   ```conf
   null
   ```
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel --config demo/demo.config -m local
   ```
   
   ### Error Exception
   
   ```log
   空指针报错
   ```
   
   ### Zeta or Flink or Spark Version
   
   zeta
   
   ### Java or Scala Version
   
   11
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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