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

    https://github.com/apache/tajo/pull/181#discussion_r18688459
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
 ---
    @@ -249,36 +249,45 @@ public Expr visitInsert(Context context, Stack<Expr> 
stack, Insert expr) throws
     
         if (child != null && child.getType() == OpType.Projection) {
           Projection projection = (Projection) child;
    -      int projectColumnNum = projection.getNamedExprs().length;
     
    -      if (expr.hasTargetColumns()) {
    -        int targetColumnNum = expr.getTargetColumns().length;
    +      boolean includeAsterisk = true;
     
    -        if (targetColumnNum > projectColumnNum)  {
    -          context.state.addVerification("INSERT has more target columns 
than expressions");
    -        } else if (targetColumnNum < projectColumnNum) {
    -          context.state.addVerification("INSERT has more expressions than 
target columns");
    -        }
    -      } else {
    -        if (expr.hasTableName()) {
    -          String qualifiedName = expr.getTableName();
    -          if 
(TajoConstants.EMPTY_STRING.equals(CatalogUtil.extractQualifier(expr.getTableName())))
 {
    -            qualifiedName = 
CatalogUtil.buildFQName(context.queryContext.getCurrentDatabase(),
    -                expr.getTableName());
    -          }
    +      for (NamedExpr namedExpr : projection.getNamedExprs()) {
    +        includeAsterisk |= namedExpr.getExpr().getType() != 
OpType.Asterisk;
    --- End diff --
    
    It seems that 'includeAsterisk' is always true, because the initial value 
is true, and some boolean values are ORed. 


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