You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/09/25 07:08:49 UTC

[shardingsphere] branch master updated: Refactor BinaryOperationExpressionConverter (#12707)

This is an automated email from the ASF dual-hosted git repository.

panjuan 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 a9583b4  Refactor BinaryOperationExpressionConverter (#12707)
a9583b4 is described below

commit a9583b4138b0e6aa5d45602f5fc84ac45fa7475c
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Sep 25 15:08:09 2021 +0800

    Refactor BinaryOperationExpressionConverter (#12707)
---
 .../segment/expression/impl/BinaryOperationExpressionConverter.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-optimize/src/main/java/org/apache/shardingsphere/infra/optimize/converter/segment/expression/impl/BinaryOperationExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-optimize/src/main/java/org/apache/shardingsphere/infra/optimize/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
index fa99a27..41f72a2 100644
--- a/shardingsphere-infra/shardingsphere-infra-optimize/src/main/java/org/apache/shardingsphere/infra/optimize/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-optimize/src/main/java/org/apache/shardingsphere/infra/optimize/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
@@ -54,13 +54,13 @@ public final class BinaryOperationExpressionConverter implements SQLSegmentConve
     
     @Override
     public Optional<SqlNode> convert(final BinaryOperationExpression segment) {
-        SqlBinaryOperator operator = getOperator(segment.getOperator());
+        SqlBinaryOperator operator = convertOperator(segment.getOperator());
         SqlNode left = convertExpression(segment.getLeft());
         SqlNode right = convertExpression(segment.getRight());
         return Optional.of(new SqlBasicCall(operator, new SqlNode[] {left, right}, SqlParserPos.ZERO));
     }
     
-    private SqlBinaryOperator getOperator(final String operator) {
+    private SqlBinaryOperator convertOperator(final String operator) {
         Preconditions.checkState(REGISTRY.containsKey(operator), "Unsupported SQL operator: `%s`", operator);
         return REGISTRY.get(operator);
     }