opensearch-project / opensearch-spark

Spark Accelerator framework ; It enables secondary indices to remote data stores.
Apache License 2.0
22 stars 33 forks source link

Support parenthesized expression in filter #888

Closed LantaoJin closed 1 week ago

LantaoJin commented 1 week ago

Description

Parenthesized expression cannot work as expected in filter: source = $testTable | where (country = 'Canada' or age > 60) and age < 25 | fields name, age, country failed in parser.

Related Issues

Resolves https://github.com/opensearch-project/opensearch-spark/issues/887

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.

opensearch-trigger-bot[bot] commented 1 week ago

The backport to 0.6 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/opensearch-spark/backport-0.6 0.6
# Navigate to the new working tree
pushd ../.worktrees/opensearch-spark/backport-0.6
# Create a new branch
git switch --create backport/backport-888-to-0.6
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a80aa04b9bbadfe68a3ed0ff59c3edce5251aac6
# Push it to GitHub
git push --set-upstream origin backport/backport-888-to-0.6
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/opensearch-spark/backport-0.6

Then, create a pull request where the base branch is 0.6 and the compare/head branch is backport/backport-888-to-0.6.