zabetak commented on code in PR #6230:
URL: https://github.com/apache/hive/pull/6230#discussion_r2623523714


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java:
##########
@@ -628,6 +621,42 @@ public int execute() {
     }
   }
 
+  /**
+   * Augments the JSON plan with the outputs names of ReduceSink operators.
+   * @param jsonPlan the JSON plan object that is augmented
+   */
+  private void augmentJSONWithRSOutputs(JSONObject jsonPlan) throws Exception {
+    if ("tez".equals(HiveConf.getVar(conf, 
HiveConf.ConfVars.HIVE_EXECUTION_ENGINE))) {
+      // The JSON object is augmented via side effect of TezJsonParser.print()
+      new TezJsonParser().print(jsonPlan, null);
+    }
+  }
+
+  /**
+   * Creates the appropriate JsonParser based on the ExplainWork configuration.
+   * @return a JsonParser
+   */
+  private JsonParser createParser() {
+    final JsonParser defaultParser;
+    if (HiveConf.getBoolVar(conf, ConfVars.HIVE_EXPLAIN_FORMATTED_INDENT)) {
+      defaultParser = (json, out) -> out.print(json.toString(2));

Review Comment:
   <img width="781" height="158" alt="Screenshot from 2025-12-16 15-24-21" 
src="https://github.com/user-attachments/assets/d7327cf5-d38f-4a80-bfc6-2b98e7782a95";
 />
   
   Most IDEs display the parameter name along with the literal so there is no 
readability concern in that case. It would make a difference during the GitHub 
review but since you already did that now :) probably there is no benefit in 
adding an extra variable at this stage.



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