Return an INT64 representing a range of bits from a source bit pattern.
-The start_offset must be zero or a negative number indicating an offset from
-the rightmost bit in the pattern.
-n_bits is the number of bits to consider, counting right from the bit at
-start_offset.
+Convert a string representing individual bits into an INT64.
+Convert a string representing individual bits into an INT64.
-Return a nested struct providing booleans indicating whether a given client
+was active various time periods based on the passed bit pattern.
+Convert a bit pattern into an array of the dates is represents.
s STRING
+bits INT64, submission_date DATE
OUTPUTS
-INT64
+
-Source | Edit
-retention (UDF)
-Return a nested struct providing booleans indicating whether a given client
-was active various time periods based on the passed bit pattern.
+Source | Edit
+active_in_range (UDF)
+Return a boolean indicating if any bits are set in the specified range
+of a bit pattern. The start_offset
must be zero or a negative number
+indicating an offset from the rightmost bit in the pattern. n_bits is
+the number of bits to consider, counting right from the bit at
+start_offset
.
+See detailed docs for the bits28 suite of functions:
+https://docs.telemetry.mozilla.org/cookbooks/clients_last_seen_bits.html#udf-reference
Parameters
INPUTS
-bits INT64, submission_date DATE
+bits INT64, start_offset INT64, n_bits INT64
-Source | Edit
+OUTPUTS
+
+Source | Edit
+range (UDF)
+Return an INT64 representing a range of bits from a source bit pattern.
+The start_offset must be zero or a negative number indicating an offset from
+the rightmost bit in the pattern.
+n_bits is the number of bits to consider, counting right from the bit at
+start_offset.
+See detailed docs for the bits28 suite of functions:
+https://docs.telemetry.mozilla.org/cookbooks/clients_last_seen_bits.html#udf-reference
+SELECT
+ -- Signature is bits28.range(offset_to_day_0, start_bit, number_of_bits)
+ mozfun.bits28.range(days_seen_bits, -13 + 0, 7) AS week_0_bits,
+ mozfun.bits28.range(days_seen_bits, -13 + 7, 7) AS week_1_bits
+FROM
+ telemetry.clients_last_seen
+WHERE
+ submission_date > '2020-01-01'
+
+Parameters
+INPUTS
+bits INT64, start_offset INT64, n_bits INT64
+
+OUTPUTS
+
+Source | Edit
to_string (UDF)
Convert an INT64 field into a 28-character string representing
the individual bits.
@@ -3839,7 +3855,7 @@ to_string (UDF)
-- '0000000000000000000000000010',
-- '0000000000000000000000000011']
-Parameters
+Parameters
INPUTS
@@ -3847,22 +3863,6 @@ Parameters
Source | Edit
-active_in_range (UDF)
-Return a boolean indicating if any bits are set in the specified range
-of a bit pattern. The start_offset
must be zero or a negative number
-indicating an offset from the rightmost bit in the pattern. n_bits is
-the number of bits to consider, counting right from the bit at
-start_offset
.
-See detailed docs for the bits28 suite of functions:
-https://docs.telemetry.mozilla.org/cookbooks/clients_last_seen_bits.html#udf-reference
-Parameters
-INPUTS
-bits INT64, start_offset INT64, n_bits INT64
-
-OUTPUTS
-
-Source | Edit
diff --git a/mozfun/bytes/index.html b/mozfun/bytes/index.html
index d1b9f7822c6..74ca46323cd 100644
--- a/mozfun/bytes/index.html
+++ b/mozfun/bytes/index.html
@@ -2880,11 +2880,11 @@
-
- zero_right (UDF)
+
+ bit_pos_to_byte_pos (UDF)
-