Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4763

add EXISTS_AGG aggregate function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Add EXISTS_AGG, an aggregate function that returns whether count is greater than zero.

      Thus EXISTS_AGG(*) is equivalent to COUNT(*) > 0, and EXISTS_AGG(c) is equivalent to COUNT(c) > 0.

      EXISTS_AGG would mainly be of use internally. Since it produces a BOOLEAN value, we can use the value directly from an Aggregate without an intervening Project. It also captures the fact that we don't care how many rows were produced.

      See also TRUE_AGG, CALCITE-4334.

      Attachments

        Issue Links

          Activity

            People

              nobigo xiong duan
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: