wjsl commented on code in PR #1123:
URL: https://github.com/apache/fluo/pull/1123#discussion_r1024081999


##########
modules/api/src/main/java/org/apache/fluo/api/data/Column.java:
##########
@@ -28,26 +28,42 @@
 public final class Column implements Comparable<Column>, Serializable {
 
   private static final long serialVersionUID = 1L;
-  private static final Bytes UNSET = Bytes.of(new byte[0]);
 
-  private Bytes family = UNSET;
-  private Bytes qualifier = UNSET;
-  private Bytes visibility = UNSET;
+  private final Bytes family;
+  private final Bytes qualifier;
+  private final Bytes visibility;
+
+  private final boolean isFamilySet;
+  private final boolean isQualifierSet;
+  private final boolean isVisibilitySet;

Review Comment:
   Not to spread too much FUD, but `Optional` isn't necessarily free. There's 
some size overhead in having another Object member, as well as access overhead 
due to need a function call to either extract the value, or build a pipeline 
via `map`/`flatMap`. I'd be curious if the impact were greater with 
`ColumnVisibiliy`s enabled in my crusty ol' draft PR, since applications could 
be on the hook to create more `Column` objects based on labels.



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

Reply via email to