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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.4.1, 1.5.0
    • Table SQL / API
    • 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

              sunjincheng121 sunjincheng
              sunjincheng121 sunjincheng
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: