Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-1126

Join condition including functions throws IllegalArgumentException.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • None
    • None

    Description

      MergeJoin with function eval throws the following IllegalArgumentException.

      select
        n1.n_nationkey,
        n1.n_name,
        n2.n_name
      from nation n1 join (select * from nation union select * from nation) n2 on substr(n1.n_name, 1, 4) = substr(n2.n_name, 1, 4)
      order by n1.n_nationkey;
      
      java.lang.IllegalArgumentException: At least one sort key must be specified
      	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
      	at org.apache.tajo.engine.planner.logical.SortNode.setSortSpecs(SortNode.java:35)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createMergeInnerJoin(PhysicalPlannerImpl.java:443)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestInnerJoinPlan(PhysicalPlannerImpl.java:433)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createInnerJoinPlan(PhysicalPlannerImpl.java:377)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createJoinPlan(PhysicalPlannerImpl.java:292)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:218)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:207)
      	at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:90)
      	at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:40)
      	at org.apache.tajo.worker.Task.run(Task.java:442)
      	at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:276)
      	at java.lang.Thread.run(Thread.java:744)
      

      The above query is from TestJoinQuery.testComplexJoinCondition7() test case. Currently TestJoinQuery runs with a parameterized option, but the parameter is not transmitted to UnitRequestImpl. So all test case run with HashJoin parameter. For this reason the above error is not detected. We should also fix the test case bug.

      Attachments

        Activity

          People

            hyunsik Hyunsik Choi
            hjkim Hyoungjun Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: