Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CALCITE-3592] Implement BITNOT scalar function #3983

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

normanj-bitquill
Copy link
Contributor

  • Implemented the BITNOT scalar function as a standard function
  • Supports integer and binary arguments
  • Returns NULL if the argument is NULL

* Implemented the BITNOT scalar function as a standard function
* Supports integer and binary arguments
* Returns NULL if the argument is NULL
@@ -15738,6 +15738,29 @@ private static void checkLogicalOrFunc(SqlOperatorFixture f) {
true);
}

@Test void testBitNotScalarFunc() {
final SqlOperatorFixture f = fixture();
f.setFor(SqlStdOperatorTable.BITXOR, VmName.EXPAND);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XOR?
How about a failing test with DECIMAL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that using XOR had not impact on the tests. Fixed now.

Also added a test for BITNOT(DECIMAL).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that setFor is just decorative

Copy link

sonarcloud bot commented Sep 26, 2024

@@ -15738,6 +15738,35 @@ private static void checkLogicalOrFunc(SqlOperatorFixture f) {
true);
}

@Test void testBitNotScalarFunc() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add jira link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants