danny0405 commented on code in PR #19646:
URL: https://github.com/apache/hudi/pull/19646#discussion_r3800448297
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/DataSkippingUtils.scala:
##########
@@ -160,11 +160,12 @@ object DataSkippingUtils extends Logging {
Option.empty
})
- // Filter "colA = null"
- // Translates to "colA_nullCount = null" for index lookup
- case EqualNullSafe(attrRef: AttributeReference, litNull @ Literal(null,
_)) =>
+ // Filter "colA <=> null"
+ // Translates to "colA_nullCount = null or colA_nullCount > 0" for index
lookup
+ // (this is equivalent to "colA is null")
+ case EqualNullSafe(attrRef: AttributeReference, Literal(null, _)) =>
getTargetIndexedColumnName(attrRef, indexedCols)
- .map(colName => EqualTo(genColNumNullsExpr(colName), litNull))
+ .map(colName => genColumnIsNullExpression(colName))
Review Comment:
nice catch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]