anoopj commented on code in PR #18342:
URL: https://github.com/apache/iceberg/pull/18342#discussion_r4159877842


##########
api/src/main/java/org/apache/iceberg/util/StructProjection.java:
##########
@@ -223,4 +223,19 @@ public <T> T get(int pos, Class<T> javaClass) {
   public <T> void set(int pos, T value) {
     throw new UnsupportedOperationException("Cannot set fields in a 
TypeProjection");
   }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("StructProjection{");
+    List<Types.NestedField> fields = type.fields();
+    for (int i = 0; i < fields.size(); i += 1) {
+      if (i > 0) {
+        sb.append(", ");
+      }
+      sb.append(fields.get(i).name()).append("=").append(get(i, Object.class));
+    }
+    sb.append("}");
+    return sb.toString();

Review Comment:
   Thanks for the feedback. I changed it such that we are reading it from the 
original struct. 



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