[ https://issues.apache.org/jira/browse/HIVE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899855#action_12899855 ]
Wojciech Langiewicz commented on HIVE-1553: ------------------------------------------- It also happens on columns that are not allowed to be NULL (and are not), so https://issues.apache.org/jira/browse/HIVE-1011 probably won't fix this. > NPE when using complex string UDF > --------------------------------- > > Key: HIVE-1553 > URL: https://issues.apache.org/jira/browse/HIVE-1553 > Project: Hadoop Hive > Issue Type: Bug > Components: UDF > Affects Versions: 0.5.0 > Environment: CDH3B2 version on debian > Reporter: Wojciech Langiewicz > > When executing this query: {code}select explode(split(city, "")) as char from > users;{code} I get NPE: {code}java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.udf.generic.GenericUDTFExplode.process(GenericUDTFExplode.java:70) > at > org.apache.hadoop.hive.ql.exec.UDTFOperator.processOp(UDTFOperator.java:98) > at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:386) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:598) > at > org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:81) > at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:386) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:598) > at > org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:43) > at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:386) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:598) > at > org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:347) > at org.apache.hadoop.hive.ql.exec.ExecMapper.map(ExecMapper.java:171) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307) > at org.apache.hadoop.mapred.Child.main(Child.java:170){code} > But in case of this query:{code}select explode(split(city, "")) as char from > users where id = 234234;{code} NPE does not occur, but in case of this query: > {code}select explode(split(city, "")) as char from users where id > 0;{code} > Some mappers succed, but most of them fails, so whole task fails. > city is a string column and maximum users.id is about 30M. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.