Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11431

[Rust] [DataFusion] Add support for the SQL HAVING clause

Details

    Description

      We do not yet have support for the SQL HAVING clause. HAVING is used to filter post-aggregation, typically against an aggregated column. For example:

      SELECT c1, MAX(c2) FROM t GROUP BY c1 HAVING MAX(c2) > 100
      

      HAVING expressions need not reference aggregates in the SELECT, for example:

      SELECT c1, MAX(c2) FROM t GROUP BY c1 HAVING MIN(c2) > 100
      

      HAVING expressions need not filter on aggregated columns, for example:

      SELECT c1, MAX(c2) FROM t GROUP BY c1 HAVING c1 > 100
      

      Lastly, HAVING expressions need not be used in conjunction with a GROUP BY, for example:

      SELECT MAX(c1) FROM t HAVING MAX(c1) > 100
      

      Attachments

        Issue Links

          Activity

            People

              drusso Daniel Russo
              drusso Daniel Russo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 50m
                  4h 50m

                  Slack

                    Issue deployment