Github user chenghao-intel commented on the pull request:

    https://github.com/apache/spark/pull/482#issuecomment-41752725
  
    @marmbrus I am wondering the previously implementation(by change the 
nullability states from 2 to 3) perhaps more convenient in some way.
    * Constant Folding rule is quite simple as "case e if e.nullable == 
alwaysNull => Literal(null, e.dataType)"
    * We may not able to enumerate the extended expression (HiveGenericUdf for 
example) in catalyst.
    * Nullability is a very helpful hint in the expression codegen:
    
    Nullability   | eval code | expression null indicator variable | expression 
variable
    ------------- | ------------- | --------------- | ---------------
    Possibly be null  | Yes | Yes | Yes
    Always be null  | No | Yes | No
    Never be null  | Yes | No | Yes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to