@@ -690,11 +690,7 @@ def windows(self, start, end, width, depth=0, version=0):
690
690
The end time in nanoseconds for the range to be queried. (see
691
691
:func:`btrdb.utils.timez.to_nanoseconds` for valid input types)
692
692
width : int
693
- The number of nanoseconds in each window, subject to the depth
694
- parameter.
695
- depth : int
696
- The precision of the window duration as a power of 2 in nanoseconds.
697
- E.g 30 would make the window duration accurate to roughly 1 second
693
+ The number of nanoseconds in each window.
698
694
version : int
699
695
The version of the stream to query.
700
696
@@ -716,13 +712,8 @@ def windows(self, start, end, width, depth=0, version=0):
716
712
multiple of width, then end will be decreased to the greatest value less
717
713
than end such that (end - start) is a multiple of `width` (i.e., we set
718
714
end = start + width * floordiv(end - start, width). The `depth`
719
- parameter is an optimization that can be used to speed up queries on
720
- fast queries. Each window will be accurate to 2^depth nanoseconds. If
721
- depth is zero, the results are accurate to the nanosecond. On a dense
722
- stream for large windows, this accuracy may not be required. For example
723
- for a window of a day, +- one second may be appropriate, so a depth of
724
- 30 can be specified. This is much faster to execute on the database
725
- side.
715
+ parameter previously available has been deprecated. The only valid value
716
+ for depth is now 0.
726
717
727
718
"""
728
719
materialized = []
@@ -1118,7 +1109,8 @@ def windows(self, width, depth):
1118
1109
The number of nanoseconds to use for each window size.
1119
1110
depth : int
1120
1111
The requested accuracy of the data up to 2^depth nanoseconds. A
1121
- depth of 0 is accurate to the nanosecond.
1112
+ depth of 0 is accurate to the nanosecond. This is now the only
1113
+ valid value for depth.
1122
1114
1123
1115
Returns
1124
1116
-------
@@ -1136,13 +1128,8 @@ def windows(self, width, depth):
1136
1128
less than the end timestamp. If (end - start) is not a multiple of
1137
1129
width, then end will be decreased to the greatest value less than end
1138
1130
such that (end - start) is a multiple of width (i.e., we set end = start
1139
- + width * floordiv(end - start, width). The depth parameter is an
1140
- optimization that can be used to speed up queries on fast queries. Each
1141
- window will be accurate to 2^depth nanoseconds. If depth is zero, the
1142
- results are accurate to the nanosecond. On a dense stream for large
1143
- windows, this accuracy may not be required. For example for a window of
1144
- a day, +- one second may be appropriate, so a depth of 30 can be
1145
- specified. This is much faster to execute on the database side.
1131
+ + width * floordiv(end - start, width). The `depth` parameter previously
1132
+ available has been deprecated. The only valid value for depth is now 0.
1146
1133
1147
1134
"""
1148
1135
if not self .allow_window :
0 commit comments