Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/231#discussion_r21732356
  
    --- Diff: tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlan.java ---
    @@ -147,20 +149,33 @@ public String generateUniqueColumnName(EvalNode 
evalNode) {
         return attachSeqIdToGeneratedColumnName(prefix).toLowerCase();
       }
     
    +  public String generateUniqueColumnName(Expr expr) {
    +    return generateUniqueColumnName(expr, false);
    +  }
    +
       /**
        * It generates an unique column name from Expr. It is usually used for 
an expression or predicate without
        * a specified name (i.e., alias).
    +   * Here, some expressions require to be identified with their names in 
the future.
    +   * For example, expressions must be identifiable with their names when 
getting targets in {@link LogicalPlanner#visitCreateIndex}.
        */
    -  public String generateUniqueColumnName(Expr expr) {
    +  public String generateUniqueColumnName(Expr expr, boolean identifiable) {
         String generatedName;
         if (expr.getType() == OpType.Column) {
           generatedName = ((ColumnReferenceExpr) expr).getCanonicalName();
    +    } else if (identifiable) {
    +      generatedName = generateUniqueIdentifiableColumnName(expr);
         } else { // if a generated column name
           generatedName = 
attachSeqIdToGeneratedColumnName(getGeneratedPrefixFromExpr(expr));
         }
         return generatedName;
       }
     
    +  private String generateUniqueIdentifiableColumnName(Expr expr) {
    +    IdentifiableNameBuilder nameBuilder = new 
IdentifiableNameBuilder(expr);
    --- End diff --
    
    Its purpose looks similar to the original generateUniqueColumnName. You may 
make it due to some bugs of generateUniqueColumnName. I think that it would 
better if you fix some bug of generateUniqueColumnName instead of making new 
implementation. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to