ahshahid commented on code in PR #16570:
URL: https://github.com/apache/iceberg/pull/16570#discussion_r3384474303
##########
spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestFilterPushDown.java:
##########
@@ -674,9 +706,20 @@ private void checkFilters(
assertThat(planAsString).as("Should be no post scan
filter").doesNotContain("Filter (");
}
- assertThat(planAsString)
- .as("Pushed filters must match")
- .contains(", filters=" + icebergFilters + ",");
+ int startIndex = planAsString.indexOf("filters=");
+ int endIndex = planAsString.indexOf("runtimeFilters");
+ String filterStringFromPlan = planAsString.substring(startIndex, endIndex);
+ Arrays.stream(icebergFilters)
+ .forEach(
+ filter -> {
+ assertThat(filterStringFromPlan).as("Pushed filters must
contain").contains(filter);
Review Comment:
actually, come to think of it, as I am keeping ordered check only for
hashCode and equals, with explain retaining the same old behaviour, I suppose
the tests can remain unchanged in that case.. I do not have to parse the filter
string.
--
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]