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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
      zshao Zheng Shao added a comment -

      Committed revision 732571.

      Show
      zshao Zheng Shao added a comment - Committed revision 732571.
      Hide
      prasadc Prasad Chakka added a comment -

      looks ok to me. +1

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

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

      Show
      zshao Zheng Shao added a comment - Modified complex.seq to include the case that the list is null.
      Hide
      hammer Jeff Hammerbacher added a comment -

      Adding to "Query Processor" component.

      Show
      hammer Jeff Hammerbacher added a comment - Adding to "Query Processor" component.
      Hide
      zshao 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
      zshao 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
      athusoo 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
      athusoo 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.

        People

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

          Dates

          • Created:
            Updated:
            Resolved:

            Development