godfreyhe commented on a change in pull request #14165:
URL: https://github.com/apache/flink/pull/14165#discussion_r536535874
##########
File path:
flink-table/flink-table-planner/src/test/scala/resources/testStatementSetExecutionExplain1.out
##########
@@ -0,0 +1,121 @@
+== Abstract Syntax Tree ==
+LogicalSink(name=[`default_catalog`.`default_database`.`targetTable`],
fields=[d, e])
+ LogicalProject(first=[$0], id=[$1])
+ LogicalTableScan(table=[[default_catalog, default_database, sourceTable]])
+
+== Optimized Logical Plan ==
+DataSetSink(name=[`default_catalog`.`default_database`.`targetTable`],
fields=[d, e])
+ BatchTableSourceScan(table=[[default_catalog, default_database,
sourceTable]], fields=[first, id], source=[CsvTableSource(read fields: first,
id)])
+
+== Physical Execution Plan ==
+{
+ "nodes": [
+
+ {
+ "id": ,
+ "type": "source",
+ "pact": "Data Source",
+ "contents": "CsvTableSource(read fields: first, id)",
+ "parallelism":,
+ "global_properties": [
+ { "name": "Partitioning", "value": "RANDOM_PARTITIONED"
},
+ { "name": "Partitioning Order", "value": "(none)" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "local_properties": [
+ { "name": "Order", "value": "(none)" },
+ { "name": "Grouping", "value": "not grouped" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "estimates": [
+ { "name": "Est. Output Size", "value": "190.00" },
+ { "name": "Est. Cardinality", "value": "10.00" }
],
+ "costs": [
+ { "name": "Network", "value": "0.0" },
+ { "name": "Disk I/O", "value": "190.00" },
+ { "name": "CPU", "value": "0.0" },
+ { "name": "Cumulative Network", "value": "0.0" },
+ { "name": "Cumulative Disk I/O", "value": "190.00" },
+ { "name": "Cumulative CPU", "value": "0.0" }
+ ],
+ "compiler_hints": [
+ { "name": "Output Size (bytes)", "value": "(none)" },
+ { "name": "Output Cardinality", "value": "(none)" },
+ { "name": "Avg. Output Record Size (bytes)", "value":
"(none)" },
+ { "name": "Filter Factor", "value": "(none)" }
]
+ },
+ {
+ "id": ,
+ "type": "pact",
+ "pact": "Map",
+ "contents": "to: Row",
+ "parallelism":,
+ "predecessors": [
+ {"id": , "ship_strategy": "Forward", "exchange_mode":
"PIPELINED"}
+ ],
+ "driver_strategy": "Map",
+ "global_properties": [
+ { "name": "Partitioning", "value": "RANDOM_PARTITIONED"
},
+ { "name": "Partitioning Order", "value": "(none)" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "local_properties": [
+ { "name": "Order", "value": "(none)" },
+ { "name": "Grouping", "value": "not grouped" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "estimates": [
+ { "name": "Est. Output Size", "value": "(unknown)" },
+ { "name": "Est. Cardinality", "value": "10.00" }
],
+ "costs": [
+ { "name": "Network", "value": "0.0" },
+ { "name": "Disk I/O", "value": "0.0" },
+ { "name": "CPU", "value": "0.0" },
+ { "name": "Cumulative Network", "value": "0.0" },
+ { "name": "Cumulative Disk I/O", "value": "190.00" },
+ { "name": "Cumulative CPU", "value": "0.0" }
+ ],
+ "compiler_hints": [
+ { "name": "Output Size (bytes)", "value": "(none)" },
+ { "name": "Output Cardinality", "value": "(none)" },
+ { "name": "Avg. Output Record Size (bytes)", "value":
"(none)" },
+ { "name": "Filter Factor", "value": "(none)" }
]
+ },
+ {
+ "id": ,
+ "type": "sink",
+ "pact": "Data Sink",
+ "contents": "UnsafeMemoryAppendTableSink(d, e)",
+ "parallelism":,
+ "predecessors": [
+ {"id": , "ship_strategy": "Forward", "exchange_mode":
"PIPELINED"}
+ ],
+ "global_properties": [
+ { "name": "Partitioning", "value": "RANDOM_PARTITIONED"
},
+ { "name": "Partitioning Order", "value": "(none)" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "local_properties": [
+ { "name": "Order", "value": "(none)" },
+ { "name": "Grouping", "value": "not grouped" },
+ { "name": "Uniqueness", "value": "not unique" }
+ ],
+ "estimates": [
+ { "name": "Est. Output Size", "value": "(unknown)" },
+ { "name": "Est. Cardinality", "value": "10.00" }
],
+ "costs": [
+ { "name": "Network", "value": "0.0" },
+ { "name": "Disk I/O", "value": "0.0" },
+ { "name": "CPU", "value": "0.0" },
+ { "name": "Cumulative Network", "value": "0.0" },
+ { "name": "Cumulative Disk I/O", "value": "190.00" },
+ { "name": "Cumulative CPU", "value": "0.0" }
Review comment:
A minor concern: the estimated cost maybe unstable, so it's better the
value can be normalized to zero or unknown to avoid unstable test.
btw, the parallelism value is a key information and the value is determinate
except the default parallelism is the number of cpu cores for
`LocalStreamEnvironment`, we can explicitly set the value var `setParallelism`
method
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]