Copilot commented on code in PR #12793:
URL: https://github.com/apache/gluten/pull/12793#discussion_r3796825830
##########
cpp/velox/operators/functions/SparkExprToSubfieldFilterParser.cc:
##########
@@ -93,6 +166,42 @@ SparkExprToSubfieldFilterParser::leafCallToSubfieldFilter(
}
return std::make_pair(std::move(subfield),
facebook::velox::exec::isNotNull());
}
+ } else if (scanBloomFilterPushdownEnabled_ && call.name() == "might_contain"
&& !negated) {
+ // Matches: might_contain(bloomFilter, xxhash64_with_seed(seed, field)).
+ GLUTEN_CHECK(
+ call.inputs().size() == 2,
+ "might_contain expects 2 arguments: bloomFilter and
xxhash64_with_seed(seed, field)");
+ const auto* hashCall = dynamic_cast<const
core::CallTypedExpr*>(call.inputs()[1].get());
+ if (hashCall && hashCall->name() == "xxhash64_with_seed") {
+ GLUTEN_CHECK(hashCall->inputs().size() == 2, "xxhash64_with_seed expects
2 arguments");
Review Comment:
Using `GLUTEN_CHECK` here turns an unsupported/variant Spark expression
shape into a hard query failure, instead of simply not pushing down the filter.
Since this is a best-effort pushdown path, replace these checks with defensive
conditionals that `return std::nullopt` (optionally with VLOG) when the
argument counts/shapes don’t match.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]