Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-833

NPE occurs when using the column as a alias name in the multiple DISTINCT.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0, 0.8.1
    • Component/s: None
    • Labels:
      None

      Description

      See title. The next query using column name l_partkey as alias throws NPE.

      select
          lineitem.l_orderkey as l_orderkey,
          lineitem.l_partkey as l_partkey,
          count(distinct lineitem.l_partkey) as cnt1,
          count(distinct lineitem.l_suppkey) as cnt2,
          sum(lineitem.l_quantity) as sum1
      from
          lineitem
      group by
          lineitem.l_orderkey, lineitem.l_partkey
      
      2014-05-16 16:28:42,963 ERROR org.apache.tajo.worker.Task:
      java.lang.NullPointerException
              at org.apache.tajo.storage.VTuple.getFloat8(VTuple.java:151)
              at org.apache.tajo.storage.RawFile$RawFileAppender.addTuple(RawFile.java:640)
              at org.apache.tajo.engine.planner.physical.HashShuffleFileWriteExec.next(HashShuffleFileWriteExec.java:120)
              at org.apache.tajo.worker.Task.run(Task.java:383)
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:391)
              at java.lang.Thread.run(Thread.java:744)
      
      1. TAJO-833.patch
        14 kB
        Hyoungjun Kim

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master and 0.8.1 branch.

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

        SUCCESS: Integrated in Tajo-0.8.1-build #100 (See https://builds.apache.org/job/Tajo-0.8.1-build/100/)
        TAJO-833: NPE occurs when using the column as a alias name in the multiple DISTINCT. (Hyoungjun Kim via hyunsik) (hyunsik: rev f0ee8d59e9b2873c93c421007bb8f53f0f1b4af3)

        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/AggregationExec.java
        • tajo-storage/src/main/java/org/apache/tajo/storage/TupleComparator.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case8.sql
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/FieldEval.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case8.result
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.1-build #100 (See https://builds.apache.org/job/Tajo-0.8.1-build/100/ ) TAJO-833 : NPE occurs when using the column as a alias name in the multiple DISTINCT. (Hyoungjun Kim via hyunsik) (hyunsik: rev f0ee8d59e9b2873c93c421007bb8f53f0f1b4af3) tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/AggregationExec.java tajo-storage/src/main/java/org/apache/tajo/storage/TupleComparator.java tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case8.sql CHANGES tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java tajo-core/src/main/java/org/apache/tajo/engine/eval/FieldEval.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case8.result
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #220 (See https://builds.apache.org/job/Tajo-master-build/220/)
        TAJO-833 (babokim: rev 5dda14a9d3e2216c1c80ae2b3654a78b852df269)

        • tajo-core/src/main/java/org/apache/tajo/engine/eval/FieldEval.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
        • tajo-storage/src/main/java/org/apache/tajo/storage/TupleComparator.java
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case8.sql
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case8.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/AggregationExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #220 (See https://builds.apache.org/job/Tajo-master-build/220/ ) TAJO-833 (babokim: rev 5dda14a9d3e2216c1c80ae2b3654a78b852df269) tajo-core/src/main/java/org/apache/tajo/engine/eval/FieldEval.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java tajo-storage/src/main/java/org/apache/tajo/storage/TupleComparator.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case8.sql tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case8.result tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/AggregationExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/11
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/11#issuecomment-43705298

        +1

        The patch looks good to me. I'll commit it shortly. Thanks.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/11#issuecomment-43705298 +1 The patch looks good to me. I'll commit it shortly. Thanks.
        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/12645581/TAJO-833.patch
        against master revision d0528d1.

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

        +1 tests included. The patch appears to include 3 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 194 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-core tajo-storage.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/428//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/428//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/428//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/12645581/TAJO-833.patch against master revision d0528d1. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 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 194 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-core tajo-storage. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/428//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/428//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/428//console This message is automatically generated.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user babokim opened a pull request:

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

        TAJO-833

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

        $ git pull https://github.com/babokim/tajo TAJO-833

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

        https://github.com/apache/tajo/pull/11.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 #11


        commit 5dda14a9d3e2216c1c80ae2b3654a78b852df269
        Author: 김형준 <babokim@babokim-macbook-pro.local>
        Date: 2014-05-19T15:47:45Z

        TAJO-833


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user babokim opened a pull request: https://github.com/apache/tajo/pull/11 TAJO-833 You can merge this pull request into a Git repository by running: $ git pull https://github.com/babokim/tajo TAJO-833 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/11.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 #11 commit 5dda14a9d3e2216c1c80ae2b3654a78b852df269 Author: 김형준 <babokim@babokim-macbook-pro.local> Date: 2014-05-19T15:47:45Z TAJO-833

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development