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 2019/10/10 11:20:29 UTC

[GitHub] [incubator-shardingsphere] wgy8283335 opened a new issue #3213: There are two methods which are very like each other in DerivedColumn.class

wgy8283335 opened a new issue #3213: There are two methods which are very like each other in DerivedColumn.class
URL: https://github.com/apache/incubator-shardingsphere/issues/3213
 
 
   ## There are two methods which are very like each other in DerivedColumn.class
   
   org.apache.shardingsphere.core.optimize.segment.select.projection.DerivedColumn
   
   ```
       /**
        * Judge is derived column name or not.
        *
        * @param columnName column name to be judged
        * @return is derived column name or not
        */
       public static boolean isDerivedColumnName(final String columnName) {
           for (DerivedColumn each : DerivedColumn.values()) {
               if (columnName.startsWith(each.pattern)) {
                   return true;
               }
           }
           return false;
       }
       
       /**
        * Judge is derived column or not.
        *
        * @param columnName column name to be judged
        * @return is derived column or not
        */
       public static boolean isDerivedColumn(final String columnName) {
           for (DerivedColumn each : DerivedColumn.getValues()) {
               if (columnName.startsWith(each.pattern)) {
                   return true;
               }
           }
           return false;
       }
   
   ```
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services