This is an automated email from the ASF dual-hosted git repository. niuzihao 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 70e13e0636d Revise code style for MySQLNotFunction (#32963) 70e13e0636d is described below commit 70e13e0636d57c43773f335d430eb68bac0eef15 Author: Zhengqiang Duan <duanzhengqi...@apache.org> AuthorDate: Mon Sep 23 18:26:21 2024 +0800 Revise code style for MySQLNotFunction (#32963) --- .../sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java index 986e78efed3..6696378953c 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java @@ -54,12 +54,13 @@ public final class MySQLNotFunction extends SqlUserDefinedFunction { * @param value value * @return not operator result */ + @SuppressWarnings("unused") public static Long not(final Object value) { if (null == value) { return null; } if (value instanceof Number) { - return ((Number) value).longValue() == 0 ? 1L : 0L; + return 0 == ((Number) value).longValue() ? 1L : 0L; } if (value instanceof Boolean) { return ((Boolean) value) ? 0L : 1L;