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 2022/01/24 07:42:50 UTC

[GitHub] [shardingsphere] asp1111 edited a comment on issue #15014: proxy 5.0 not support row_number function

asp1111 edited a comment on issue #15014:
URL: https://github.com/apache/shardingsphere/issues/15014#issuecomment-1019793070


   ### here is exception message
   ![image](https://user-images.githubusercontent.com/13173179/150731377-6f1b9626-4f3d-42d1-b388-1ed149acf198.png)
   ### reproduce this problem
   set up two database , create user table  
   ```sql
       CREATE TABLE `aiot_t_user` (
         `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
         `tenantId` char(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
         `departmentId` bigint DEFAULT NULL ,
         `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL ,
          `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ,
         PRIMARY KEY (`id`) USING BTREE,
       ) ENGINE=InnoDB AUTO_INCREMENT=399 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
   ```
   
   customize  shardingAlggorithm and run sql
   
   ```sql
       SELECT
   	    id,
   	    ROW_NUMBER() OVER ( PARTITION BY departmentId ORDER BY createTime DESC ) 
       FROM
   	    aiot_t_user 
       WHERE
   	    tenantId = "1004200"
   ```
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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