Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Do
-
1.0.11
-
CentOS 7
Description
show create table t_windowing_function_convert;
CREATE TABLE `t_windowing_function_convert` (
`ids` bigint(20) DEFAULT NULL,
`names` varchar(100) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
MariaDB [mcsinfo]> select * from t_windowing_function_convert;
---------------+
| ids | names |
---------------+
| 1 | 陈兴隆 |
| 1 | 贡娜 |
| 3 | 安逸 |
---------------+
3 rows in set (0.00 sec)
result 1:
MariaDB [mcsinfo]> select ids,names from t_windowing_function_convert order by convert(names using gbk) desc;
---------------+
| ids | names |
---------------+
| 1 | 贡娜 |
| 1 | 陈兴隆 |
| 3 | 安逸 |
---------------+
3 rows in set (0.02 sec)
result 2:
MariaDB [mcsinfo]> select ids,names, row_number() over(order by convert(names using gbk) desc) from t_windowing_function_convert;
------------------------------------------------------------------------
| ids | names | row_number() over(order by convert(names using gbk) desc) |
------------------------------------------------------------------------
| 1 | 陈兴隆 | 1 |
| 1 | 贡娜 | 2 |
| 3 | 安逸 | 3 |
------------------------------------------------------------------------
3 rows in set (0.00 sec)