Hive
  1. Hive
  2. HIVE-5829

Rewrite Trim and Pad UDFs based on GenericUDF

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: UDF
    • Labels:
      None

      Description

      This JIRA includes following UDFs:
      1. trim()
      2. ltrim()
      3. rtrim()
      4. lpad()
      5. rpad()

      1. HIVE-5829.1.patch
        50 kB
        Mohammad Kamrul Islam
      2. tmp.HIVE-5829.patch
        50 kB
        Mohammad Kamrul Islam
      3. HIVE-5829.2.patch
        51 kB
        Mohammad Kamrul Islam
      4. HIVE-5829.3.patch
        51 kB
        Mohammad Kamrul Islam
      5. HIVE-5829.4.patch
        51 kB
        Mohammad Kamrul Islam

        Activity

        Hide
        Carl Steinbach added a comment -

        Committed to trunk. Thanks Mohammad!

        Show
        Carl Steinbach added a comment - Committed to trunk. Thanks Mohammad!
        Hide
        Hive QA added a comment -

        Overall: -1 no tests executed

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

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

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Tests exited with: NonZeroExitCodeException
        Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]]
        + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
        + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
        + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
        + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
        + cd /data/hive-ptest/working/
        + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-821/source-prep.txt
        + [[ false == \t\r\u\e ]]
        + mkdir -p maven ivy
        + [[ svn = \s\v\n ]]
        + [[ -n '' ]]
        + [[ -d apache-svn-trunk-source ]]
        + [[ ! -d apache-svn-trunk-source/.svn ]]
        + [[ ! -d apache-svn-trunk-source ]]
        + cd apache-svn-trunk-source
        + svn revert -R .
        Reverted 'service/src/java/org/apache/hive/service/cli/HiveSQLException.java'
        ++ egrep -v '^X|^Performing status on external'
        ++ awk '{print $2}'
        ++ svn status --no-ignore
        + rm -rf target datanucleus.log ant/target shims/target shims/0.20/target shims/0.20S/target shims/0.23/target shims/aggregator/target shims/common/target shims/common-secure/target packaging/target hbase-handler/target testutils/target jdbc/target metastore/target itests/target itests/hcatalog-unit/target itests/test-serde/target itests/qtest/target itests/hive-unit/target itests/custom-serde/target itests/util/target hcatalog/target hcatalog/storage-handlers/hbase/target hcatalog/server-extensions/target hcatalog/core/target hcatalog/webhcat/svr/target hcatalog/webhcat/java-client/target hcatalog/hcatalog-pig-adapter/target hwi/target common/target common/src/gen service/target contrib/target serde/target beeline/target odbc/target cli/target ql/dependency-reduced-pom.xml ql/target
        + svn update
        
        Fetching external item into 'hcatalog/src/test/e2e/harness'
        External at revision 1556208.
        
        At revision 1556208.
        + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
        + patchFilePath=/data/hive-ptest/working/scratch/build.patch
        + [[ -f /data/hive-ptest/working/scratch/build.patch ]]
        + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
        + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch
        The patch does not appear to apply with p0, p1, or p2
        + exit 1
        '
        

        This message is automatically generated.

        ATTACHMENT ID: 12621742

        Show
        Hive QA added a comment - Overall : -1 no tests executed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12621742/HIVE-5829.4.patch Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/821/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/821/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Tests exited with: NonZeroExitCodeException Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]] + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m ' + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m ' + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + cd /data/hive-ptest/working/ + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-821/source-prep.txt + [[ false == \t\r\u\e ]] + mkdir -p maven ivy + [[ svn = \s\v\n ]] + [[ -n '' ]] + [[ -d apache-svn-trunk-source ]] + [[ ! -d apache-svn-trunk-source/.svn ]] + [[ ! -d apache-svn-trunk-source ]] + cd apache-svn-trunk-source + svn revert -R . Reverted 'service/src/java/org/apache/hive/service/cli/HiveSQLException.java' ++ egrep -v '^X|^Performing status on external' ++ awk '{print $2}' ++ svn status --no-ignore + rm -rf target datanucleus.log ant/target shims/target shims/0.20/target shims/0.20S/target shims/0.23/target shims/aggregator/target shims/common/target shims/common-secure/target packaging/target hbase-handler/target testutils/target jdbc/target metastore/target itests/target itests/hcatalog-unit/target itests/test-serde/target itests/qtest/target itests/hive-unit/target itests/custom-serde/target itests/util/target hcatalog/target hcatalog/storage-handlers/hbase/target hcatalog/server-extensions/target hcatalog/core/target hcatalog/webhcat/svr/target hcatalog/webhcat/java-client/target hcatalog/hcatalog-pig-adapter/target hwi/target common/target common/src/gen service/target contrib/target serde/target beeline/target odbc/target cli/target ql/dependency-reduced-pom.xml ql/target + svn update Fetching external item into 'hcatalog/src/test/e2e/harness' External at revision 1556208. At revision 1556208. + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh + patchFilePath=/data/hive-ptest/working/scratch/build.patch + [[ -f /data/hive-ptest/working/scratch/build.patch ]] + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch The patch does not appear to apply with p0, p1, or p2 + exit 1 ' This message is automatically generated. ATTACHMENT ID: 12621742
        Hide
        Carl Steinbach added a comment -

        +1

        Show
        Carl Steinbach added a comment - +1
        Hide
        Mohammad Kamrul Islam added a comment -

        reviewer's comments addressed.

        Show
        Mohammad Kamrul Islam added a comment - reviewer's comments addressed.
        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/12619469/HIVE-5829.3.patch

        SUCCESS: +1 4799 tests passed

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/699/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/699/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: 12619469

        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/12619469/HIVE-5829.3.patch SUCCESS: +1 4799 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/699/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/699/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: 12619469
        Hide
        Xuefu Zhang added a comment -

        Mohammad Kamrul Islam Thanks for your work. Patch looks good. I have a few items on the review board.

        Show
        Xuefu Zhang added a comment - Mohammad Kamrul Islam Thanks for your work. Patch looks good. I have a few items on the review board.
        Hide
        Mohammad Kamrul Islam added a comment -

        Includes Carl's comments of moving the Test* file to correct location.

        Show
        Mohammad Kamrul Islam added a comment - Includes Carl's comments of moving the Test* file to correct location.
        Hide
        Eric Hanson added a comment -

        Looks good to me from the point of view of vectorization – trim/ltrim/rtrim still vectorize.

        Show
        Eric Hanson added a comment - Looks good to me from the point of view of vectorization – trim/ltrim/rtrim still vectorize.
        Hide
        Carl Steinbach added a comment -

        Mohammad Kamrul Islam I noted one small issue on RB related to the package names of the new tests. Other than that I think the patch is ready to commit.

        Show
        Carl Steinbach added a comment - Mohammad Kamrul Islam I noted one small issue on RB related to the package names of the new tests. Other than that I think the patch is ready to commit.
        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/12619002/HIVE-5829.2.patch

        SUCCESS: +1 4794 tests passed

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/663/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/663/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: 12619002

        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/12619002/HIVE-5829.2.patch SUCCESS: +1 4794 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/663/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/663/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: 12619002
        Hide
        Mohammad Kamrul Islam added a comment -

        Addressed the failed test case and rebased with latest code base.

        Show
        Mohammad Kamrul Islam added a comment - Addressed the failed test case and rebased with latest code base.
        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/12614483/HIVE-5829.1.patch

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

        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_dynamic_partition_skip_default
        

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/349/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/349/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: 1 tests failed
        

        This message is automatically generated.

        ATTACHMENT ID: 12614483

        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/12614483/HIVE-5829.1.patch ERROR: -1 due to 1 failed/errored test(s), 4622 tests executed Failed tests: org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_dynamic_partition_skip_default Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/349/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/349/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: 1 tests failed This message is automatically generated. ATTACHMENT ID: 12614483
        Hide
        Mohammad Kamrul Islam added a comment -
        Show
        Mohammad Kamrul Islam added a comment - Also updated to RB: https://reviews.apache.org/r/15654/

          People

          • Assignee:
            Mohammad Kamrul Islam
            Reporter:
            Mohammad Kamrul Islam
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development