Skip to content

Commit

Permalink
Revise pr#28320 (apache#28351)
Browse files Browse the repository at this point in the history
  • Loading branch information
strongduanmu authored Sep 4, 2023
1 parent 7121e65 commit fbe3dba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
import org.apache.shardingsphere.sqlfederation.compiler.converter.segment.SQLSegmentConverter;
import org.apache.shardingsphere.sqlfederation.compiler.converter.segment.expression.ExpressionConverter;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import java.util.List;
import java.util.LinkedList;

/**
* Unary operation expression converter.
*/
public class UnaryOperationExpressionConverter implements SQLSegmentConverter<UnaryOperationExpression, SqlNode> {
public final class UnaryOperationExpressionConverter implements SQLSegmentConverter<UnaryOperationExpression, SqlNode> {

private static final Map<String, SqlOperator> REGISTRY = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.MultisetExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.NotExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.TypeCastExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ValuesExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.UnaryOperationExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ValuesExpression;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.CommonExpressionSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ColumnWithJoinOperatorSegment;
Expand Down Expand Up @@ -75,9 +75,9 @@
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedMultisetExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedNotExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedTypeCastExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedUnaryOperationExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedValuesExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedVariableSegment;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.ExpectedUnaryOperationExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.complex.ExpectedCommonExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.simple.ExpectedLiteralExpression;
import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.expr.simple.ExpectedParameterMarkerExpression;
Expand Down Expand Up @@ -213,6 +213,7 @@ public static void assertExistsSubqueryExpression(final SQLCaseAssertContext ass

/**
* Assert binary operation expression.
*
* @param assertContext assert context
* @param actual actual binary operation expression
* @param expected expected binary operation expression
Expand All @@ -233,6 +234,7 @@ public static void assertBinaryOperationExpression(final SQLCaseAssertContext as

/**
* Assert in operation expression.
*
* @param assertContext assert context
* @param actual actual in operation expression
* @param expected expected in operation expression
Expand All @@ -253,6 +255,7 @@ public static void assertInExpression(final SQLCaseAssertContext assertContext,

/**
* Assert not operation expression.
*
* @param assertContext assert context
* @param actual actual not operation expression
* @param expected expected not operation expression
Expand All @@ -270,6 +273,7 @@ public static void assertNotExpression(final SQLCaseAssertContext assertContext,

/**
* Assert list operation expression.
*
* @param assertContext assert context
* @param actual actual list operation expression
* @param expected expected list operation expression
Expand All @@ -293,6 +297,7 @@ public static void assertListExpression(final SQLCaseAssertContext assertContext

/**
* Assert between operation expression.
*
* @param assertContext assert context
* @param actual actual between operation expression
* @param expected expected between operation expression
Expand Down Expand Up @@ -516,6 +521,7 @@ private static void assertMultisetExpression(final SQLCaseAssertContext assertCo

/**
* Assert unary operation expression.
*
* @param assertContext assert context
* @param actual actual unary operation expression
* @param expected expected unary operation expression
Expand Down

0 comments on commit fbe3dba

Please sign in to comment.