HeartSaVioR commented on code in PR #46953:
URL: https://github.com/apache/spark/pull/46953#discussion_r1637310742


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala:
##########
@@ -104,7 +104,20 @@ abstract class LogicalPlan
    */
   lazy val resolved: Boolean = expressions.forall(_.resolved) && 
childrenResolved
 
-  override protected def statePrefix = if (!resolved) "'" else 
super.statePrefix
+  override protected def statePrefix = {
+    if (!resolved) {
+      "'"
+    } else {
+      val prefixFromSuper = super.statePrefix
+      // Ancestor class could mark something on the prefix, including 
'invalid'. Add a marker for
+      // `streaming` only when there is no marker from ancestor class.
+      if (prefixFromSuper.isEmpty && isStreaming) {
+        "~"

Review Comment:
   > This PR proposes to retain the prefix marker as single character (opposed 
to up to two characters). This would be OK in practice, since the moment the 
marker for isStreaming would be useful is to look into the plan which is 
already analyzed - that said, it’s unlikely that we need to see the both one of 
existing marker and the marker for streaming.
   
   But we could reconsider if we have more voices supporting up to two chars 
for not overwriting. Maybe @cloud-fan ?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to