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

duanzhengqiang 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 c1a8f51d40d Fix EncryptColumnRuleConfigurationYamlSwapper 
swapToYamlConfiguration method loss of the logicColumn problem (#18046)
c1a8f51d40d is described below

commit c1a8f51d40d7ea8c6f1ed7a3ed594aff262295ee
Author: zhaoguhong <[email protected]>
AuthorDate: Tue May 31 09:00:11 2022 +0800

    Fix EncryptColumnRuleConfigurationYamlSwapper swapToYamlConfiguration 
method loss of the logicColumn problem (#18046)
---
 .../yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java     | 1 +
 .../yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapperTest.java | 1 +
 2 files changed, 2 insertions(+)

diff --git 
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
 
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
index b1c3f1d58a0..b943c90c599 100644
--- 
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
+++ 
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
@@ -29,6 +29,7 @@ public final class EncryptColumnRuleConfigurationYamlSwapper 
implements YamlConf
     @Override
     public YamlEncryptColumnRuleConfiguration swapToYamlConfiguration(final 
EncryptColumnRuleConfiguration data) {
         YamlEncryptColumnRuleConfiguration result = new 
YamlEncryptColumnRuleConfiguration();
+        result.setLogicColumn(data.getLogicColumn());
         result.setPlainColumn(data.getPlainColumn());
         result.setCipherColumn(data.getCipherColumn());
         result.setAssistedQueryColumn(data.getAssistedQueryColumn());
diff --git 
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapperTest.java
 
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapperTest.java
index 1aba7d1fd07..6c6fe287406 100644
--- 
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapperTest.java
+++ 
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapperTest.java
@@ -31,6 +31,7 @@ public final class 
EncryptColumnRuleConfigurationYamlSwapperTest {
         EncryptColumnRuleConfigurationYamlSwapper swapper = new 
EncryptColumnRuleConfigurationYamlSwapper();
         EncryptColumnRuleConfiguration encryptColumnRuleConfig = new 
EncryptColumnRuleConfiguration("logicColumn", "cipherColumn", 
"assistedQueryColumn", "plainColumn", "encryptorName", true);
         YamlEncryptColumnRuleConfiguration actual = 
swapper.swapToYamlConfiguration(encryptColumnRuleConfig);
+        assertThat(actual.getLogicColumn(), is("logicColumn"));
         assertThat(actual.getCipherColumn(), is("cipherColumn"));
         assertThat(actual.getAssistedQueryColumn(), is("assistedQueryColumn"));
         assertThat(actual.getPlainColumn(), is("plainColumn"));

Reply via email to