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

Support query hints for Flink SQL

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: Table SQL / API
    • Labels:
      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

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              icshuo Shuo Cheng
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: