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

Fix TupleExpression verification when parsing sql

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: v2.4.0
    • Fix Version/s: v2.4.1, v2.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Previously there's a validation check for sql, since dynamic column does not support sum(col1/col2). However, if the sql has a subquery and sum(col1/col2) is in the main query rather than the sub-query, this should be OK. One example is as follows:

      select T1.D1, sum(T1.gmv/T2.gmv)
      from 
      (select D1, D2, sum(M1) as gmv
      from T
      group by D1, D2) T1
      inner join
      (select D1, D2, sum(M2) as gmv
      from T
      group by D1, D2) T2
      on T1.D1 = T2.D1
      group by T1.D1
      

      Since the outside sum(T1.gmv/T2.gmv) is handled by calcite rather than Kylin, it's OK and should not go through the verification.

        Attachments

        1. APACHE-KYLIN-3476.patch
          6 kB
          Zhong Yanghong
        2. b134-12adb0383568.png
          186 kB
          Shao Feng Shi
        3. image-2018-08-06-17-58-18-760.png
          181 kB
          Shao Feng Shi

        Issue Links

          Activity

            People

            • Assignee:
              yaho Zhong Yanghong
              Reporter:
              yaho Zhong Yanghong

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment