davidradl commented on code in PR #27614:
URL: https://github.com/apache/flink/pull/27614#discussion_r2807741398


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/RelTreeWriterImpl.scala:
##########
@@ -210,11 +210,14 @@ class RelTreeWriterImpl(
       s.append(", rowType=[").append(rel.getRowType.toString).append("]")
     }
 
-    if (explainLevel == SqlExplainLevel.ALL_ATTRIBUTES) {
+    if (explainLevel == SqlExplainLevel.ALL_ATTRIBUTES || explainLevel == 
SqlExplainLevel.EXPPLAN_ATTRIBUTES) {
+      val rowCount = mq.getRowCount(rel)
+      val cost = mq.getCumulativeCost(rel)
+      
       s.append(": rowcount = ")
-        .append(mq.getRowCount(rel))
+        .append(if (rowCount != null) rowCount else "unknown")

Review Comment:
   I am curious - is there precedent in other parts of the code or in SQL 
specification as to what to put out in the explain in this circumstance. I see 
in the planner for unknown types the capitalized string  "UNKNOWN" is used. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to