[ASTERIXDB-3097][OTH] Print "build-side" only for hash join

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Fix the JSON plan printer to only print the "build-side" for
hash join.

Change-Id: Ic418905d45fa9edb7c77e5ccb748d07bbd0d8c64
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17358
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
index 661e0cf..64a5e1a 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
@@ -954,8 +954,9 @@
     }
 
     private void writeBuildSide(AbstractBinaryJoinOperator op) throws IOException {
-        int buildInputIndex = printInputsInReverse(op) ? 0 : 1;
-        jsonGenerator.writeNumberField("build-side", buildInputIndex);
+        if (isHashJoin(op)) {
+            jsonGenerator.writeNumberField("build-side", 0);
+        }
     }
 
     private static boolean printInputsInReverse(AbstractLogicalOperator op) {