Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47624 Collation Implict Casting Support
  3. SPARK-47210

Addition of implicit casting without indeterminate support

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      What changes were proposed in this pull request?
      This PR adds automatic casting and collations resolution as per `PGSQL` behaviour:

      1. Collations set on the metadata level are implicit
      2. Collations set using the `COLLATE` expression are explicit
      3. When there is a combination of expressions of multiple collations the output will be:

      • if there are explicit collations and all of them are equal then that collation will be the output
      • if there are multiple different explicit collations `COLLATION_MISMATCH.EXPLICIT` will be thrown
      • if there are no explicit collations and only a single type of non default collation, that one will be used
      • if there are no explicit collations and multiple non-default implicit ones `COLLATION_MISMATCH.IMPLICIT` will be thrown

      Why are the changes needed?
      We need to be able to compare columns and values with different collations and set a way of explicitly changing the collation we want to use.

      Attachments

        Issue Links

          Activity

            People

              mihailo.milosevic Mihailo Milosevic
              mihailo.milosevic Mihailo Milosevic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: