Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-21454 FLIP-163: SQL Client Improvements
  3. FLINK-20562

Support ExplainDetails for EXPLAIN sytnax

    XMLWordPrintableJSON

Details

    Description

      Currently, EXPLAIN syntax only supports to print the default AST, logical plan, and physical plan. However, it doesn't support to print detailed information such as CHANGELOG_MODE, ESTIMATED_COST, JSON_EXECUTION_PLAN which are defined in ExplainDetail.

      Allow users to specify the ExplainDetails in statement.

      EXPLAIN [ExplainDetail[, ExplainDetail]*] <statement>
      
      
      
      ExplainDetail: {
      
        ESTIMATED_COST,
      
        CHANGELOG_MODE,
      
        JSON_EXECUTION_PLAN
      
      }
      

      Print the plan for the statement with specified ExplainDetails.

      ESTIMATED_COST
      generates cost information on physical node estimated by optimizer, e.g. TableSourceScan(..., cumulative cost =

      {1.0E8 rows, 1.0E8 cpu, 2.4E9 io, 0.0 network, 0.0 memory}

      )

      CHANGELOG_MODE
      generates changelog mode for every physical rel node. e.g. GroupAggregate(..., changelogMode=[I,UA,D])

      JSON_EXECUTION_PLAN
      generates the execution plan in json format of the program.

      Flink SQL> EXPLAIN ESTIMATED_COST, CHANGELOG SELECT * FROM MyTable;
      ...
      

      Attachments

        Issue Links

          Activity

            People

              ZhaoWeiNan WeiNan Zhao
              jark Jark Wu
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: