Hive
  1. Hive
  2. HIVE-2327

Optimize REGEX UDFs with constant parameter information

    Details

    • Type: Improvement Improvement
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: UDF
    • Labels:
      None

      Description

      There are a lot of UDFs which would show major performance differences if one assumes that some of its arguments are constant.

      Consider, for example, any UDF that takes a regular expression as input: This can be complied once (fast) if it's a constant, or once per row (wicked slow) if it's not a constant.

      Or, consider any UDF that reads from a file and/or takes a filename as input; it would have to re-read the whole file if the filename changes.

      1. HIVE-2327.01.patch
        17 kB
        Alexander Pivovarov

        Issue Links

          Activity

          Hide
          John Sichi added a comment -

          Is this different from HIVE-1360?

          Show
          John Sichi added a comment - Is this different from HIVE-1360 ?
          Hide
          Carl Steinbach added a comment -

          HIVE-1360 made it possible for UDFs to detect constant parameters, but it didn't update any of the regex UDFs to take advantage of this feature.

          Show
          Carl Steinbach added a comment - HIVE-1360 made it possible for UDFs to detect constant parameters, but it didn't update any of the regex UDFs to take advantage of this feature.
          Hide
          John Sichi added a comment -

          OK, then I guess this issue should be renamed?

          Show
          John Sichi added a comment - OK, then I guess this issue should be renamed?
          Hide
          Alexander Pivovarov added a comment -

          patch #01
          Refactor UDF to derive from GenericUDF which supports constant arguments

          Show
          Alexander Pivovarov added a comment - patch #01 Refactor UDF to derive from GenericUDF which supports constant arguments
          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/12709172/HIVE-2327.01.patch

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

          TestMinimrCliDriver-smb_mapjoin_8.q - did not produce a TEST-*.xml file
          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vectorization_short_regress
          org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vectorization_short_regress
          org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver_vectorization_short_regress
          

          Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3274/testReport
          Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3274/console
          Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-3274/

          Messages:

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

          This message is automatically generated.

          ATTACHMENT ID: 12709172 - PreCommit-HIVE-TRUNK-Build

          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/12709172/HIVE-2327.01.patch ERROR: -1 due to 4 failed/errored test(s), 8704 tests executed Failed tests: TestMinimrCliDriver-smb_mapjoin_8.q - did not produce a TEST-*.xml file org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vectorization_short_regress org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vectorization_short_regress org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver_vectorization_short_regress Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3274/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3274/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-3274/ Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 4 tests failed This message is automatically generated. ATTACHMENT ID: 12709172 - PreCommit-HIVE-TRUNK-Build

            People

            • Assignee:
              Alexander Pivovarov
              Reporter:
              Adam Kramer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development