kazantsev-maksim commented on code in PR #20725: URL: https://github.com/apache/datafusion/pull/20725#discussion_r2935592447
########## datafusion/sqllogictest/test_files/spark/string/soundex.slt: ########## @@ -15,13 +15,37 @@ # specific language governing permissions and limitations # under the License. -# This file was originally created by a porting script from: -# https://github.com/lakehq/sail/tree/43b6ed8221de5c4c4adbedbb267ae1351158b43c/crates/sail-spark-connect/tests/gold_data/function -# This file is part of the implementation of the datafusion-spark function library. -# For more information, please see: -# https://github.com/apache/datafusion/issues/15914 - -## Original Query: SELECT soundex('Miller'); -## PySpark 3.5.5 Result: {'soundex(Miller)': 'M460', 'typeof(soundex(Miller))': 'string', 'typeof(Miller)': 'string'} -#query -#SELECT soundex('Miller'::string); +query T +SELECT soundex('Miller'); +---- +M460 + +query T +SELECT soundex(NULL); +---- +NULL + +query T +SELECT soundex(''); +---- +(empty) + +query T +SELECT soundex('Apache Spark'); +---- +A122 + +query T +SELECT soundex('123'); +---- +123 + +query T +SELECT soundex('a123'); +---- +A000 + +query T +SELECT soundex('Datafusion'); +---- +D312 Review Comment: Big thanks to @davidlghellin for the test cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
