alexeykudinkin commented on code in PR #5224:
URL: https://github.com/apache/hudi/pull/5224#discussion_r843030033
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/DataSkippingUtils.scala:
##########
@@ -211,10 +211,10 @@ object DataSkippingUtils extends Logging {
.map(colName => GreaterThan(genColNumNullsExpr(colName), Literal(0)))
// Filter "colA is not null"
- // Translates to "colA_nullCount = 0" for index lookup
+ // Translates to "colA_nullCount < colA_valueCount" for index lookup
case IsNotNull(attribute: AttributeReference) =>
getTargetIndexedColumnName(attribute, indexSchema)
- .map(colName => EqualTo(genColNumNullsExpr(colName), Literal(0)))
+ .map(colName => LessThan(genColNumNullsExpr(colName),
genColValueCountExpr))
Review Comment:
Ha! Great question.
The reason is logical fallacy: "colA is not null" != "there is no null in
colA", instead it's "colA contains non-null" (you can check out some other
expressions, there are many expressions in this list that carry such
properties):
- "is null" means that the column has to contain null values (ie
`nullCount` > 0)
- "is not null" means that the column has to contain non-null values (ie
`nullCount` < `valueCount`)
--
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]