strongduanmu commented on issue #11437:
URL: 
https://github.com/apache/shardingsphere/issues/11437#issuecomment-893563982


   According to the [calcite official 
documentation](https://calcite.apache.org/docs/reference.html), the JDBC 
function needs to be escaped before it can be executed. We need to rewrite the 
SQL to the following format:
   ```sql
   SELECT order_id, {fn IFNULL(SUM(cnt), 0)} AS totoal FROM (
        SELECT order_id, user_id, COUNT(1) AS cnt FROM t_order GROUP BY 
order_id, user_id
   ) a GROUP BY order_id;
   ```


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