HyukjinKwon commented on code in PR #59247:
URL: https://github.com/apache/spark/pull/59247#discussion_r4266869432


##########
sql/api/src/main/scala/org/apache/spark/sql/streaming/progress.scala:
##########
@@ -216,9 +219,26 @@ class StreamingQueryProgress private[spark] (
     val sources: Array[SourceProgress],
     val sink: SinkProgress,
     @JsonDeserialize(contentAs = classOf[GenericRowWithSchema])
-    val observedMetrics: ju.Map[String, Row])
+    val observedMetrics: ju.Map[String, Row],
+    @JsonProperty("trigger")
+    @JsonDeserialize(using = classOf[ObjectToStringDeserializer])
+    triggerJson: String = null)
     extends Serializable {
 
+  /**
+   * JSON metadata for the configured trigger, or null when metadata is 
unavailable.
+   *
+   * The {{{type}}} field is {{{ProcessingTime}}}, {{{Continuous}}}, 
{{{RealTime}}},

Review Comment:
   **Nit (P3):** Scaladoc treats `{{{ ... }}}` as a block-level code delimiter, 
not inline code. Mid-line the braces render literally (`The {{{type}}} field is 
...`), and lines 232 and 233 start with `{{{`, so each of those opens a 
separate code block and splits the sentence. In the generated Scala and Java 
API docs, the only JVM-side description of the trigger vocabulary comes out 
garbled. The rest of this class doc already uses backticks for inline code (for 
example `StreamingQuery.id()`).
   
   Switching to backticks keeps the wording unchanged:
   
   ```scala
      * The `type` field is `ProcessingTime`, `Continuous`, `RealTime`,
      * `AvailableNow`, or `Once`. `ProcessingTime` and `Continuous` include
      * `intervalMs`; `RealTime` includes `batchDurationMs`. Both intervals are 
in
      * milliseconds. `AvailableNow` and `Once` contain only the `type` field.
   ```
   
   **Verification:**
   - **Inspection:** The trigger accessor Scaladoc uses backtick inline code 
for every identifier and contains no triple-brace delimiters.
   - **Compile:** The sql/api module still compiles and passes its Scala style 
checks after the documentation edit.



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