Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1035

Convert() function 's result is diffrent, windowing function and order by list?

    XMLWordPrintable

Details

    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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            chenxinglong Allen Chan
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.