You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by jihoonson <gi...@git.apache.org> on 2015/07/23 05:32:44 UTC

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

GitHub user jihoonson opened a pull request:

    https://github.com/apache/tajo/pull/643

    TAJO-1597: Problem of ignoring theta join condition

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jihoonson/tajo-2 TAJO-1597

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/643.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #643
    
----
commit 9b21fd94a6619957bf70604b6edc1e86a8adf7d7
Author: Jihoon Son <ji...@apache.org>
Date:   2015-07-23T03:31:50Z

    TAJO-1597

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson closed the pull request at:

    https://github.com/apache/tajo/pull/643


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/643#issuecomment-124159005
  
    It seems to include in and exist subquery 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/643#discussion_r35341281
  
    --- Diff: tajo-plan/src/main/java/org/apache/tajo/plan/algebra/BaseAlgebraVisitor.java ---
    @@ -52,221 +52,221 @@ public RESULT visit(CONTEXT ctx, Stack<Expr> stack, Expr expr) throws TajoExcept
         RESULT current;
     
         switch (expr.getType()) {
    -    case SetSession:
    -      current = visitSetSession(ctx, stack, (SetSession) expr);
    -      break;
    -
    -    case Projection:
    -      current = visitProjection(ctx, stack, (Projection) expr);
    -      break;
    -    case Limit:
    -      current = visitLimit(ctx, stack, (Limit) expr);
    -      break;
    -    case Sort:
    -      current = visitSort(ctx, stack, (Sort) expr);
    -      break;
    -    case Having:
    -      current = visitHaving(ctx, stack, (Having) expr);
    -      break;
    -    case Aggregation:
    -      current = visitGroupBy(ctx, stack, (Aggregation) expr);
    -      break;
    -    case Join:
    -      current = visitJoin(ctx, stack, (Join) expr);
    -      break;
    -    case Filter:
    -      current = visitFilter(ctx, stack, (Selection) expr);
    -      break;
    -    case Union:
    -      current = visitUnion(ctx, stack, (SetOperation) expr);
    -      break;
    -    case Except:
    -      current = visitExcept(ctx, stack, (SetOperation) expr);
    -      break;
    -    case Intersect:
    -      current = visitIntersect(ctx, stack, (SetOperation) expr);
    -      break;
    -    case SimpleTableSubQuery:
    -      current = visitSimpleTableSubQuery(ctx, stack, (SimpleTableSubQuery) expr);
    -      break;
    -    case TablePrimaryTableSubQuery:
    -      current = visitTableSubQuery(ctx, stack, (TablePrimarySubQuery) expr);
    -      break;
    -    case RelationList:
    -      current = visitRelationList(ctx, stack, (RelationList) expr);
    -      break;
    -    case Relation:
    -      current = visitRelation(ctx, stack, (Relation) expr);
    -      break;
    -    case ScalarSubQuery:
    -      current = visitScalarSubQuery(ctx, stack, (ScalarSubQuery) expr);
    -      break;
    -    case Explain:
    -      current = visitExplain(ctx, stack, (Explain) expr);
    -      break;
    -
    -    case CreateDatabase:
    -      current = visitCreateDatabase(ctx, stack, (CreateDatabase) expr);
    -      break;
    -    case DropDatabase:
    -      current = visitDropDatabase(ctx, stack, (DropDatabase) expr);
    -      break;
    -    case CreateTable:
    -      current = visitCreateTable(ctx, stack, (CreateTable) expr);
    -      break;
    -    case DropTable:
    -      current = visitDropTable(ctx, stack, (DropTable) expr);
    -      break;
    -    case AlterTablespace:
    -      current = visitAlterTablespace(ctx, stack, (AlterTablespace) expr);
    -      break;
    -    case AlterTable:
    -      current = visitAlterTable(ctx, stack, (AlterTable) expr);
    -      break;
    -    case TruncateTable:
    -      current = visitTruncateTable(ctx, stack, (TruncateTable)expr);
    -      break;
    -
    -    case Insert:
    -      current = visitInsert(ctx, stack, (Insert) expr);
    -      break;
    -
    -    case And:
    -      current = visitAnd(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Or:
    -      current = visitOr(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Not:
    -      current = visitNot(ctx, stack, (NotExpr) expr);
    -      break;
    -
    -    case Equals:
    -      current = visitEquals(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case NotEquals:
    -      current = visitNotEquals(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case LessThan:
    -      current = visitLessThan(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case LessThanOrEquals:
    -      current = visitLessThanOrEquals(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case GreaterThan:
    -      current = visitGreaterThan(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case GreaterThanOrEquals:
    -      current = visitGreaterThanOrEquals(ctx, stack, (BinaryOperator) expr);
    -      break;
    -
    -    // Other Predicates
    -    case Between:
    -      current = visitBetween(ctx, stack, (BetweenPredicate) expr);
    -      break;
    -    case CaseWhen:
    -      current = visitCaseWhen(ctx, stack, (CaseWhenPredicate) expr);
    -      break;
    -    case IsNullPredicate:
    -      current = visitIsNullPredicate(ctx, stack, (IsNullPredicate) expr);
    -      break;
    -    case InPredicate:
    -      current = visitInPredicate(ctx, stack, (InPredicate) expr);
    -      break;
    -    case ValueList:
    -      current = visitValueListExpr(ctx, stack, (ValueListExpr) expr);
    -      break;
    -    case ExistsPredicate:
    -      current = visitExistsPredicate(ctx, stack, (ExistsPredicate) expr);
    -      break;
    -
    -    // String Operator or Pattern Matching Predicates
    -    case LikePredicate:
    -      current = visitLikePredicate(ctx, stack, (PatternMatchPredicate) expr);
    -      break;
    -    case SimilarToPredicate:
    -      current = visitSimilarToPredicate(ctx, stack, (PatternMatchPredicate) expr);
    -      break;
    -    case Regexp:
    -      current = visitRegexpPredicate(ctx, stack, (PatternMatchPredicate) expr);
    -      break;
    -    case Concatenate:
    -      current = visitConcatenate(ctx, stack, (BinaryOperator) expr);
    -      break;
    -
    -    // Arithmetic Operators
    -    case Plus:
    -      current = visitPlus(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Minus:
    -      current = visitMinus(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Multiply:
    -      current = visitMultiply(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Divide:
    -      current = visitDivide(ctx, stack, (BinaryOperator) expr);
    -      break;
    -    case Modular:
    -      current = visitModular(ctx, stack, (BinaryOperator) expr);
    -      break;
    -
    -    // Other Expressions
    -    case Sign:
    -      current = visitSign(ctx, stack, (SignedExpr) expr);
    -      break;
    -    case Column:
    -      current = visitColumnReference(ctx, stack, (ColumnReferenceExpr) expr);
    -      break;
    -    case Target:
    -      current = visitTargetExpr(ctx, stack, (NamedExpr) expr);
    -      break;
    -    case Function:
    -      current = visitFunction(ctx, stack, (FunctionExpr) expr);
    -      break;
    -    case Asterisk:
    -      current = visitQualifiedAsterisk(ctx, stack, (QualifiedAsteriskExpr) expr);
    -      break;
    -
    -
    -    case CountRowsFunction:
    -      current = visitCountRowsFunction(ctx, stack, (CountRowsFunctionExpr) expr);
    -      break;
    -    case GeneralSetFunction:
    -      current = visitGeneralSetFunction(ctx, stack, (GeneralSetFunctionExpr) expr);
    -      break;
    -    case WindowFunction:
    -      current = visitWindowFunction(ctx, stack, (WindowFunctionExpr) expr);
    -      break;
    -
    -
    -    case DataType:
    -      current = visitDataType(ctx, stack, (DataTypeExpr) expr);
    -      break;
    -    case Cast:
    -      current = visitCastExpr(ctx, stack, (CastExpr) expr);
    -      break;
    -    case Literal:
    -      current = visitLiteral(ctx, stack, (LiteralValue) expr);
    -      break;
    -    case NullLiteral:
    -      current = visitNullLiteral(ctx, stack, (NullLiteral) expr);
    -      break;
    -    case DateLiteral:
    -      current = visitDateLiteral(ctx, stack, (DateLiteral) expr);
    -      break;
    -    case TimeLiteral:
    -      current = visitTimeLiteral(ctx, stack, (TimeLiteral) expr);
    -      break;
    -    case TimestampLiteral:
    -      current = visitTimestampLiteral(ctx, stack, (TimestampLiteral) expr);
    -      break;
    -    case IntervalLiteral:
    -      current = visitIntervalLiteral(ctx, stack, (IntervalLiteral) expr);
    -      break;
    -
    -    default:
    -      throw new TajoInternalError("Cannot support this type algebra \"" + expr.getType() + "\"");
    +      case SetSession:
    --- End diff --
    
    The wrong coding format seems to be applied. {{switch}} and {{case}} should be the same column position.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/643#issuecomment-124286703
  
    Damn. It's my mistake.
    I'll make another pr.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/643#issuecomment-124002148
  
    The filters seem to be higher than sort. It may cause sorting of unnecessary rows. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1597: Problem of ignoring theta join condi...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/643#issuecomment-124004304
  
    Thanks! It was my mistake. I've fixed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---