Thanks for your attention, Li. I agree with you and Cao that in theory join 
hint should support alias just like other popular computing engines and dbs. 
But the main difficult is that currently, calcite will ignore the alias when 
converting SqlNode to RelNode, so the information about alias will not be 
retained. I think it's not a good idea to fix it in Flink because this work 
will change many codes that belong to Calcite and cause many copied files from 
Calcite. We can support this feature in the future and temporarily throw an 
exception just like the behavior that the name of the table or view could not 
be found.




What do you think about this.




--

    Best!
    Xuyang





At 2022-05-09 12:50:28, "Jingsong Li" <jingsongl...@gmail.com> wrote:
>Thanks Xuyang for driving.
>
>zoucao also mentioned alias.
>
>Can you explain in the FLIP why alias is not supported? What are the
>difficulties and maybe we can try to overcome them. Or how do we need
>to report errors if we don't support it.
>
>Best,
>Jingsong
>
>On Mon, May 9, 2022 at 10:53 AM Xuyang <xyzhong...@163.com> wrote:
>>
>> Hi, Jark. Thanks for your review. <br/>&gt;Join Hint is a public API for SQL 
>> syntax. It should work for both streaming and batch SQL.<br/>I agree with 
>> your opinion. But currently, only in batch the optimizer has different Join 
>> strategies for Join and there is no choice of join strategies in the stream. 
>> The join hints listed in the current flip should be ignored (maybe can be 
>> warned) in streaming mode.  When in the future the stream mode has the 
>> choice of join strategies, I think that's a good time to discuss that the 
>> join hint can affect the streaming SQL.<br/><br/>&gt;Besides that, could you 
>> move your design docs into the wiki?<br/>Thanks for your reminder, I have 
>> moved the content from doc to the wiki.
>> At 2022-05-07 12:46:18, "Jark Wu" <imj...@gmail.com> wrote:
>> >Hi Xuyang,
>> >
>> >Thanks for starting this discussion. Join Hint is a long-time requested
>> >feature.
>> >I have briefly gone through the design doc. Join Hint is a public API for
>> >SQL syntax.
>> >It should work for both streaming and batch SQL. I understand some special
>> >hints
>> >may only work for batch SQL. Could you demonstrate how the hints affect
>> >stream SQL as well?
>> >
>> >Besides that, could you move your design docs into the wiki?
>> >Google docs are usually used for offline discussion.
>> >The discussion on google docs is not very visible to the community.
>> >So we would like to move designs to the wiki and move discussions to the
>> >mailing list.
>> >
>> >Best,
>> >Jark
>> >
>> >
>> >
>> >
>> >On Fri, 6 May 2022 at 11:07, Xuyang <xyzhong...@163.com> wrote:
>> >
>> >> Hi, all.
>> >>     I want to start a discussion about the FLIP-229: Introduces Join Hint
>> >> for Flink SQL Batch Job(The cwiki[1] is not ready completely but you can
>> >> see the whole details in docs[2]).
>> >> Join Hint is a common solution in many popular computing engines and DBs
>> >> to improve the shortcomings of the optimizer by intervening in optimizing
>> >> the plan. By Join Hint, users can intervene in the selection of the join
>> >> strategy in optimizer, and manually optimize the execution plan to improve
>> >> the performance of the query.
>> >>     In this FLIP, we propose some join hints by the existing join
>> >> strategies in Flink SQL for Batch job.
>> >> I'm look forward to your feedback about FLIP-229.
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >>     Best!
>> >>     Xuyang
>> >>
>> >>
>> >> [1]
>> >> https://cwiki.apache.org/confluence/display/FLINK/FLIP-229%3A+Introduces+Join+Hint+for+Flink+SQL+Batch+Job
>> >> [2]
>> >> https://docs.google.com/document/d/1IL00ME0Z0nlXGDWTUPODobVQMAm94PAPr9pw9EdGkoQ/edit?usp=sharing

Reply via email to