opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
121 stars 140 forks source link

Fix FilterOperator to cache next element and avoid repeated consumption on hasNext() calls #3123

Open penghuo opened 3 weeks ago

penghuo commented 3 weeks ago

Description

This PR addresses a bug in FilterOperator where repeated calls to hasNext() would incorrectly consume input elements. The change includes

Related Issues

https://github.com/opensearch-project/sql/issues/3121

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.