This is an automated email from the ASF dual-hosted git repository.
chengzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 9485f481c32 Fix sonar issue for MySQLBitCountFunction (#31736)
9485f481c32 is described below
commit 9485f481c322e226f56689b1c65048070f168875
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Jun 17 17:50:10 2024 +0800
Fix sonar issue for MySQLBitCountFunction (#31736)
---
.../sqlfederation/optimizer/function/mysql/MySQLBitCountFunction.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLBitCountFunction.java
b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLBitCountFunction.java
index 2eb0e4fbdc2..c070cd85b8e 100644
---
a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLBitCountFunction.java
+++
b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLBitCountFunction.java
@@ -17,6 +17,8 @@
package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.apache.calcite.util.BitString;
import org.apache.commons.lang3.StringUtils;
@@ -25,6 +27,7 @@ import java.math.BigInteger;
/**
* MySQL bit count function.
*/
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class MySQLBitCountFunction {
/**
@@ -33,6 +36,7 @@ public final class MySQLBitCountFunction {
* @param value value
* @return bit count
*/
+ @SuppressWarnings("unused")
public static Object bitCount(final Object value) {
if (null == value) {
return 0;