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

   ### 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
   
   When the data source fields are less than the target (Hive) fields, a null 
pointer error will be reported.
   
   ### SeaTunnel Version
   
   seatunnel-2.3.7-release
   
   ### SeaTunnel Config
   
   ```conf
   {
     env {
       execution.parallelism = 1
       job.mode = "BATCH"
       job.name = "seatunnel_batch_job"
     }
   
     source {
       JDBC {
         url = "jdbc:mysql://ip:port/?serverTimezone=Asia/Shanghai"
         driver = "com.mysql.jdbc.Driver"
         user = "root"
         password = "***"
         query = "select * from `test`.`testtable` where 1 = 1"
         split.size = 5000
         fetch_size = 2000
         parallelism = 1
         result_table_name = "result_table"
       }
     }
   
     sink {
       Hive {
         table_name = "test.testtable"
         metastore_uri = "thrift://ip1:9083,thrift://ip2:9083"
         hdfs_site_path = "/usr/local/hadoop3/etc/hadoop/hdfs-site.xml"
         hive_site_path = "/usr/local/hive/conf/hive-site.xml"
         parallelism = "1"
       }
     }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/start-seatunnel-flink-15-connector-v2.sh --config 
config/mysql2hive.config
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: java.lang.NullPointerException
          at 
org.apache.seatunnel.connectors.seatunnel.file.sink.writer.OrcWriteStrategy.buildSchemaWithRowType(OrcWriteStrategy.java:196)
   
org.apache.seatunnel.connectors.seatunnel.file.sink.writer.OrcWriteStrategy.getOrCreateWriter(OrcWriteStrategy.java:115)
   
org.apache.seatunnel.connectors.seatunnel.file.sink.writer.OrcWriteStrategy.write(OrcWriteStrategy.java:74)
   ....
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### 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