Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-5743

Set kylin.query.convert-sum-expression-enabled=true, fail to completely hit the aggregate index when the query contains sum (case when) expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0-beta
    • 5.0-beta
    • None
    • None

    Description

      select
        sum(
          case
            when LO_COMMITDATE = '20230501' then LO_DISCOUNT
          end
        )
      from
        (
          select
            LO_COMMITDATE,
            LO_DISCOUNT,
            LINEORDER.LO_ORDERDATE
          from
            ssb.LINEORDER
        ) a
      where
        LO_COMMITDATE = (
          select
            max(LO_COMMITDATE)
          from
            ssb.LINEORDER
        )
      LIMIT
        500
      

      Fix the sum case when in this scenario so that it hits aggregated indexes

      Attachments

        Activity

          People

            zhong.zhu zhong.zhu
            zhong.zhu zhong.zhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: