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

limit clause does not work properly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Planner/Optimizer
    • Labels:
      None

      Description

      The schema does not match.

      Query: select l_returnflag from lineitem_100 limit 10
       
      Distributed Query Plan
      
      -------------------------------------------------------------------------------
      Execution Block Graph (TERMINAL - eb_1386296972441_0012_000003)
      -------------------------------------------------------------------------------
      |-eb_1386296972441_0012_000003
         |-eb_1386296972441_0012_000002
            |-eb_1386296972441_0012_000001
      -------------------------------------------------------------------------------
      
      =======================================================
      Block Id: eb_1386296972441_0012_000001 [LEAF]
      =======================================================
      
      [Outgoing]
      [q_1386296972441_0012] 1 => 2 (type=HASH_PARTITION, key=, num=1)
      
      Limit (10)
        "out schema: {lineitem_100.l_returnflag (TEXT(0))}
        "in schema: {lineitem_100.l_returnflag (TEXT(0))}
      "Scan" : {"table":"lineitem_100", "target list": lineitem_100.l_returnflag (TEXT(0)),
        "out schema": {lineitem_100.l_returnflag (TEXT(0))}
        "in schema": {lineitem_100.l_orderkey (INT8(0)),lineitem_100.l_partkey (INT8(0)),lineitem_100.l_suppkey (INT8(0)),lineitem_100.l_linenumber (INT8(0)),lineitem_100.l_quantity (FLOAT8(0)),lineitem_100.l_extendedprice (FLOAT8(0)),lineitem_100.l_discount (FLOAT8(0)),lineitem_100.l_tax (FLOAT8(0)),lineitem_100.l_returnflag (TEXT(0)),lineitem_100.l_linestatus (TEXT(0)),lineitem_100.l_shipdate (TEXT(0)),lineitem_100.l_commitdate (TEXT(0)),lineitem_100.l_receiptdate (TEXT(0)),lineitem_100.l_shipinstruct (TEXT(0)),lineitem_100.l_shipmode (TEXT(0)),lineitem_100.l_comment (TEXT(0))}
      =======================================================
      Block Id: eb_1386296972441_0012_000002 [ROOT]
      =======================================================
      
      [Incoming]
      [q_1386296972441_0012] 1 => 2 (type=HASH_PARTITION, key=, num=1)
      
      [Outgoing]
      
      "Projection": {"targets": ["lineitem_100.l_returnflag (TEXT(0))"],
        "out schema": {lineitem_100.l_returnflag (TEXT(0))},
        "in schema": {lineitem_100.l_returnflag (TEXT(0))}}
      Limit (10)
        "out schema: {lineitem_100.l_returnflag (TEXT(0))}
        "in schema: {lineitem_100.l_returnflag (TEXT(0))}
      "Scan" : {"table":"lineitem_100", "target list": lineitem_100.l_returnflag (TEXT(0)),
        "out schema": {lineitem_100.l_returnflag (TEXT(0))}
        "in schema": {lineitem_100.l_orderkey (INT8(0)),lineitem_100.l_partkey (INT8(0)),lineitem_100.l_suppkey (INT8(0)),lineitem_100.l_linenumber (INT8(0)),lineitem_100.l_quantity (FLOAT8(0)),lineitem_100.l_extendedprice (FLOAT8(0)),lineitem_100.l_discount (FLOAT8(0)),lineitem_100.l_tax (FLOAT8(0)),lineitem_100.l_returnflag (TEXT(0)),lineitem_100.l_linestatus (TEXT(0)),lineitem_100.l_shipdate (TEXT(0)),lineitem_100.l_commitdate (TEXT(0)),lineitem_100.l_receiptdate (TEXT(0)),lineitem_100.l_shipinstruct (TEXT(0)),lineitem_100.l_shipmode (TEXT(0)),lineitem_100.l_comment (TEXT(0))}
      =======================================================
      Block Id: eb_1386296972441_0012_000003 [TERMINAL]
      =======================================================
      
      1. TAJO-388_2.patch
        12 kB
        Hyunsik Choi
      2. TAJO-388.patch
        39 kB
        Hyunsik Choi

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        This is a bug of GlobalPlanner. It's main cause is to set an wrong input schema to a scanner of an execution block. I fixed this bug. I added an unit test to reproduce this problem, and verified 'mvn clean install'.

        Thank you for your bug report.

        Show
        hyunsik Hyunsik Choi added a comment - This is a bug of GlobalPlanner. It's main cause is to set an wrong input schema to a scanner of an execution block. I fixed this bug. I added an unit test to reproduce this problem, and verified 'mvn clean install'. Thank you for your bug report.
        Hide
        hyunsik Hyunsik Choi added a comment -

        The previous patch gone stale. I uploaded the update patch.

        Show
        hyunsik Hyunsik Choi added a comment - The previous patch gone stale. I uploaded the update patch.
        Hide
        jhkim Jinho Kim added a comment -

        +1
        Thank you!! I've verified this on cluster.

        Show
        jhkim Jinho Kim added a comment - +1 Thank you!! I've verified this on cluster.
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed this patch to master. Thank you for the review.

        Show
        hyunsik Hyunsik Choi added a comment - committed this patch to master. Thank you for the review.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-trunk-postcommit #592 (See https://builds.apache.org/job/Tajo-trunk-postcommit/592/)
        TAJO-388: limit clause does not work properly. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=469c5a2437ded40da5675d2e87c7115583cd1b67)

        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/global/ExecutionBlock.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/LogicalNode.java
        • CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-trunk-postcommit #592 (See https://builds.apache.org/job/Tajo-trunk-postcommit/592/ ) TAJO-388 : limit clause does not work properly. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=469c5a2437ded40da5675d2e87c7115583cd1b67 ) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/global/ExecutionBlock.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/LogicalNode.java CHANGES.txt

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            jhkim Jinho Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development