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

AggregateProjectPullUpConstantsRule causes fields to be out of order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0, 1.16.0
    • None
    • core
    • None

    Description

      the sql:

      select * FROM( SELECT plat, category, rid, populary_num FROM panda_com.crawler_anchor WHERE
                                                   par_date = '20180819'
                                           AND     plat = 'huya'
                                           AND     rid = 'meijiao'
                          ) a
           JOIN
                   (
                           SELECT DISTINCT
                                   'huya' plat         ,
                                   edwin.privatehost ,
                                   edwin.profileroom
                           FROM
                                   panda_com.ol_huya_isOnline edwin
                           WHERE
                                   par_date = '20180819' ) m9
           ON
                   a.rid= m9.privatehost
           AND     a.plat = m9.plat

      the result:

       

      huya yule meijiao 30 huya 10001242 meijiao
      
      

       

      but the desired result is:

       

      huya yule meijiao 30 huya meijiao 10001242  
      
      

       

      cause:

      hepPlanner use AggregateProjectPullUpConstantsRule:


      after add fix patch:

      Attachments

        1. image-2020-02-01-01-33-54-111.png
          139 kB
          hezhang
        2. image-2020-02-01-01-29-49-479.png
          135 kB
          hezhang
        3. calcite-3762.patch
          2 kB
          hezhang

        Activity

          People

            Unassigned Unassigned
            heiheizhang hezhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: