jerryshao commented on code in PR #11074:
URL: https://github.com/apache/gravitino/pull/11074#discussion_r3246551190


##########
core/src/main/java/org/apache/gravitino/storage/relational/service/HierarchicalConventionPOStorageOps.java:
##########
@@ -0,0 +1,195 @@
+/*
+ * 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.
+ */
+package org.apache.gravitino.storage.relational.service;
+
+import java.util.List;
+import java.util.function.UnaryOperator;
+import java.util.stream.Collectors;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.gravitino.Entity;
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.Namespace;
+import org.apache.gravitino.utils.HierarchicalSchemaUtil;
+
+/**
+ * Wraps a {@link BasePOStorageOps} to bridge the hierarchical schema naming 
convention. Names that
+ * appear in API form (logical separator) are translated to storage form 
(physical separator) before
+ * delegating. Two optional PO rewriters allow callers to translate a PO field 
across the boundary:
+ * the read rewriter is applied to POs returned from read methods (typically 
physical→logical), and
+ * the write rewriter is applied to POs passed into write methods (typically 
logical→physical) so
+ * the SQL still receives storage-form values.
+ *
+ * @param <PO> persistent object type
+ * @param <Mapper> MyBatis mapper type
+ */
+public class HierarchicalConventionPOStorageOps<PO, Mapper> extends 
BasePOStorageOps<PO, Mapper> {
+
+  private final BasePOStorageOps<PO, Mapper> delegate;
+  private final UnaryOperator<PO> readRewriter;
+  private final UnaryOperator<PO> writeRewriter;

Review Comment:
   These two variable names are confusing. What is the meaning of 
`writeWriter`? You'd better pick a better name.



-- 
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]

Reply via email to