hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dere (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-6704) date_add()/date_sub()/datediff() fail with NPE with null input
Date Thu, 20 Mar 2014 02:45:43 GMT

    [ https://issues.apache.org/jira/browse/HIVE-6704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941333#comment-13941333
] 

Jason Dere commented on HIVE-6704:
----------------------------------

RB at https://reviews.apache.org/r/19447/
Also this patch adds support for char/varchar argument types.

> date_add()/date_sub()/datediff() fail with NPE with null input
> --------------------------------------------------------------
>
>                 Key: HIVE-6704
>                 URL: https://issues.apache.org/jira/browse/HIVE-6704
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Jason Dere
>            Assignee: Jason Dere
>         Attachments: HIVE-6704.1.patch
>
>
> Similar to HIVE-6645, the following functions also get NPE error if the input is null:
> date_add
> date_sub
> datediff
> {noformat}
> Diagnostic Messages for this Task:
> Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException:
Hive Runtime Error while processing row {"t":null,"si":null,"i":null,"b":null,"f":null,"d":null,"dc":null,"bo":null,"s":null,"s2":null,"ts":null,"ts2":null,"dt":null}
> 	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:195)
> 	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
> 	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
> 	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
> 	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:415)
> 	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
> 	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while
processing row {"t":null,"si":null,"i":null,"b":null,"f":null,"d":null,"dc":null,"bo":null,"s":null,"s2":null,"ts":null,"ts2":null,"dt":null}
> 	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:534)
> 	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:177)
> 	... 8 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Error evaluating date_add(ts,
2)
> 	at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:84)
> 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:791)
> 	at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:92)
> 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:791)
> 	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:524)
> 	... 9 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateAdd.evaluate(GenericUDFDateAdd.java:144)
> 	at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:166)
> 	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.SelectOperator.processOp(SelectOperator.java:79)
> 	... 13 more
> FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message