Support for bitwise operators

I’m trying to translate SQL server queries that use bitwise AND (&) and bitwise NOT (~) operators but have not found a way to perform them in dremio. Does dremio support bitwise operators?

The following SQL server snippet is sample logic that I’m trying to rewrite:
WHEN CAST(varbinary_value AS INT) & 0x80 = 0x80
THEN do_something
ELSE something_else


have you tried to use bitwise_or and bitwise_and? Does it not work?

Thanks for pointing me in the right direction. Based on examples that I’ve found, looks like bitwise_and() takes integer as input. The variable I’m working with is varbinary, so performing

bitwise_and(cast(varbinary_value AS Integer), 128)

doesn’t work due to the invalid cast. I’m totally new with dremio so apologize for these basic questions.


What is the Varbinary value? Can you give me an example?


Below are some examples of the varbinary value: