Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3038#discussion_r93594019
--- Diff: flink-core/src/main/java/org/apache/flink/types/Row.java ---
@@ -113,4 +113,30 @@ public boolean equals(Object o) {
public int hashCode() {
return Arrays.hashCode(fields);
}
+
+ /**
+ * Creates a new Row and assigns the given values to the Row's fields.
+ * This is more convenient than using the constructor.
+ *
+ * <p>For example:
+ *
+ * <pre>
+ * Row.of("hello", true, 1L);}
+ * </pre>
+ * instead of
+ * <pre>
+ * Row row = new Row(3);
+ * row.setField(0, "hello");
+ * row.setField(1, true);
+ * row.setField(2, 1L);
+ * </pre>
+ *
+ */
+ public static Row of(Object... objects) {
--- End diff --
I would rename `objects` to `fields` or `values`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---