Hive
  1. Hive
  2. HIVE-5763

ExprNodeGenericFuncDesc.toString() generating unbalanced parenthesises

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      This makes the generated expression tree unreadable.

        public String toString() {
          StringBuilder sb = new StringBuilder();
          sb.append(genericUDF.getClass().toString());
          sb.append("(");
          for (int i = 0; i < chidren.size(); i++) {
            if (i > 0) {
              sb.append(", ");
            }
            sb.append(chidren.get(i).toString());
          }
          sb.append("("); -- This needs to be removed.
          sb.append(")");
          return sb.toString();
        }
      
      1. HIVE-5763.patch
        0.5 kB
        Xuefu Zhang
      2. HIVE-5763.2.patch
        21 kB
        Xuefu Zhang
      3. HIVE-5763.1.patch
        21 kB
        Xuefu Zhang

        Activity

        Xuefu Zhang created issue -
        Xuefu Zhang made changes -
        Field Original Value New Value
        Description This makes the generated expression tree unreadable. This makes the generated expression tree unreadable.
        {code}
          public String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append(genericUDF.getClass().toString());
            sb.append("(");
            for (int i = 0; i < chidren.size(); i++) {
              if (i > 0) {
                sb.append(", ");
              }
              sb.append(chidren.get(i).toString());
            }
            sb.append("("); -- This needs to be removed.
            sb.append(")");
            return sb.toString();
          }
        {code}
        Xuefu Zhang made changes -
        Assignee Xuefu Zhang [ xuefuz ]
        Hide
        Xuefu Zhang added a comment -

        Patch fixed the issue. I don't think this requires a test case, or a review board item.

        Show
        Xuefu Zhang added a comment - Patch fixed the issue. I don't think this requires a test case, or a review board item.
        Xuefu Zhang made changes -
        Attachment HIVE-5763.patch [ 12612443 ]
        Xuefu Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hive QA added a comment -

        Overall: -1 at least one tests failed

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12612443/HIVE-5763.patch

        ERROR: -1 due to 7 failed/errored test(s), 4577 tests executed
        Failed tests:

        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join13
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join2
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_sortmerge_join_6
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_bucketmapjoin_negative3
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_join_map_ppr
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_skewjoin
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_smb_mapjoin_13
        

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/163/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/163/console

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        Tests failed with: TestsFailedException: 7 tests failed
        

        This message is automatically generated.

        ATTACHMENT ID: 12612443

        Show
        Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12612443/HIVE-5763.patch ERROR: -1 due to 7 failed/errored test(s), 4577 tests executed Failed tests: org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join13 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join2 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_sortmerge_join_6 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_bucketmapjoin_negative3 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_join_map_ppr org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_skewjoin org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_smb_mapjoin_13 Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/163/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/163/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests failed with: TestsFailedException: 7 tests failed This message is automatically generated. ATTACHMENT ID: 12612443
        Hide
        Xuefu Zhang added a comment -

        Patch #1 rebased with latest trunk.

        Show
        Xuefu Zhang added a comment - Patch #1 rebased with latest trunk.
        Xuefu Zhang made changes -
        Attachment HIVE-5763.1.patch [ 12612622 ]
        Hide
        Sergey Shelukhin added a comment -

        lgtm assuming tests pass

        Show
        Sergey Shelukhin added a comment - lgtm assuming tests pass
        Hide
        Ashutosh Chauhan added a comment -

        +1

        Show
        Ashutosh Chauhan added a comment - +1
        Hide
        Ashutosh Chauhan added a comment -

        Patch needs to be re-uploaded for Hive QA

        Show
        Ashutosh Chauhan added a comment - Patch needs to be re-uploaded for Hive QA
        Ashutosh Chauhan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        Xuefu Zhang added a comment -

        Patch #2 rebased with latest trunk.

        Show
        Xuefu Zhang added a comment - Patch #2 rebased with latest trunk.
        Xuefu Zhang made changes -
        Attachment HIVE-5763.2.patch [ 12615470 ]
        Xuefu Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.12.0 [ 12324312 ]
        Hide
        Hive QA added a comment -

        Overall: +1 all checks pass

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12615470/HIVE-5763.2.patch

        SUCCESS: +1 4684 tests passed

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/421/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/421/console

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        

        This message is automatically generated.

        ATTACHMENT ID: 12615470

        Show
        Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12615470/HIVE-5763.2.patch SUCCESS: +1 4684 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/421/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/421/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12615470
        Hide
        Xuefu Zhang added a comment -

        Patch committed to trunk. Thank Ashutosh for the review.

        Show
        Xuefu Zhang added a comment - Patch committed to trunk. Thank Ashutosh for the review.
        Xuefu Zhang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.13.0 [ 12324986 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        2d 19h 9m 1 Ashutosh Chauhan 09/Nov/13 16:40
        Open Open Patch Available Patch Available
        14d 5h 2 Xuefu Zhang 23/Nov/13 19:29
        Patch Available Patch Available Resolved Resolved
        2h 45m 1 Xuefu Zhang 23/Nov/13 22:15

          People

          • Assignee:
            Xuefu Zhang
            Reporter:
            Xuefu Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development