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

join queries with constant values can cause schema mismatch in logical plan

    Details

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

      Description

      The following query can cause a schema mismatch problem between join node and its both child scan nodes. The main cause that '##' col1 are evaluated in both ScanNode. Because a schema cannot include the same column names, one col1 is omitted. So, it causes the schema mismatch problem.

      select l_orderkey, '##' as col1 from lineitem join orders on l_orderkey = o_orderkey group by l_orderkey, col1
      

      This is a critical bug. So, I've uploaded the urgent workaround bug fix. Later, I'll fix it in more valid and stable manner. I already created the Jira issue (TAJO-895) for that way.

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Tajo-master-build #312 (See https://builds.apache.org/job/Tajo-master-build/312/)
          TAJO-914: join queries with constant values can cause schema mismatch in logical plan. (hyunsik: rev 326be451ded71099b88bdb6a50c40946df0af206)

          • tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case4.sql
          • tajo-core/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java
          • tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case2.result
          • tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case1.result
          • tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case4.result
          • tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case3.result
          • tajo-core/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java
          • CHANGES
          • tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case3.sql
          • tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case2.sql
          • tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case1.sql
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #312 (See https://builds.apache.org/job/Tajo-master-build/312/ ) TAJO-914 : join queries with constant values can cause schema mismatch in logical plan. (hyunsik: rev 326be451ded71099b88bdb6a50c40946df0af206) tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case4.sql tajo-core/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case2.result tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case1.result tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case4.result tajo-core/src/test/resources/results/TestCaseByCases/testTAJO914Case3.result tajo-core/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java CHANGES tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case3.sql tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case2.sql tajo-core/src/test/resources/queries/TestCaseByCases/testTAJO914Case1.sql
          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
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

          Github user blrunner commented on the pull request:

          https://github.com/apache/tajo/pull/78#issuecomment-49844639

          +1

          Thanks your contribution.
          It looks good overall, and 'mvn clean install' finished successfully.
          Push it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/78#issuecomment-49844639 +1 Thanks your contribution. It looks good overall, and 'mvn clean install' finished successfully. Push it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/78#issuecomment-49841162

          I've just rebased it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/78#issuecomment-49841162 I've just rebased it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user blrunner commented on the pull request:

          https://github.com/apache/tajo/pull/78#issuecomment-49824866

          You need to rebase the patch against master branch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/78#issuecomment-49824866 You need to rebase the patch against master branch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user hyunsik opened a pull request:

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

          TAJO-914: join queries with constant values can cause schema mismatch in logical plan

          This is a temporal solution, but it effectively fixes the critical problem.

          Its essential solution would be TAJO-895. Please see the detail at https://issues.apache.org/jira/browse/TAJO-914.

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

          $ git pull https://github.com/hyunsik/tajo TAJO-914

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

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


          commit 3f47df51d1868e59f2de2c6b29d5d38b2b5cb5f6
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2014-07-07T04:39:05Z

          TAJO-913: Add some missed tests for constant value group-by keys.

          commit 627967b2077dbd68a5401110b42ea04b4fddfeac
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2014-07-07T06:37:25Z

          Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-913

          commit 9ef919dd12407865e0e83599893ac06cdb90b51a
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2014-07-08T03:17:55Z

          TAJO-914: join queries with constant values can cause schema mismatch in logical plan.

          commit f016b57abd7ad265949c3bbb98d08fe8335738db
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2014-07-17T05:35:47Z

          Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-914

          Conflicts:
          tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
          tajo-core/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys2.sql
          tajo-core/src/test/resources/results/TestGroupByQuery/testGroupByWithConstantKeys2.result


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/78 TAJO-914 : join queries with constant values can cause schema mismatch in logical plan This is a temporal solution, but it effectively fixes the critical problem. Its essential solution would be TAJO-895 . Please see the detail at https://issues.apache.org/jira/browse/TAJO-914 . You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-914 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/78.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 #78 commit 3f47df51d1868e59f2de2c6b29d5d38b2b5cb5f6 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-07-07T04:39:05Z TAJO-913 : Add some missed tests for constant value group-by keys. commit 627967b2077dbd68a5401110b42ea04b4fddfeac Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-07-07T06:37:25Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-913 commit 9ef919dd12407865e0e83599893ac06cdb90b51a Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-07-08T03:17:55Z TAJO-914 : join queries with constant values can cause schema mismatch in logical plan. commit f016b57abd7ad265949c3bbb98d08fe8335738db Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-07-17T05:35:47Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-914 Conflicts: tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-core/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys2.sql tajo-core/src/test/resources/results/TestGroupByQuery/testGroupByWithConstantKeys2.result

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development