keith-turner commented on code in PR #1123:
URL: https://github.com/apache/fluo/pull/1123#discussion_r1024089177
##########
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:
I considered using Optional but decided against it because it would add more
Objects to GC and another level of indirection (so much pointer chasing in java
in general, I suspect this why even java compiles to native its still slower
than C++). This low level data class already has a good bit of both (objs and
indirection), didn't want to add more.
--
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]