Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14117#discussion_r70169236
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala
 ---
    @@ -65,6 +65,11 @@ private[sql] case class InMemoryTableScanExec(
         case EqualTo(l: Literal, a: AttributeReference) =>
           statsFor(a).lowerBound <= l && l <= statsFor(a).upperBound
     
    +    case EqualNullSafe(a: AttributeReference, l: Literal) if !l.nullable =>
    +      statsFor(a).lowerBound <= l && l <= statsFor(a).upperBound
    +    case EqualNullSafe(l: Literal, a: AttributeReference) if !l.nullable =>
    --- End diff --
    
    Ah, actually it seems okay because when `Literal` is `null`, it seems the 
filter is failed to resolved as the `Literal` type is `NullType` and then not 
applied for filtering here. And when the statistics for `upperBound` and 
`lowerBound` are `null`, it also seems okay because it seems the generated 
predicate deals with nullability.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to