snowflake.snowpark.functions.getbit

snowflake.snowpark.functions.getbit(integer_expr: Union[snowflake.snowpark.column.Column, str], bit_position: Union[snowflake.snowpark.column.Column, str, int]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.39.0/src/snowflake/snowpark/_functions/scalar_functions.py#L294-L316)

Returns the bit value at the specified position in an integer expression. The bit position is 0-indexed from the right (least significant bit).

Example:

>>> df = session.create_dataframe([11], schema=["a"])
>>> df.select(getbit("a", 3)).collect()
[Row(GETBIT("A", 3)=1)]
Copy
语言: 中文