strongduanmu commented on a change in pull request #16002: URL: https://github.com/apache/shardingsphere/pull/16002#discussion_r825535912
########## File path: shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/query-with-plain/dml/select/select_subquery.xml ########## @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml"> +<!-- TODO FIX ME!--> +<!-- <rewrite-assertion id="select_not_nested_subquery_in_projection_for_plain" db-types="MySQL">--> +<!-- <input sql="SELECT u.certificate_number, u.password, (SELECT o.amount FROM t_account_bak o WHERE o.certificate_number=u.certificate_number) amount FROM t_account u, t_account_bak c WHERE u.certificate_number = c.certificate_number and u.password=?" parameters="1" />--> +<!-- <output sql="SELECT u.cipher_certificate_number AS certificate_number, u.cipher_password AS password, (SELECT o.cipher_amount AS amount FROM t_account_bak o WHERE o.assisted_query_certificate_number=u.assisted_query_certificate_number) amount FROM t_account u, t_account_bak c WHERE u.assisted_query_certificate_number = c.assisted_query_certificate_number and u.assisted_query_password=?" parameters="assisted_query_1" />--> +<!-- </rewrite-assertion>--> + +<!-- TODO FIX ME!--> +<!-- <rewrite-assertion id="select_not_nested_subquery_in_table_segment_for_plain" db-types="MySQL">--> +<!-- <input sql="SELECT u.amount, u.password, o.certificate_number FROM (SELECT certificate_number FROM t_account) o, t_account u WHERE o.certificate_number=u.certificate_number AND u.password=?" parameters="1" />--> +<!-- <output sql="SELECT u.cipher_amount AS amount, u.cipher_password AS password, o.cipher_certificate_number AS certificate_number FROM (SELECT cipher_certificate_number, assisted_query_certificate_number FROM t_account) o, t_account u WHERE o.assisted_query_certificate_number=u.assisted_query_certificate_number AND u.assisted_query_password=?" parameters="assisted_query_1" />--> +<!-- </rewrite-assertion>--> + +<!-- TODO FIX ME!--> +<!-- <rewrite-assertion id="select_not_nested_subquery_in_table_segment_refed_for_plain" db-types="MySQL">--> +<!-- <input sql="SELECT u.amount, u.password, o.certificate_number FROM (SELECT certificate_number FROM t_account_bak) o, t_account u WHERE o.certificate_number=u.certificate_number AND u.password=?" parameters="1" />--> +<!-- <output sql="SELECT u.cipher_amount AS amount, u.cipher_password AS password, o.plain_certificate_number AS certificate_number FROM (SELECT cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number FROM t_account_bak) o, t_account u WHERE o.assisted_query_certificate_number=u.assisted_query_certificate_number AND u.assisted_query_password=?" parameters="assisted_query_1" />--> +<!-- </rewrite-assertion>--> + + <rewrite-assertion id="select_not_nested_subquery_in_table_segment_alias_for_plain" db-types="MySQL"> + <input sql="SELECT o.certificate_number FROM (SELECT a.certificate_number FROM t_account a) o" /> + <output sql="SELECT o.cipher_certificate_number AS certificate_number FROM (SELECT a.cipher_certificate_number, a.assisted_query_certificate_number FROM t_account a) o" /> + </rewrite-assertion> + +<!-- TODO FIX ME!--> Review comment: > encrypt Got it. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
