Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5831

Add SOUNDEX function(enabled in Spark library)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.34.0
    • 1.36.0
    • core

    Description

      Hi, devs. I noticed that calcite support soundex for BIG_QUERY, MYSQL, POSTGRESQL, ORACLE dialect except Spark. i think we can support it.

      soundex(str) - Returns Soundex code of the string.

      Examples:

      > SELECT soundex('Miller');
      M460

      https://spark.apache.org/docs/latest/api/sql/index.html#soundex

       

      Note: currently soundex for BIG_QUERY, MYSQL, POSTGRESQL, ORACLE dialect throw IllegalArgumentException when string can't be mapped. However, spark not throw exception but return original string.

      https://github.com/apache/spark/blob/c37d7dec8aa4d703b6dac9b9d60ff25d9d5dc665/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L1595

      Attachments

        Issue Links

          Activity

            People

              taoran Ran Tao
              taoran Ran Tao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: