[GitHub] [carbondata] akkio-97 commented on a change in pull request #4115: [CARBONDATA-4163] Support adding of single-level complex columns(array/struct)
Posted by
GitBox on
Apr 16, 2021; 10:48am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-akkio-97-opened-a-new-pull-request-4115-WIP-tp107304p107663.html
akkio-97 commented on a change in pull request #4115:
URL:
https://github.com/apache/carbondata/pull/4115#discussion_r614670056##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala
##########
@@ -235,6 +236,26 @@ class AlterTableColumnSchemaGenerator(
dataType.toString.equals("STRUCT")
}
+ private def createChildSchema(childField: Field, currentSchemaOrdinal: Int): ColumnSchema = {
+ // TODO: should support adding multi-level complex columns: CARBONDATA-4164
+ if (!childField.children.contains(null)) {
Review comment:
isDefined cannot be used because it contains Some(null) in case of single-level and a field in case of multi-level.
So isDefined is true in both cases
--
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]