Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-8325

Add COUNT AGG support constant parameter, i.e. COUNT(*), COUNT(1)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.4.1, 1.5.0
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      COUNT(1) with Group Window, always output 0.
      e.g.
      DATA:

      val data = List(
          (1L, 1, "Hi"),
          (2L, 2, "Hello"),
          (4L, 2, "Hello"),
          (8L, 3, "Hello world"),
          (16L, 3, "Hello world"))
      

      SQL:

      SELECT b, COUNT(1) FROM MyTable GROUP BY Hop(proctime, interval '0.001' SECOND, interval '0.002' SECOND),b
      

      OUTPUT:

      1,0,1, 
      1,0,1, 
      2,0,1,
      2,0,1, 
      2,0,2, 
      3,0,1,
      3,0,1
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              sunjincheng121 sunjincheng
              Reporter:
              sunjincheng121 sunjincheng

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment