Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35359

Insert data with char/varchar datatype will fail when data length exceed length limitation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.2, 3.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      In Spark3.1.1 have support Char/Varchar type, but when insert data with char/varchar datatype will fail when data length exceed length limitation even when spark.sql.legacy.charVarcharAsString is true.

      reproduce:

      create table chartb01(a char(3));

      insert into chartb01 select 'aaaaa';

        Attachments

          Activity

            People

            • Assignee:
              yghu YuanGuanhu
              Reporter:
              yghu YuanGuanhu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: