Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-30926 [Umbrella] Test Flink Release 1.17
  3. FLINK-31025

Release Testing: Verify FLINK-30650 Introduce EXPLAIN PLAN_ADVICE to provide SQL advice

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Blocker
    • Resolution: Done
    • 1.17.0
    • 1.17.0
    • Table SQL / API
    • None

    Description

      This ticket aims for verifying FLINK-30650: Introduce EXPLAIN PLAN_ADVICE to provide SQL advice.

      More details about this feature and how to use it can be found in this documentation.

      The verification is divided into two parts:

      Part I: Verify "EXPLAIN PLAN_ADVICE" can work with different queries under the streaming mode, such as a single select/insert/statement set w/ or w/o sub-plan reuse (configured by "table.optimizer.reuse-sub-plan-enabled").

      This indicates once specifying the ExplainDetail as "PLAN_ADVICE"

      EXPLAIN PLAN_ADVICE [SELECT ... FROM ...| INSERT INTO ...| EXECUTE STATEMENT SET BEGIN INSERT INTO ... END]
      

      You should find the output should be like the following format (note that the title is changed to "Optimized Physical Plan with Advice")

      == Abstract Syntax Tree ==
      ...
       
      == Optimized Physical Plan With Advice ==
      ...
       
       
      == Optimized Execution Plan ==
      ...
      

      The available advice is attached at the end of "== Optimized Physical Plan With Advice ==", and in front of  "== Optimized Execution Plan =="

      If switching to batch mode, you should find the "EXPLAIN PLAN_ADVICE" should throw UnsupportedOperationException as expected.

       

      Part II: Verify the advice content

      Write a group aggregate query, and enable/disable the local-global two-phase configuration, and test the output.

      You should find once the following configurations are enabled, you will get the "no available advice..." output.

      table.exec.mini-batch.enabled
      table.exec.mini-batch.allow-latency
      table.exec.mini-batch.size
      table.optimizer.agg-phase-strategy 

      Attachments

        1. image-2023-02-13-14-48-53-758.png
          185 kB
          Weijie Guo
        2. image-2023-02-13-14-52-41-855.png
          681 kB
          Weijie Guo
        3. test1.png
          509 kB
          Weijie Guo

        Activity

          People

            Weijie Guo Weijie Guo
            qingyue Jane Chan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: