Build #50509

Environment variables

NameValue
ANDROID_HOME/home/android-sdk/
AWS_ACCESS_KEY_ID[*******]
AWS_SECRET_ACCESS_KEY[*******]
BUILD_CAUSEGHPRBCAUSE
BUILD_CAUSE_GHPRBCAUSEtrue
BUILD_DISPLAY_NAME#50509
BUILD_ID50509
BUILD_NUMBER50509
BUILD_TAGjenkins-SparkPullRequestBuilder-K8s-50509
BUILD_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50509/
CLASSPATH$CLASSPATH
DBUS_SESSION_BUS_ADDRESSunix:path=/run/user/1001/bus
EXECUTOR_NUMBER7
GITHUB_OAUTH_KEY[*******]
GIT_BRANCHmap_contains_key
GIT_COMMIT54f10b711a97e62556133a39339cdf0de86a30ba
GIT_URLhttps://github.com/apache/spark.git
HOME/home/jenkins
HUDSON_HOME/var/lib/jenkins
HUDSON_SERVER_COOKIE472906e9832aeb79
HUDSON_URLhttps://amplab.cs.berkeley.edu/jenkins/
JAVA_HOME/usr/java/latest
JENKINS_HOME/var/lib/jenkins
JENKINS_SERVER_COOKIE472906e9832aeb79
JENKINS_URLhttps://amplab.cs.berkeley.edu/jenkins/
JOB_BASE_NAMESparkPullRequestBuilder-K8s
JOB_NAMESparkPullRequestBuilder-K8s
JOB_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/
LANGen_US.UTF-8
LOGNAMEjenkins
MOTD_SHOWNpam
NODE_LABELSresearch-jenkins-worker-03 ubuntu ubuntu20
NODE_NAMEresearch-jenkins-worker-03
OLDPWD/home/jenkins
PATH/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.6.3/bin/:/home/jenkins/gems/bin:/usr/local/go/bin:/home/jenkins/go-projects/bin:/home/jenkins/anaconda2/bin:/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.6.3/bin/:/home/jenkins/gems/bin:/usr/local/go/bin:/home/jenkins/go-projects/bin:/home/jenkins/anaconda2/bin:$PATH
PWD/home/jenkins
ROOT_BUILD_CAUSEGHPRBCAUSE
ROOT_BUILD_CAUSE_GHPRBCAUSEtrue
RUN_ARTIFACTS_DISPLAY_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50509/display/redirect?page=artifacts
RUN_CHANGES_DISPLAY_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50509/display/redirect?page=changes
RUN_DISPLAY_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50509/display/redirect
RUN_TESTS_DISPLAY_URLhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50509/display/redirect?page=tests
SHELL/bin/bash
SHLVL0
SSH_CLIENT192.168.10.11 46704 22
SSH_CONNECTION192.168.10.11 46704 192.168.10.23 22
USERjenkins
WORKSPACE/home/jenkins/workspace/SparkPullRequestBuilder-K8s
XDG_RUNTIME_DIR/run/user/1001
XDG_SESSION_CLASSuser
XDG_SESSION_ID1
XDG_SESSION_TYPEtty
_/usr/java/latest/bin/java
ghprbActualCommit38f71ffb23b3a08578992478ac8ed6c8eb201cce
ghprbActualCommitAuthorGengliang Wang
ghprbActualCommitAuthorEmailgengliang@apache.org
ghprbAuthorRepoGitUrlhttps://github.com/gengliangwang/spark.git
ghprbCommentBodynull
ghprbCredentialsIdb7d94526-9e9b-435f-9275-d7dbf209f4a3
ghprbGhRepositoryapache/spark
ghprbPullAuthorEmailltnwgl@gmail.com
ghprbPullAuthorLogingengliangwang
ghprbPullAuthorLoginMention@gengliangwang
ghprbPullDescriptionGitHub pull request #34836 of commit 38f71ffb23b3a08578992478ac8ed6c8eb201cce, no merge conflicts.
ghprbPullId34836
ghprbPullLinkhttps://github.com/apache/spark/pull/34836
ghprbPullLongDescription<!--\r\nThanks for sending a pull request!  Here are some tips for you:\r\n  1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html\r\n  2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html\r\n  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.\r\n  4. Be sure to keep the PR description updated to reflect all changes.\r\n  5. Please write your PR title to summarize what this PR proposes.\r\n  6. If possible, provide a concise example to reproduce the issue for a faster review.\r\n  7. If you want to add a new configuration, please read the guideline first for naming configurations in\r\n     'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.\r\n  8. If you want to add or modify an error type or message, please read the guideline first in\r\n     'core/src/main/resources/error/README.md'.\r\n-->\r\n\r\n### What changes were proposed in this pull request?\r\n<!--\r\nPlease clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. \r\nIf possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.\r\n  1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.\r\n  2. If you fix some SQL features, you can provide some references of other DBMSes.\r\n  3. If there is design documentation, please add the link.\r\n  4. If there is a discussion in the mailing list, please add the link.\r\n-->\r\nAdd a new function map_contains_key, which returns true if the map contains the key\r\n\r\nExamples:\r\n```\r\n> SELECT map_contains_key(map(1, 'a', 2, 'b'), 1);\r\ntrue\r\n> SELECT map_contains_key(map(1, 'a', 2, 'b'), 3);\r\nfalse\r\n```\r\n### Why are the changes needed?\r\n<!--\r\nPlease clarify why the changes are needed. For instance,\r\n  1. If you propose a new API, clarify the use case for a new API.\r\n  2. If you fix a bug, you can clarify why it is a bug.\r\n-->\r\nCurrently there is no such a function to check if a key exists in a map.\r\nSQL users have to use `map.key is not null` or `array_contains(map_keys(map))` as a workaround.\r\nTo make it more convenient, we should add a new function `map_contains_key`.\r\n\r\n### Does this PR introduce _any_ user-facing change?\r\n<!--\r\nNote that it means *any* user-facing change including all aspects such as the documentation fix.\r\nIf yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.\r\nIf possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.\r\nIf no, write 'No'.\r\n-->\r\nYes, a new function map_contains_key which returns true if the map contains the key\r\n\r\n### How was this patch tested?\r\n<!--\r\nIf tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.\r\nIf it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.\r\nIf tests were not added, please describe why they were not added and/or why it was difficult to add.\r\nIf benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.\r\n-->\r\nUnit tests
ghprbPullTitle[SPARK-37584][SQL] New SQL function: map_contains_key
ghprbSourceBranchmap_contains_key
ghprbTargetBranchmaster
ghprbTriggerAuthor
ghprbTriggerAuthorEmail
ghprbTriggerAuthorLogin
ghprbTriggerAuthorLoginMention
sha1origin/pr/34836/merge