Oliver-GMJ commented on issue #26922:
URL: 
https://github.com/apache/shardingsphere/issues/26922#issuecomment-1637827351

   Found other error when using `INSERT INTO ... ON CONFLICT ...`.
   It makes mybatis preparing statement failed.
   Are there any way to make `ShardingSphere` only parse SQL from `sharding 
table`, except normal single tables.
   There are series of SQL problems with `mybatis` especially `PostgresQL`, 
some features can't be analyzed.
   ```xml
   <insert id="demoBatchInsert">
     INSERT INTO temp_test_gmj VALUES
     <foreach collection="records" item="item" separator=",">
       <trim prefix="  (" suffix=") ">
         #{item.id},
         #{item.name}
       </trim>
     </foreach>
     ON CONFLICT(id, name) DO NOTHING
   </insert>
   ```
   Exception:
   ```
   nested exception is org.apache.ibatis.executor.ExecutorException: Error 
preparing statement.
   Cause: java.lang.NullPointerException
   ```


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