Login  Register

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #4021: [CARBONDATA-4057] Support Complex DataType when Save DataFrame with MODE.OVERWRITE

Posted by GitBox on Nov 25, 2020; 3:10pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-marchpure-opened-a-new-pull-request-4021-WIP-Support-Complex-DataType-in-DataFramee-tp103506p103586.html


ajantha-bhat commented on a change in pull request #4021:
URL: https://github.com/apache/carbondata/pull/4021#discussion_r530444909



##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/CarbonDataFrameWriter.scala
##########
@@ -74,6 +74,9 @@ class CarbonDataFrameWriter(sqlContext: SQLContext, val dataFrame: DataFrame) {
       case decimal: DecimalType => s"decimal(${decimal.precision}, ${decimal.scale})"
       case BooleanType => CarbonType.BOOLEAN.getName
       case BinaryType => CarbonType.BINARY.getName
+      case ArrayType(elementType, _) => sparkType.simpleString
+      case StructType(fields) => sparkType.simpleString
+      case MapType(keyType, valueType, _) => sparkType.simpleString

Review comment:
       yes, for spark all string is varchar itself.
   But for carbon if we mention long_string_columns in table properties we change data type from carbonType.string --> carbonType.varchar
   for dataframe I think options("long_string_columns"="c1,c2") is not yet supported. So, current changes are ok




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]