You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/12/24 05:16:47 UTC

[GitHub] [shardingsphere] cheese8 commented on a change in pull request #14239: should throw exception while the SQL clause unsupported in encrypt rule

cheese8 commented on a change in pull request #14239:
URL: https://github.com/apache/shardingsphere/pull/14239#discussion_r774876673



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/EncryptConditionEngine.java
##########
@@ -131,6 +128,17 @@
         return Optional.empty();
     }
     
+    private Optional<EncryptCondition> createEncryptCondition(final BinaryOperationExpression expression, final String tableName) {
+        String operator = expression.getOperator();
+        if (!LOGICAL_OPERATOR.contains(operator)) {
+            if (isSupportedOperator(operator)) {
+                return createCompareEncryptCondition(tableName, expression, operator, expression.getRight());
+            }
+            throw new ShardingSphereException(String.format("The SQL clause '%s' is unsupported in encrypt rule.", operator));

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org