Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20670

Support query hints for Flink SQL

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Table SQL / API
    • None

    Description

      Now Flink has supported dynamic table options based on the Hint framework of Calcite. Besides this, Hint syntax is also very useful for query optimization, as there is no perfect planner, and query hints provide a mechanism to direct the optimizer to choose an efficient query execution plan based on the specific criteria.

      Currently, almost most popular databases and big-data frameworks support query hint, for example, Join hints in Oracle are used as following:

      SELECT /*+ USE_MERGE(employees departments) */ *
      FROM employees, departments 
      WHERE employees.department_id = departments.department_id; 
      

      Flink also have several join strategy for batch job, i.e., Nested-Loop, Sort-Merge and Hash Join, it will be convenient for users to produce an efficient join execution plan if Flink supports Join hint. Besides Join in batch job, it's also possible to use join hints to support partitioned temporal table join in future. In a word, query hint, especially join hint now, will benefit Flink users a lot.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              icshuo Shuo Cheng
              Votes:
              0 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated: