Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      Arithmetic and logical operations between different operands are usual in SQL queries. Function invocations with parameters which are different to the parameters of function definition are also usual. Implicit type conversion should occur in such cases.

      Currently, however, Tajo does not support implicit type conversion. We should implement this feature.

      1. TAJO-797_20140430_02:23:22.patch
        205 kB
        Hyunsik Choi
      2. TAJO-797.patch
        205 kB
        Hyunsik Choi

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        Created a review request against branch master in reviewboard
        https://reviews.apache.org/r/20827/

        Show
        hyunsik Hyunsik Choi added a comment - Created a review request against branch master in reviewboard https://reviews.apache.org/r/20827/
        Hide
        hyunsik Hyunsik Choi added a comment -

        Currently, Tajo partially supports implicit type conversion by using Datum's arithmetic/comparable operation. This patch adds full implicit type conversion feature. This feature inserts cast expressions to some operation whose operands are compatible but need casting. Also, it is used in function invocation, BETWEEN, and other kinds operations.

        In addition, the patch fixes casting bugs. Currently, if there is some arithmetic operation between FLOAT and LONG, both terms were casted to double values and then were computed so far. But, it is different to the operation based on IEEE 754. In such case, LONG should be casted float and then should be computed.

        Besides, the patch separates EvalNode into unary, binary, and others. Currently, EvalNode has been always a binary expr and we have used some messy hack to use EvalNode as unary, binary or others.

        Show
        hyunsik Hyunsik Choi added a comment - Currently, Tajo partially supports implicit type conversion by using Datum's arithmetic/comparable operation. This patch adds full implicit type conversion feature. This feature inserts cast expressions to some operation whose operands are compatible but need casting. Also, it is used in function invocation, BETWEEN, and other kinds operations. In addition, the patch fixes casting bugs. Currently, if there is some arithmetic operation between FLOAT and LONG, both terms were casted to double values and then were computed so far. But, it is different to the operation based on IEEE 754. In such case, LONG should be casted float and then should be computed. Besides, the patch separates EvalNode into unary, binary, and others. Currently, EvalNode has been always a binary expr and we have used some messy hack to use EvalNode as unary, binary or others.
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12642398/TAJO-797.patch
        against master revision 6cc5006.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 10 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 184 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-common tajo-common tajo-core tajo-storage.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/393//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/393//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/393//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12642398/TAJO-797.patch against master revision 6cc5006. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 10 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 184 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-common tajo-common tajo-core tajo-storage. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/393//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/393//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/393//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Updated the review request against branch master in reviewboard

        Show
        hyunsik Hyunsik Choi added a comment - Updated the review request against branch master in reviewboard
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12642492/TAJO-797_20140430_02%3A23%3A22.patch
        against master revision 0fb823b.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 10 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 184 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-common tajo-common tajo-core tajo-storage.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/400//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/400//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/400//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12642492/TAJO-797_20140430_02%3A23%3A22.patch against master revision 0fb823b. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 10 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 184 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-common tajo-common tajo-core tajo-storage. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/400//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/400//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/400//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master branch.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #211 (See https://builds.apache.org/job/Tajo-master-build/211/)
        TAJO-797: Implicit type conversion support. (hyunsik) (hyunsik: rev bd032094caa0f54ddfbee2ee5eb6ab46824a9afa)

        • tajo-storage/src/main/java/org/apache/tajo/storage/VTuple.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/IsNullEval.java
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/PartialBinaryExpr.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/BasicEvalNodeVisitor.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/join/JoinGraph.java
        • tajo-storage/src/main/java/org/apache/tajo/storage/TextSerializerDeserializer.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Datum.java
        • tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/BinaryEval.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Inet4Datum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/TextDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Int4Datum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalType.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/SimpleEvalNodeVisitor.java
        • tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/exception/InvalidOperationException.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/NotEval.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/JoinNode.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java
        • tajo-common/src/main/java/org/apache/tajo/util/TUtil.java
        • tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/CharDatum.java
        • tajo-common/src/main/java/org/apache/tajo/exception/InvalidOperationException.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/BetweenPredicateEval.java
        • tajo-common/src/main/java/org/apache/tajo/datum/BlobDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Float8Datum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/BitDatum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/RowConstantEval.java
        • tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Int2Datum.java
        • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java
        • tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/rewrite/FilterPushDownRule.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java
        • tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java
        • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/CaseWhenEval.java
        • tajo-common/src/test/java/org/apache/tajo/datum/TestDateDatum.java
        • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java
        • tajo-core/src/main/java/org/apache/tajo/util/ClassUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/AlgebraicUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprsVerifier.java
        • tajo-core/src/main/java/org/apache/tajo/util/IndexUtil.java
        • tajo-core/src/test/java/org/apache/tajo/engine/planner/TestExprAnnotator.java
        • tajo-common/src/main/java/org/apache/tajo/datum/exception/InvalidCastException.java
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
        • tajo-common/src/main/java/org/apache/tajo/exception/InvalidCastException.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/CastEval.java
        • tajo-common/src/test/java/org/apache/tajo/datum/TestTimeDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Int8Datum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/UnaryEval.java
        • tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
        • tajo-common/src/main/java/org/apache/tajo/datum/Float4Datum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/NullDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/BooleanDatum.java
        • tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalNode.java
        • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestEvalTree.java
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/SignedEval.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/InvalidCastException.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #211 (See https://builds.apache.org/job/Tajo-master-build/211/ ) TAJO-797 : Implicit type conversion support. (hyunsik) (hyunsik: rev bd032094caa0f54ddfbee2ee5eb6ab46824a9afa) tajo-storage/src/main/java/org/apache/tajo/storage/VTuple.java tajo-core/src/main/java/org/apache/tajo/engine/eval/IsNullEval.java CHANGES tajo-core/src/main/java/org/apache/tajo/engine/eval/PartialBinaryExpr.java tajo-core/src/main/java/org/apache/tajo/engine/eval/BasicEvalNodeVisitor.java tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/join/JoinGraph.java tajo-storage/src/main/java/org/apache/tajo/storage/TextSerializerDeserializer.java tajo-common/src/main/java/org/apache/tajo/datum/Datum.java tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java tajo-core/src/main/java/org/apache/tajo/engine/eval/BinaryEval.java tajo-common/src/main/java/org/apache/tajo/datum/Inet4Datum.java tajo-common/src/main/java/org/apache/tajo/datum/TextDatum.java tajo-common/src/main/java/org/apache/tajo/datum/Int4Datum.java tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalType.java tajo-core/src/main/java/org/apache/tajo/engine/eval/SimpleEvalNodeVisitor.java tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java tajo-common/src/main/java/org/apache/tajo/datum/exception/InvalidOperationException.java tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java tajo-core/src/main/java/org/apache/tajo/engine/eval/NotEval.java tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/JoinNode.java tajo-core/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java tajo-common/src/main/java/org/apache/tajo/util/TUtil.java tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java tajo-common/src/main/java/org/apache/tajo/datum/CharDatum.java tajo-common/src/main/java/org/apache/tajo/exception/InvalidOperationException.java tajo-core/src/main/java/org/apache/tajo/engine/eval/BetweenPredicateEval.java tajo-common/src/main/java/org/apache/tajo/datum/BlobDatum.java tajo-common/src/main/java/org/apache/tajo/datum/Float8Datum.java tajo-common/src/main/java/org/apache/tajo/datum/BitDatum.java tajo-core/src/main/java/org/apache/tajo/engine/eval/RowConstantEval.java tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java tajo-common/src/main/java/org/apache/tajo/datum/Int2Datum.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java tajo-core/src/main/java/org/apache/tajo/engine/planner/rewrite/FilterPushDownRule.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java tajo-core/src/main/java/org/apache/tajo/engine/eval/CaseWhenEval.java tajo-common/src/test/java/org/apache/tajo/datum/TestDateDatum.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java tajo-core/src/main/java/org/apache/tajo/util/ClassUtil.java tajo-core/src/main/java/org/apache/tajo/engine/eval/AlgebraicUtil.java tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprsVerifier.java tajo-core/src/main/java/org/apache/tajo/util/IndexUtil.java tajo-core/src/test/java/org/apache/tajo/engine/planner/TestExprAnnotator.java tajo-common/src/main/java/org/apache/tajo/datum/exception/InvalidCastException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java tajo-common/src/main/java/org/apache/tajo/exception/InvalidCastException.java tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java tajo-core/src/main/java/org/apache/tajo/engine/eval/CastEval.java tajo-common/src/test/java/org/apache/tajo/datum/TestTimeDatum.java tajo-common/src/main/java/org/apache/tajo/datum/Int8Datum.java tajo-core/src/main/java/org/apache/tajo/engine/eval/UnaryEval.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java tajo-common/src/main/java/org/apache/tajo/datum/Float4Datum.java tajo-common/src/main/java/org/apache/tajo/datum/NullDatum.java tajo-common/src/main/java/org/apache/tajo/datum/BooleanDatum.java tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalNode.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestEvalTree.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java tajo-core/src/main/java/org/apache/tajo/engine/eval/SignedEval.java tajo-core/src/main/java/org/apache/tajo/engine/eval/InvalidCastException.java

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development