spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenghao-intel <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8271][SQL]string function: soundex
Date Thu, 23 Jul 2015 06:04:54 GMT
Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7115#discussion_r35292197
  
    --- Diff: unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
    @@ -628,4 +634,93 @@ public int hashCode() {
         }
         return result;
       }
    +
    +  /**
    +   * Encodes a string into a Soundex value. Soundex is an encoding used to relate similar
names,
    +   * but can also be used as a general purpose scheme to find word with similar phonemes.
    +   * https://en.wikipedia.org/wiki/Soundex
    +   */
    +  public UTF8String soundex() {
    +    if (numBytes == 0) {
    +      return UTF8String.fromBytes(new byte[0]);
    --- End diff --
    
    Why can't we do thing right in the first place?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message