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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          Activity

            People

            • Assignee:
              nicholasjiang Nicholas Jiang
              Reporter:
              jark Jark Wu

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment