Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isempty #676

Merged
merged 5 commits into from
Sep 19, 2024
Merged

Isempty #676

merged 5 commits into from
Sep 19, 2024

Conversation

lukasz-soszynski-eliatra
Copy link
Contributor

Description

Describe what this change achieves.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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.

kt-eliatra and others added 5 commits September 18, 2024 11:39
@@ -557,7 +566,29 @@ public Expression visitKmeans(Kmeans node, CatalystPlanContext context) {

@Override
public Expression visitCase(Case node, CatalystPlanContext context) {
throw new IllegalStateException("Not Supported operation : Case");
analyze(node.getElseClause(), context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this related to the isEmpty ? can u please elaborate ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isempty function is implemented using the Case statement. Please see: https://github.com/eliatra/opensearch-spark/blob/c270360f45264b4b1c7d177d5cc405f7c6fc94f0/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/expression/IsEmpty.java#L11

The isempty function is translated into:

SELECT CASE  
       WHEN length(trim(column_name)) = 0 THEN true 
        ELSE false     
END AS is_empty

@YANG-DB YANG-DB merged commit a7fe6e6 into opensearch-project:main Sep 19, 2024
7 checks passed
@opensearch-trigger-bot
Copy link

The backport to 0.5-nexus 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.5-nexus 0.5-nexus
# Navigate to the new working tree
pushd ../.worktrees/opensearch-spark/backport-0.5-nexus
# Create a new branch
git switch --create backport/backport-676-to-0.5-nexus
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a7fe6e644b750b1a07294b8104d0fc0ab67287c1
# Push it to GitHub
git push --set-upstream origin backport/backport-676-to-0.5-nexus
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/opensearch-spark/backport-0.5-nexus

Then, create a pull request where the base branch is 0.5-nexus and the compare/head branch is backport/backport-676-to-0.5-nexus.

@opensearch-trigger-bot
Copy link

The backport to 0.5 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.5 0.5
# Navigate to the new working tree
pushd ../.worktrees/opensearch-spark/backport-0.5
# Create a new branch
git switch --create backport/backport-676-to-0.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a7fe6e644b750b1a07294b8104d0fc0ab67287c1
# Push it to GitHub
git push --set-upstream origin backport/backport-676-to-0.5
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/opensearch-spark/backport-0.5

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.5 0.6 backport 0.5-nexus Lang:PPL Pipe Processing Language support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants