Skip to content

Conversation

@chemelnucfin
Copy link
Contributor

Closes #4932.

But. @tswast Should we have this and change it if/when BigTable supports microseconds or should we have the users handle it themselves and just document?

@chemelnucfin chemelnucfin added the api: bigtable Issues related to the Bigtable API. label Mar 7, 2018
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 7, 2018
@tswast tswast changed the title BigTable: TimestampRanges must be milliseconds granularity Bigtable: TimestampRanges must be milliseconds granularity Mar 7, 2018
@tswast
Copy link
Contributor

tswast commented Mar 7, 2018

I'm not familiar with how Bigtable handles timestamps. @mbrukman might?

@chemelnucfin
Copy link
Contributor Author

oh. Here's some related info also bigtable support for microseconds

@sduskis
Copy link
Contributor

sduskis commented Mar 15, 2018

I'm going to make the executive decision. This is for row range filters. For now, start out to be rounded down to nearest ms, and end needs to be rounded up to the nearest ms.

If and when Cloud Bigtable opts to enable microsecond support, which is not on the near term roadmap, we'll have to do a sweep of all clients for behavior like this.

if self.end is not None:
timestamp_range_kwargs['end_timestamp_micros'] = (
_microseconds_from_datetime(self.end))
_microseconds_from_datetime(self.end) // 1000 * 1000)

This comment was marked as spam.

end = None
if end_micros is not None:
end = _EPOCH + datetime.timedelta(microseconds=end_micros)
pb_kwargs['end_timestamp_micros'] = end_micros

This comment was marked as spam.

@chemelnucfin chemelnucfin force-pushed the bigtable_millisecond branch 3 times, most recently from 8e31bd5 to 508e40f Compare March 15, 2018 20:32
@chemelnucfin chemelnucfin force-pushed the bigtable_millisecond branch from 508e40f to edd9ce1 Compare March 15, 2018 20:44
@chemelnucfin chemelnucfin force-pushed the bigtable_millisecond branch from edd9ce1 to abf1d79 Compare March 15, 2018 20:52
@chemelnucfin
Copy link
Contributor Author

@tswast yeah, stupid mistake. I changed the tests to better capture what it should do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants