0
votes

I am trying to use a ColumnFamilyTimeRange on my Scan to read only recent rows from Bigtable. However, the scan returns all rows no matter what I set the time range to.

I have one column family. Here's what I'm seeing: I add a new row with a value for that column family, then wait, then add another new row. I then do a read from Bigtable with a Scan with an ordinary (ie not column family specific) TimeRange set. It correctly returns only the recently added row.

However, when I change that TimeRange to a ColumnFamilyTimeRange with the same timestamp bounds and the only column family I have, I get back every row. Even when I set the timestamp bounds to something nonsensical (such as before I even created the table), I still get back every row.

Is this a bug or am I completely missing how ColumnFamilyTimeRange is meant to work?

2

2 Answers

2
votes

Currently timestamp range scans on column families are not supported. Unfortunately there are differences from the HBase API. You can check them here.

1
votes

This behavior is not ideal. We shouldn't silently drop the ColumnFamilyTimeRange.

I added https://github.com/googleapis/cloud-bigtable-client/issues/2184 to track the issue. In the mean time I would recommend to use a combination of FilterList(MUST_PASS_ALL), TimestampRangeFilter and FamilyFilter filters to achieve the desired result.