GitHub user davies opened a pull request:
https://github.com/apache/spark/pull/7900
[Spark-8244][SQL] string function: find in set
This PR is based on #7186 (just fix the conflict), thanks to @tarekauel .
find_in_set(string str, string strList): int
Returns the first occurance of str in strList where strList is a
comma-delimited string. Returns null if either argument is null. Returns 0 if
the first argument contains any commas. For example, find_in_set('ab',
'abc,b,ab,c,def') returns 3.
Only add this to SQL, not DataFrame.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/davies/spark find_in_set
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7900.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #7900
----
commit 1c2bbb76e22d5037aca12ae1ceec5956b68f2aa7
Author: Tarek Auel <[email protected]>
Date: 2015-07-02T09:20:51Z
[SPARK-8244] findInSet
commit e3b20c875d7d01cf6f3b2cdd94d719fe96abe2d4
Author: Tarek Auel <[email protected]>
Date: 2015-07-02T09:25:59Z
[SPARK-8244] added type check
commit 4f75a653da4f11042a18181cc567ff4690b0fa58
Author: Tarek Auel <[email protected]>
Date: 2015-07-09T04:29:02Z
Merge branch 'master' into SPARK-8244
# Conflicts:
#
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
#
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
#
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringFunctionsSuite.scala
commit 61b8ca2bb3b6583623066c1a84de0e45c95aa1cf
Author: Tarek Auel <[email protected]>
Date: 2015-07-09T04:58:17Z
[SPARK-8224] removed loop and split; use unsafe String comparison
commit 66c7fda342359756ce9b812012f06c7c2dcd7a90
Author: Tarek Auel <[email protected]>
Date: 2015-07-19T06:41:31Z
Merge branch 'master' into SPARK-8244
# Conflicts:
#
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
#
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
# unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
commit 71b2e692feca540dad263016da7f1510a1e9da1f
Author: Tarek Auel <[email protected]>
Date: 2015-07-19T07:41:01Z
[SPARK-8244] find_in_set
commit 208d71029f397416b7df0bc456b6e57ac2b48afb
Author: Tarek Auel <[email protected]>
Date: 2015-07-21T06:42:17Z
[SPARK-8244] address comments & bug fix
commit 0d05df5ec4d0b7f95e6a5ab2ea84e8ddc405ac02
Author: Tarek Auel <[email protected]>
Date: 2015-07-21T06:43:49Z
Merge branch 'master' into SPARK-8244
# Conflicts:
# unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
commit e4093a43c89ec2fd76a77d08fe73b264e1918718
Author: Tarek Auel <[email protected]>
Date: 2015-07-21T08:45:34Z
[SPARK-8244][SQL] final modifier for COMMA_UTF8
commit 1aaf64ea16491b70f6781f35104e52fbb0fd2567
Author: Tarek Auel <[email protected]>
Date: 2015-07-21T17:44:00Z
[SPARK-8244][SQL] unit test fix
commit 243ede4b39ef9b8ea86590bfac62e69f069e7212
Author: Tarek Auel <[email protected]>
Date: 2015-07-21T18:51:25Z
[SPARK-8244][SQL] hive compatibility
commit 8f005721a4e59cbac6d4c3d09a038e6be5ed86f1
Author: Davies Liu <[email protected]>
Date: 2015-08-03T18:36:20Z
Merge branch 'master' of github.com:apache/spark into find_in_set
Conflicts:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]