Skip to content

Commit

Permalink
[SPARK-48597][SQL] Introduce a marker for isStreaming property in tex…
Browse files Browse the repository at this point in the history
…t representation of logical plan
  • Loading branch information
HeartSaVioR committed Jun 12, 2024
1 parent 334816a commit cdfa711
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
"~"
} else {
prefixFromSuper
}
}
}

/**
* Returns true if all its children of this query plan have been resolved.
Expand Down

0 comments on commit cdfa711

Please sign in to comment.