You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/05/27 04:12:53 UTC

[GitHub] [shardingsphere] azraelee opened a new issue #5797: CaseExpressionContext#simpleExpr may return NullPointException (version: 4.1.0)

azraelee opened a new issue #5797:
URL: https://github.com/apache/shardingsphere/issues/5797


   这个是我的项目sql:
   update xxx_table
           <trim prefix="set" suffixOverrides=",">
               <trim prefix="column1= case" suffix="end," >
                   <foreach collection="list" item="item" index="index">
                       <if test="item.column1 != null">
                           when id = #{item.id} then #{item.column1}
                       </if>
                   </foreach>
                   else column1
               </trim>
               <trim prefix="column2 = case" suffix="end," >
                   <foreach collection="list" item="item" index="index">
                       <if test="item.column2 != null">
                           when id = #{item.id} then #{item.column2}
                       </if>
                   </foreach>
                   else column2
               </trim>
           </trim>
           where
           <foreach collection="list" item="item" open="( " separator=") or (" close=" )">
               id = #{item.id}
           </foreach>
   
   当解析 <trim prefix="column1= case" suffix="end," > 这句时, 执行CaseExpressionContext#simpleExpr() 会返回空指针异常


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #5797: CaseExpressionContext#simpleExpr may return NullPointException (version: 4.1.0)(MYSQL)

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #5797:
URL: https://github.com/apache/shardingsphere/issues/5797#issuecomment-634124093


   **For English only**, other languages will not accept.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #5797: CaseExpressionContext#simpleExpr may return NullPointException (version: 4.1.0)(MYSQL)

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #5797:
URL: https://github.com/apache/shardingsphere/issues/5797


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #5797: CaseExpressionContext#simpleExpr may return NullPointException (version: 4.1.0)(MYSQL)

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #5797:
URL: https://github.com/apache/shardingsphere/issues/5797#issuecomment-633890776


   what's the logic sql executed?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org