[jira] [Created] (FLINK-21069) Configuration "parallelism.default" doesn't take effect for TableEnvironment#explainSql

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-21069) Configuration "parallelism.default" doesn't take effect for TableEnvironment#explainSql

Shang Yuanchun (Jira)
Jark Wu created FLINK-21069:
-------------------------------

             Summary: Configuration "parallelism.default" doesn't take effect for TableEnvironment#explainSql
                 Key: FLINK-21069
                 URL: https://issues.apache.org/jira/browse/FLINK-21069
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
            Reporter: Jark Wu
             Fix For: 1.13.0


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

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

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}}.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)