Hive
  1. Hive
  2. HIVE-161

for list column x that is sometimes null, select x.y will cause a nullpointerexception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      HIVE-161. Fixed xpath x.y when x is a null list. (zshao)

      Activity

      Hide
      Ashish Thusoo added a comment -

      The problem seems to be in

      ExprNodeFieldEvaluator.java

      at line 96

      where we are doing list.size() and not checking if list is null before getting the size.

      Show
      Ashish Thusoo added a comment - The problem seems to be in ExprNodeFieldEvaluator.java at line 96 where we are doing list.size() and not checking if list is null before getting the size.
      Hide
      Zheng Shao added a comment -

      I've got the code fixed but it's hard to generate a testcase since only thrift serde will generate NULL list for now.
      I am thinking about implementing the CASE statement first.

      Show
      Zheng Shao added a comment - I've got the code fixed but it's hard to generate a testcase since only thrift serde will generate NULL list for now. I am thinking about implementing the CASE statement first.
      Hide
      Jeff Hammerbacher added a comment -

      Adding to "Query Processor" component.

      Show
      Jeff Hammerbacher added a comment - Adding to "Query Processor" component.
      Hide
      Zheng Shao added a comment -

      Modified complex.seq to include the case that the list is null.

      Show
      Zheng Shao added a comment - Modified complex.seq to include the case that the list is null.
      Hide
      Prasad Chakka added a comment -

      looks ok to me. +1

      Show
      Prasad Chakka added a comment - looks ok to me. +1
      Hide
      Zheng Shao added a comment -

      Committed revision 732571.

      Show
      Zheng Shao added a comment - Committed revision 732571.

        People

        • Assignee:
          Zheng Shao
          Reporter:
          Venky Iyer
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development