[
https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016310#comment-17016310
]
Rui Wang commented on CALCITE-3732:
-----------------------------------
Julian had already have a great summary for some functions.
Regarding to other functions from the spreadsheet that hailong shared:
{code:java}
// functions from sql-server
bit and assignment function
bit or assignment function
bit xor assignment function
{code}
assignment operator seems a special kind operator for a specific purpose (under
sql-server transact-sql section). Calcite does not need it for now.
{code:java}
// functions from Oracle
BitClear // clearing the specified bit in a value
BitRotate // bit shift-and-rotate operation
BitSet // setting the specified bit on in a value
//functions from postgresql
bit concat function
{code}
These functions are not common (a few engines implement them) but the
definition seems easy to understand and likely be consistent. We could support
them.
{code:java}
// functions from Oracle
DashCode
Dec2Hex
Hex2Dec
{code}
I don't have impressions to see functions here even implemented in other
languages. Calcite might not need such functions for now.
> Implement bit functions and operators
> -------------------------------------
>
> Key: CALCITE-3732
> URL: https://issues.apache.org/jira/browse/CALCITE-3732
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.21.0
> Reporter: hailong wang
> Priority: Major
> Fix For: 1.22.0
>
>
> Bit function is non-standard operators, but all db has implemented, such as
> mysql, postgresql.
> Calcite has implemented BIT_AND, BIT_OR in
> https://issues.apache.org/jira/browse/CALCITE-2770, BIT_XOR in
> https://issues.apache.org/jira/browse/CALCITE-3591. BIT_COUNT is in progress
> https://issues.apache.org/jira/browse/CALCITE-3697, BIT_NOT(~) is in progress
> https://issues.apache.org/jira/browse/CALCITE-3592.
> So I think we should also implement Bitwise AND(&), Right shift(>>), Left
> shift(<<), Bitwise XOR(^), Bitwise OR(|). And data types support tinyint,
> smallint, int, bigint like before.
>
> Refence:
> [https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-invert]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)