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

Zheng Shao commented on HIVE-594:
---------------------------------

Without this, we could not do complete object reuse.

For example, if all columns in the first row are non-null, we need to create 
objects for each of the column.
Then the second row comes in and all columns are null, so we have to set all 
fields in the row object to "null".
Then the third row comes in and all columns are non-null, we need to create new 
objects again.

LazySimpleSerDe has a hack to avoid this by adding a special function 
"getObject()".

With "isNull" added to ObjectInspector, we don't need to set the field in the 
row object to null, instead, we can set a bit inside the field object so that 
it knows it is a null.


We will need to replace the logic "xxx == null" and "xxx != null" in the code 
(Mainly, GenericUDFOPNull and GeneircUDFOPNonNull).


> Add "isNull", "hashCode", "equals", "compareTo" to ObjectInspector
> ------------------------------------------------------------------
>
>                 Key: HIVE-594
>                 URL: https://issues.apache.org/jira/browse/HIVE-594
>             Project: Hadoop Hive
>          Issue Type: Improvement
>    Affects Versions: 0.3.0, 0.3.1
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>
> ObjectInspector should delegate all methods of the object, including 
> "isNull", "hashCode", "equals", "compareTo".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to