[jira] [Commented] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206789#comment-17206789 ] hailong wang commented on CALCITE-3782: --- Thanks [~julianhyde], [~vladimirsitnikov]. Sorry for reply later, This judgment is indeed confusing. [~vladimirsitnikov] do you mean `bitand(empty, non-empty)` should throw exception for the different lengths of two byteString. If that, I think We can just remove `byteString.size() == 0 `? > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.26.0 > > Time Spent: 4h 50m > Remaining Estimate: 0h > > According to the discussion link CALCITE-3732 , We should make bitwise > operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR > and Bit_XOR agg operator should also support BINARY and VARBINARY. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Description: According to the discussion link CALCITE-3732 , We should make bitwise operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and VARBINARY. (was: According to the discussion [link CALCITE-3732|https://issues.apache.org/jira/browse/CALCITE-3732]We should make bitwise operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and VARBINARY.) > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > > According to the discussion link CALCITE-3732 , We should make bitwise > operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR > and Bit_XOR agg operator should also support BINARY and VARBINARY. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Description: According to the discussion [link CALCITE-3732|https://issues.apache.org/jira/browse/CALCITE-3732]We should make bitwise operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and VARBINARY. (was: According to the discussion CALCITE_3732 We should make bitwise operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and VARBINARY.) > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > > According to the discussion [link > CALCITE-3732|https://issues.apache.org/jira/browse/CALCITE-3732]We should > make bitwise operators work on all integer types, BINARY and VARBINARY. So > Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and > VARBINARY. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Description: According to the discussion CALCITE_3732 We should make bitwise operators work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and Bit_XOR agg operator should also support BINARY and VARBINARY. (was: According to the discussion [link CALCITE_3732|https://issues.apache.org/jira/browse/CALCITE-3732] We should make bitwise operators work on all integer types, BINARY and VARBINARY. So we) > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > > According to the discussion CALCITE_3732 We should make bitwise operators > work on all integer types, BINARY and VARBINARY. So Bit_And, Bit_OR and > Bit_XOR agg operator should also support BINARY and VARBINARY. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Description: According to the discussion [link CALCITE_3732|https://issues.apache.org/jira/browse/CALCITE-3732] We should make bitwise operators work on all integer types, BINARY and VARBINARY. So we (was: According to the discussion ) > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > > According to the discussion [link > CALCITE_3732|https://issues.apache.org/jira/browse/CALCITE-3732] We should > make bitwise operators work on all integer types, BINARY and VARBINARY. So we -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Description: According to the discussion > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > > According to the discussion -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Affects Version/s: (was: 1.21.0) 1.22.0 > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.22.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
[ https://issues.apache.org/jira/browse/CALCITE-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3782: -- Fix Version/s: 1.23.0 > Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type > -- > > Key: CALCITE-3782 > URL: https://issues.apache.org/jira/browse/CALCITE-3782 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.23.0 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3779) Implement BITAND scalar function
[ https://issues.apache.org/jira/browse/CALCITE-3779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063804#comment-17063804 ] hailong wang commented on CALCITE-3779: --- It is ok. Thank you [~danny0405] ~ > Implement BITAND scalar function > > > Key: CALCITE-3779 > URL: https://issues.apache.org/jira/browse/CALCITE-3779 > Project: Calcite > Issue Type: Sub-task > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.23.0 > > Time Spent: 10m > Remaining Estimate: 0h > > Implement BITAND scalar function which support tinyint, smallint, int, > bigint, binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3782) Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
hailong wang created CALCITE-3782: - Summary: Bitwise operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type Key: CALCITE-3782 URL: https://issues.apache.org/jira/browse/CALCITE-3782 Project: Calcite Issue Type: Sub-task Components: core Affects Versions: 1.21.0 Reporter: hailong wang Assignee: hailong wang Fix For: 1.22.0 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Implement BITNOT scalar function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Description: Implement BITNOT scalar function which support tinyint, smallint, int, bigint, binary and varbinary type. (was: Implement BITNOT function which support tinyint, smallint, int, bigint, binary and varbinary type.) Summary: Implement BITNOT scalar function (was: Implement BITNOT function) > Implement BITNOT scalar function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Sub-task > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT scalar function which support tinyint, smallint, int, > bigint, binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3779) Implement BITAND scalar function
hailong wang created CALCITE-3779: - Summary: Implement BITAND scalar function Key: CALCITE-3779 URL: https://issues.apache.org/jira/browse/CALCITE-3779 Project: Calcite Issue Type: Sub-task Components: core Affects Versions: 1.21.0 Reporter: hailong wang Assignee: hailong wang Fix For: 1.22.0 Implement BITAND scalar function which support tinyint, smallint, int, bigint, binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032440#comment-17032440 ] hailong wang commented on CALCITE-3732: --- Thanks [~julianhyde]. I have updated, and this ticket is in in progress. > Implement bit functions and operators > - > > Key: CALCITE-3732 > URL: https://issues.apache.org/jira/browse/CALCITE-3732 > Project: Calcite > Issue Type: Task > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: 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 CALCITE-2770, BIT_XOR in > CALCITE-3591. BIT_COUNT is in progress CALCITE-3697, BIT_NOT(~) is in > progress 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)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Parent: CALCITE-3732 Issue Type: Sub-task (was: Improvement) > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Sub-task > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT function which support tinyint, smallint, int, bigint, > binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3732: -- Issue Type: Task (was: Improvement) > Implement bit functions and operators > - > > Key: CALCITE-3732 > URL: https://issues.apache.org/jira/browse/CALCITE-3732 > Project: Calcite > Issue Type: Task > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: 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 CALCITE-2770, BIT_XOR in > CALCITE-3591. BIT_COUNT is in progress CALCITE-3697, BIT_NOT(~) is in > progress 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)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Issue Type: Improvement (was: Task) > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT function which support tinyint, smallint, int, bigint, > binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Issue Type: Task (was: Improvement) > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Task > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT function which support tinyint, smallint, int, bigint, > binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Description: Implement BITNOT function which support tinyint, smallint, int, bigint, binary and varbinary type. > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT function which support tinyint, smallint, int, bigint, > binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032404#comment-17032404 ] hailong wang commented on CALCITE-3592: --- Updated > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Implement BITNOT function which support tinyint, smallint, int, bigint, > binary and varbinary type. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Description: (was: Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not operator, So we can support "~" SqlPrefixOperator for bitwise not in babel module) > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Implement BITNOT function
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Summary: Implement BITNOT function (was: Add BITNOT bitwise operator, and infix "~" operator in Babel parser) > Implement BITNOT function > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, So we can support "~" SqlPrefixOperator for bitwise not in babel > module -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017856#comment-17017856 ] hailong wang commented on CALCITE-3732: --- [~julianhyde] Maybe we can call BITAND, BITOR etc. like snowflake and DB2 which are no underscore compared with aggregate functions ? > 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 >Assignee: 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)
[jira] [Comment Edited] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016880#comment-17016880 ] hailong wang edited comment on CALCITE-3732 at 1/16/20 12:51 PM: - Thanks [~julianhyde] [~amaliujia]. I conclude as follows: 1. In the default parser, we can support: ||Function Name|| |BIT_COUNT| |BIT_AND| |BIT_OR| |BIT_XOR| These functions are in SqlStdOperatorTable. The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY. The return type is same as input type. For Oracle, we can support: ||Function Name|| |BitAnd| |BitOr| |BitXor| |BitNot| |BitShift| |BitClear| |BitRotate| |BitSet| For Snowflake, we can support: ||Function Name|| |BITSHIFTLEFT| |BITSHIFTRIGHT| For DB2, we can support: ||Function Name|| |BITANDNOT| These functions are in SqlLibraryOperators. The input Type only supports numeric values, and will be converted to an BIGINT before the bitwise function. The result type is BIGINT. 2. In the babel parser: For Mysql, we can support: ||Function Name|| |&| ||\||| |~| |^| |<<| |>>| For PostgreSQL, we can support: ||Function Name|| |#| These functions are in SqlLibraryOperators. The input type can The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY, and numeric values will be cast to BIGINT. The result type depends on whether the bit argument is evaluated as a binary string or number: 1.Binary-string evaluation occurs when the arguments have a binary string type. Numeric evaluation occurs otherwise, with argument conversion to unsigned 64-bit integers as necessary. 2.Binary-string evaluation produces a binary string of the same length as the arguments. If the arguments have unequal lengths, an ER_INVALID_BITWISE_OPERANDS_SIZE error occurs. Numeric evaluation produces an unsigned 64-bit integer. What do you think of these above? BTW, I found Oracle, Snowflake and DB2 only support number for input type, should we need to support binary and varbinary? was (Author: hailong wang): Thanks [~julianhyde] [~amaliujia]. I conclude as follows: 1. In the default parser, we can support: ||Function Name|| |BIT_COUNT| |BIT_AND| |BIT_OR| |BIT_XOR| These functions are in SqlStdOperatorTable. The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY. The return type is same as input type. For Oracle, we can support: ||Function Name|| |BitAnd| |BitOr| |BitXor| |BitNot| |BitShift| |BitClear| |BitRotate| |BitSet| For Snowflake, we can support: ||Function Name|| |BITSHIFTLEFT| |BITSHIFTRIGHT| For DB2, we can support: ||Function Name|| |BITANDNOT| These functions are in SqlLibraryOperators. The input Type only supports numeric values, and will be converted to an BIGINT before the bitwise function. The result type is BIGINT. 2. In the babel parser: For Mysql, we can support: ||Function Name|| |&| |\|| |~| |^| |<<| |>>| For PostgreSQL, we can support: ||Function Name|| |#| These functions are in SqlLibraryOperators. The input type can The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY, and numeric values will be cast to BIGINT. The result type depends on whether the bit argument is evaluated as a binary string or number: 1.Binary-string evaluation occurs when the arguments have a binary string type. Numeric evaluation occurs otherwise, with argument conversion to unsigned 64-bit integers as necessary. 2.Binary-string evaluation produces a binary string of the same length as the arguments. If the arguments have unequal lengths, an ER_INVALID_BITWISE_OPERANDS_SIZE error occurs. Numeric evaluation produces an unsigned 64-bit integer. What do you think of these above? BTW, I found Oracle, Snowflake and DB2 only support number for input type, should we need to support binary and varbinary? > 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 >Assignee: 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
[jira] [Commented] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016880#comment-17016880 ] hailong wang commented on CALCITE-3732: --- Thanks [~julianhyde] [~amaliujia]. I conclude as follows: 1. In the default parser, we can support: ||Function Name|| |BIT_COUNT| |BIT_AND| |BIT_OR| |BIT_XOR| These functions are in SqlStdOperatorTable. The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY. The return type is same as input type. For Oracle, we can support: ||Function Name|| |BitAnd| |BitOr| |BitXor| |BitNot| |BitShift| |BitClear| |BitRotate| |BitSet| For Snowflake, we can support: ||Function Name|| |BITSHIFTLEFT| |BITSHIFTRIGHT| For DB2, we can support: ||Function Name|| |BITANDNOT| These functions are in SqlLibraryOperators. The input Type only supports numeric values, and will be converted to an BIGINT before the bitwise function. The result type is BIGINT. 2. In the babel parser: For Mysql, we can support: ||Function Name|| |&| |\|| |~| |^| |<<| |>>| For PostgreSQL, we can support: ||Function Name|| |#| These functions are in SqlLibraryOperators. The input type can The input Type can be TINYINT, SMALLINT, INT, BIGINT, BINARY and VARBINARY, and numeric values will be cast to BIGINT. The result type depends on whether the bit argument is evaluated as a binary string or number: 1.Binary-string evaluation occurs when the arguments have a binary string type. Numeric evaluation occurs otherwise, with argument conversion to unsigned 64-bit integers as necessary. 2.Binary-string evaluation produces a binary string of the same length as the arguments. If the arguments have unequal lengths, an ER_INVALID_BITWISE_OPERANDS_SIZE error occurs. Numeric evaluation produces an unsigned 64-bit integer. What do you think of these above? BTW, I found Oracle, Snowflake and DB2 only support number for input type, should we need to support binary and varbinary? > 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 >Assignee: 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)
[jira] [Assigned] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang reassigned CALCITE-3732: - Assignee: hailong wang > 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 >Assignee: 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)
[jira] [Commented] (CALCITE-3732) Implement bit functions and operators
[ https://issues.apache.org/jira/browse/CALCITE-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015559#comment-17015559 ] hailong wang commented on CALCITE-3732: --- Thanks [~zabetak] [~amaliujia]. Yes, I am planning to work on this. I will send to dev@ to have a discussion. > 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)
[jira] [Commented] (CALCITE-3686) Implement bit_not function
[ https://issues.apache.org/jira/browse/CALCITE-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015070#comment-17015070 ] hailong wang commented on CALCITE-3686: --- Hi [~x1q1j1], it doesn't matter. But I found there is no bit_not as agg function for mysql. Maybe ~ Parser for a scalar function maybe better. > Implement bit_not function > -- > > Key: CALCITE-3686 > URL: https://issues.apache.org/jira/browse/CALCITE-3686 > Project: Calcite > Issue Type: Improvement >Reporter: Forward Xu >Assignee: Forward Xu >Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > > IMPLEMENT bit_not FUNCTION -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3732) Implement bit functions and operators
hailong wang created CALCITE-3732: - Summary: 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 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)
[jira] [Commented] (CALCITE-3686) Implement bit_not function
[ https://issues.apache.org/jira/browse/CALCITE-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015047#comment-17015047 ] hailong wang commented on CALCITE-3686: --- Hi [~x1q1j1], is this duplicate for a normal bitnot function? [https://github.com/apache/calcite/pull/1672] > Implement bit_not function > -- > > Key: CALCITE-3686 > URL: https://issues.apache.org/jira/browse/CALCITE-3686 > Project: Calcite > Issue Type: Improvement >Reporter: Forward Xu >Assignee: Forward Xu >Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > > IMPLEMENT bit_not FUNCTION -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3591) Add BIT_XOR BIT aggregate function
[ https://issues.apache.org/jira/browse/CALCITE-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998343#comment-16998343 ] hailong wang commented on CALCITE-3591: --- Thank you [~hyuan] [~julianhyde]. It is my pleasure to add BIT_XOR. I will pull a request to add it. > Add BIT_XOR BIT aggregate function > -- > > Key: CALCITE-3591 > URL: https://issues.apache.org/jira/browse/CALCITE-3591 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > In https://issues.apache.org/jira/browse/CALCITE-2770 , We have support > bit_and、bit_or aggregate function. I think we sholud also support BIT_XOR -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3591) Add BIT_XOR BIT aggregate function
[ https://issues.apache.org/jira/browse/CALCITE-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang reassigned CALCITE-3591: - Assignee: hailong wang > Add BIT_XOR BIT aggregate function > -- > > Key: CALCITE-3591 > URL: https://issues.apache.org/jira/browse/CALCITE-3591 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > In https://issues.apache.org/jira/browse/CALCITE-2770 , We have support > bit_and、bit_or aggregate function. I think we sholud also support BIT_XOR -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3592) Babel parser support "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998341#comment-16998341 ] hailong wang commented on CALCITE-3592: --- [~julianhyde], Thank you for your advise. I have updated jira. I don't find any function does the same. I will add it to Babel. > Babel parser support "~" SqlPrefixOperator for bitwise not > -- > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, So we can support "~" SqlPrefixOperator for bitwise not in babel > module -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Babel parser support "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Description: Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not operator, So we can support "~" SqlPrefixOperator for bitwise not in babel module (was: Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not operator, I think we can support "~" SqlPrefixOperator for bitwise not.) > Babel parser support "~" SqlPrefixOperator for bitwise not > -- > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, So we can support "~" SqlPrefixOperator for bitwise not in babel > module -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Babel parser support "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Summary: Babel parser support "~" SqlPrefixOperator for bitwise not (was: Add "~" SqlPrefixOperator for bitwise not) > Babel parser support "~" SqlPrefixOperator for bitwise not > -- > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, I think we can support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (CALCITE-3592) Add "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang reassigned CALCITE-3592: - Assignee: hailong wang > Add "~" SqlPrefixOperator for bitwise not > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Assignee: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, I think we can support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3592) Add "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996639#comment-16996639 ] hailong wang commented on CALCITE-3592: --- [~Chunwei Lei] Oh, I am sorry for that. I have updated, Thanks. what do you think of it, could you please assign this ticket to me? Thank you. > Add "~" SqlPrefixOperator for bitwise not > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, I think we can support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CALCITE-3592) Add "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hailong wang updated CALCITE-3592: -- Description: Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not operator, I think we can support "~" SqlPrefixOperator for bitwise not. (was: mysql、postgresql or SQL Server support non-standard operator "~" as Bitwise not, I think we support "~" SqlPrefixOperator for bitwise not.) > Add "~" SqlPrefixOperator for bitwise not > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > Mysql、Postgresql or SQL Server support non-standard operator as Bitwise not > operator, I think we can support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3592) Add "~" SqlPrefixOperator for bitwise not
[ https://issues.apache.org/jira/browse/CALCITE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994127#comment-16994127 ] hailong wang commented on CALCITE-3592: --- cc [~julianhyde], what do you think of it. > Add "~" SqlPrefixOperator for bitwise not > - > > Key: CALCITE-3592 > URL: https://issues.apache.org/jira/browse/CALCITE-3592 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.21.0 >Reporter: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > mysql、postgresql or SQL Server support non-standard operator "~" as Bitwise > not, I think we support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3591) Add BIT_XOR BIT aggregate function
[ https://issues.apache.org/jira/browse/CALCITE-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994125#comment-16994125 ] hailong wang commented on CALCITE-3591: --- Hi [~julianhyde], do we need support? > Add BIT_XOR BIT aggregate function > -- > > Key: CALCITE-3591 > URL: https://issues.apache.org/jira/browse/CALCITE-3591 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.21.0 >Reporter: hailong wang >Priority: Major > Fix For: 1.21.0, 1.22.0 > > > In https://issues.apache.org/jira/browse/CALCITE-2770 , We have support > bit_and、bit_or aggregate function. I think we sholud also support BIT_XOR -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3592) Add "~" SqlPrefixOperator for bitwise not
hailong wang created CALCITE-3592: - Summary: Add "~" SqlPrefixOperator for bitwise not Key: CALCITE-3592 URL: https://issues.apache.org/jira/browse/CALCITE-3592 Project: Calcite Issue Type: Improvement Components: babel Affects Versions: 1.21.0 Reporter: hailong wang Fix For: 1.22.0, 1.21.0 mysql、postgresql or SQL Server support non-standard operator "~" as Bitwise not, I think we support "~" SqlPrefixOperator for bitwise not. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CALCITE-3591) Add BIT_XOR BIT aggregate function
hailong wang created CALCITE-3591: - Summary: Add BIT_XOR BIT aggregate function Key: CALCITE-3591 URL: https://issues.apache.org/jira/browse/CALCITE-3591 Project: Calcite Issue Type: Improvement Components: core Affects Versions: 1.21.0 Reporter: hailong wang Fix For: 1.22.0, 1.21.0 In https://issues.apache.org/jira/browse/CALCITE-2770 , We have support bit_and、bit_or aggregate function. I think we sholud also support BIT_XOR -- This message was sent by Atlassian Jira (v8.3.4#803005)