rubenada commented on code in PR #5275:
URL: https://github.com/apache/calcite/pull/5275#discussion_r4376528716
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -4719,12 +4748,11 @@ private static void purgeForBypassFields(SqlNode node,
SqlValidatorScope scope,
.collect(Collectors.toList());
sameIdentifier.forEach(qualifieds::remove);
- // Clear all the remnant must-filter qualifieds from the same table
identifier
- Collection<SqlQualified> sameIdentifier_ =
- remnantMustFilterFields.stream()
- .filter(q -> qualifiedMatchesIdentifier(q, qualified))
- .collect(Collectors.toList());
- sameIdentifier_.forEach(remnantMustFilterFields::remove);
+ // Clear the remnant must-filter qualifieds imported through the
+ // same FROM item (namespace) as the filtered bypass field
+ if (qualified.namespace != null) {
Review Comment:
I think I got your point, I tried to addressed this potential issue
introducing the notion of "Group" in FilterRequirement.
--
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]