Sevenannn commented on code in PR #13422:
URL: https://github.com/apache/datafusion/pull/13422#discussion_r1843029856
##########
datafusion/sql/src/unparser/utils.rs:
##########
@@ -318,7 +318,9 @@ pub(crate) fn
try_transform_to_simple_table_scan_with_filters(
plan_stack.push(alias.input.as_ref());
}
LogicalPlan::Filter(filter) => {
- filters.push(filter.predicate.clone());
+ if !filters.contains(&filter.predicate) {
Review Comment:
Another thing I could do is maintain a temporary Hashset to keep track of
the exsiting filters, while the results is still constructed with the Vector.
Every filter will be checked if it exists with Hashset before pushing to the
Vector. Would this approach be better than just using Vector.contains?
--
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]