Vinod KC created SPARK-58951:
--------------------------------

             Summary: Support non-binary collations in collect_set
                 Key: SPARK-58951
                 URL: https://issues.apache.org/jira/browse/SPARK-58951
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 4.4.0
            Reporter: Vinod KC


`collect_set` currently rejects non-binary collated string inputs with an
UNSUPPORTED_INPUT_TYPE error:

 
{code:java}
CREATE OR REPLACE TEMP VIEW v AS
  SELECT CAST(s AS STRING COLLATE UTF8_LCASE) AS s
  FROM VALUES ('foo'), ('FOO'), ('bar') AS raw(s);
  SELECT collect_set(s) FROM v;
  -- [DATATYPE_MISMATCH.UNSUPPORTED_INPUT_TYPE] ... collect_set ...
{code}
 

`collect_set` should support collated strings and return one representative per 
collation-equal group.

For the view above, 'foo' and 'FOO' are equal under UTF8_LCASE, so the result 
should have 2 elements.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to