[
https://issues.apache.org/jira/browse/CALCITE-3762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
hezhang updated CALCITE-3762:
-----------------------------
Attachment: image-2020-02-01-01-32-32-485.png
> AggregateProjectPullUpConstantsRule causes fields to be out of order
> --------------------------------------------------------------------
>
> Key: CALCITE-3762
> URL: https://issues.apache.org/jira/browse/CALCITE-3762
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.10.0, 1.16.0
> Reporter: hezhang
> Priority: Major
> Fix For: 1.16.0
>
> Attachments: image-2020-02-01-01-29-49-479.png,
> image-2020-02-01-01-32-32-485.png
>
>
> the sql:
> {code:java}
> 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{code}
> the result:
>
> {code:java}
> huya yule meijiao 30 huya 10001242 meijiao
> {code}
>
> but the desired result is:
>
> {code:java}
> huya yule meijiao 30 huya meijiao 10001242
> {code}
>
> *cause:*
> hepPlanner use AggregateProjectPullUpConstantsRule:
> !image-2020-02-01-01-29-49-479.png!
> after add fix patch:
> !image-2020-02-01-01-32-32-485.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)