Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11868

min ( distinct ) over ( ) returns wrong value

    XMLWordPrintable

Details

    Description

      10.2.3 beta

      The following query works

      select TDEC.CDEC, min( distinct TDEC.CDEC ) over () from TDEC 
       
      CDEC	min( distinct TDEC.CDEC ) over ()
      <null>	-1
      -1	-1
      0	-1
      1	-1
      0.1	-1
      10	-1
      

      The same query applied to a simple view that projects the table does not

      select `tdec`.`RNUM` AS `RNUM`,`tdec`.`CDEC` AS `CDEC` from `tdec` 
       
       
      select VDEC.CDEC, min( distinct VDEC.CDEC ) over () from VDEC 
       
      CDEC	min( distinct VDEC.CDEC ) over ()
      <null>	10
      -1	10
      0	10
      1	10
      0.1	10
      10	10
      

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            the6campbells the6campbells
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.