Ted-Jiang opened a new pull request, #2156:
URL: https://github.com/apache/arrow-datafusion/pull/2156
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Closes #2093.
# Rationale for this change
Optimized of In_List clause, when all filter values of In clause are static.
Default list values use `Vec` to store, it has time complexity O(n) to
check `contains`, In some situation use `Set` it has complexity O(1)
test sql:
```select count(*) from orders where o_orderkey in (2785313,
2785314,
2785315,
2785316,
''' (1000 elements)
2786311);
```
Master branch:
```
2786309,
2786310,
2786311);
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 255 |
+-----------------+
1 row in set. Query took 4.713 seconds.
```
This pr:
```
2786309,
2786310,
2786311);
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 255 |
+-----------------+
1 row in set. Query took 0.566 seconds.
```
# What changes are included in this PR?
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
--
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]