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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2, 3.2.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: