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

Configuration "parallelism.default" doesn't take effect for TableEnvironment#explainSql

    XMLWordPrintableJSON

    Details

      Description

      I tried the following test, and the printed node parallelism in json plan is not 5.

        @Test
        def testExplainAndExecuteSingleSink(): Unit = {
          val env = TableEnvironmentImpl.create(settings)
          val conf = new Configuration();
          conf.setInteger("parallelism.default", 5)
          conf.setInteger("taskmanager.numberOfTaskSlots", 1)
          env.getConfig.addConfiguration(conf)
          TestTableSourceSinks.createCsvTemporarySinkTable(
            env, new TableSchema(Array("first"), Array(STRING)), "MySink1")
          TestTableSourceSinks.createPersonCsvTemporaryTable(env, "MyTable")
          println(env.explainSql("insert into MySink1 select first from MyTable",
            ExplainDetail.JSON_EXECUTION_PLAN))
      }
      

      I think the bug is because TableEnvironemnt#explain will not invoke PlannerBase#translate(modifyOperations: util.List[ModifyOperation]) where we configure the configuration into underlying StreamExecutionEnvironment.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nicholasjiang Nicholas Jiang
                Reporter:
                jark Jark Wu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: