Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13189

Consider using Joda DateTimeFormatter instead of SimpleDateFormat in GenericUDFDateAdd

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Hive
    • None

    Description

      Quite an amount was spent by tasks in trying to parse date string in GenericUDFDateAdd.

        java.lang.Thread.State: RUNNABLE
              at java.text.DecimalFormat.subparse(DecimalFormat.java:1467)
              at java.text.DecimalFormat.parse(DecimalFormat.java:1268)
              at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:2088)
              at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1455)
              at java.text.DateFormat.parse(DateFormat.java:355)
              at org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateAdd.evaluate(GenericUDFDateAdd.java:172)
              at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:186)
              at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:77)
              at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator$DeferredExprObject.get(ExprNodeGenericFuncEvaluator.java:87)
              at org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPGreaterThan.evaluate(GenericUDFOPGreaterThan.java:80)
              at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:186)
              at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:77)
              at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:65)
              at org.apache.hadoop.hive.ql.exec.FilterOperator.process(FilterOperator.java:108)
              at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:838)
              at org.apache.hadoop.hive.ql.exec.CommonJoinOperator.internalForward(CommonJoinOperator.java:644)
      

      Joda DateTimeFormatter can be considered for better performance.

      Attachments

        1. HIVE-13189.1.patch
          18 kB
          Rajesh Balamohan

        Activity

          People

            varunk44 varun a kumar
            rajesh.balamohan Rajesh Balamohan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: