File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ abstract class InternalRow extends SpecializedGetters with Serializable {
6363   */  
6464  def  copy ():  InternalRow 
6565
66-   def  copyUnsafeData (dataTypeJson : String ):  InternalRow  =  {
67-     val  dataType  =  DataType .fromJson(dataTypeJson )
66+   def  copyUnsafeData (dataTypeCatalogString : String ):  InternalRow  =  {
67+     val  dataType  =  DataType .fromDDL(dataTypeCatalogString )
6868    assert(dataType.isInstanceOf [StructType ])
6969    copyUnsafeData(dataType.asInstanceOf [StructType ])
7070  }
Original file line number Diff line number Diff line change @@ -889,8 +889,7 @@ case class MapObjects private(
889889
890890    //  Make a copy of the unsafe data if the result contains any
891891    def  makeCopyUnsafeData (dataType : DataType , value : String ) =  {
892-       val  typeToJson  =  StringEscapeUtils .escapeJava(StringEscapeUtils .escapeJson(dataType.json))
893-       s """ ${value}.copyUnsafeData(" ${typeToJson}") """ 
892+       s """ ${value}.copyUnsafeData(" ${dataType.catalogString}") """ 
894893    }
895894
896895    val  genFunctionValue :  String  =  lambdaFunction.dataType match  {
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ abstract class ArrayData extends SpecializedGetters with Serializable {
6868
6969  def  copy ():  ArrayData 
7070
71-   def  copyUnsafeData (dataTypeJson : String ):  ArrayData  =  {
72-     val  dataType  =  DataType .fromJson(dataTypeJson )
71+   def  copyUnsafeData (dataTypeCatalogString : String ):  ArrayData  =  {
72+     val  dataType  =  DataType .fromDDL(dataTypeCatalogString )
7373    assert(dataType.isInstanceOf [ArrayType ])
7474    copyUnsafeData(dataType.asInstanceOf [ArrayType ])
7575  }
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ abstract class MapData extends Serializable {
3535
3636  def  copy ():  MapData 
3737
38-   def  copyUnsafeData (dataTypeJson : String ):  MapData  =  {
39-     val  dataType  =  DataType .fromJson(dataTypeJson )
38+   def  copyUnsafeData (dataTypeCatalogString : String ):  MapData  =  {
39+     val  dataType  =  DataType .fromDDL(dataTypeCatalogString )
4040    assert(dataType.isInstanceOf [MapType ])
4141    copyUnsafeData(dataType.asInstanceOf [MapType ])
4242  }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments