igorbernstein2 commented on code in PR #24015:
URL: https://github.com/apache/beam/pull/24015#discussion_r1112289611
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java:
##########
@@ -656,4 +695,98 @@ public int compareTo(@Nonnull EndPoint o) {
.result();
}
}
+
+ static class BigtableRowProtoAdapter implements
RowAdapter<com.google.bigtable.v2.Row> {
+ @Override
+ public RowBuilder<com.google.bigtable.v2.Row> createRowBuilder() {
+ return new DefaultRowBuilder();
+ }
+
+ @Override
+ public boolean isScanMarkerRow(com.google.bigtable.v2.Row row) {
+ return Objects.equals(row,
com.google.bigtable.v2.Row.getDefaultInstance());
+ }
+
+ @Override
+ public ByteString getKey(com.google.bigtable.v2.Row row) {
+ return row.getKey();
+ }
+
+ private static class DefaultRowBuilder
+ implements RowAdapter.RowBuilder<com.google.bigtable.v2.Row> {
+ private com.google.bigtable.v2.Row.Builder protoBuilder =
+ com.google.bigtable.v2.Row.newBuilder();
+
+ private ByteString currentValue;
+ private Family.Builder lastFamily;
+ private String lastFamilyName;
+ private Column.Builder lastColumn;
+ private ByteString lastColumnName;
+
+ private Cell.Builder lastCell;
Review Comment:
Thats really annoying...apparently `@Nullable Cell.Builder lastCell` applies
the annotation to Cell :(. The correct way is `Cell.@Nullable Builder lastCell
--
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]