fec82c9504
### What changes were proposed in this pull request? `GETBIT` is a bitwise expression function given an INTEGER value, returns the value of a bit at a specified position. `GETBIT( <integer_expr>, <bit_position> )` Examples select getbit(11, 100), getbit(11, 3), getbit(11, 2), getbit(11, 1), getbit(11, 0); GETBIT(11, 3) | GETBIT(11, 2) | GETBIT(11, 1) | GETBIT(11, 0) -- | -- | -- | -- 1 | 0 | 1 | 1 The mainstream database support this feature show below: **Teradata** https://docs.teradata.com/reader/kmuOwjp1zEYg98JsB8fu_A/PK1oV1b2jqvG~ohRnOro9w **Impala** https://docs.cloudera.com/runtime/7.2.0/impala-sql-reference/topics/impala-bit-functions.html#bit_functions__getbit **Snowflake** https://docs.snowflake.com/en/sql-reference/functions/getbit.html **Yellowbrick** https://www.yellowbrick.com/docs/2.2/ybd_sqlref/getbit.html ### Why are the changes needed? GETBIT is very useful. ### Does this PR introduce _any_ user-facing change? Yes. GETBIT is a new bitwise function. ### How was this patch tested? Jenkins test Closes #31198 from beliefer/SPARK-33245. Authored-by: beliefer <beliefer@163.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |