GitHub user kunal642 opened a pull request:
https://github.com/apache/carbondata/pull/1493 [CARBONDATA-1528] [PreAgg] Restrict alter for pre-aggregate tables Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [X] Any interfaces changed? - [X] Any backward compatibility impacted? - [X] Document update required? - [X] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - Any additional information to help reviewers in testing this change. - [X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kunal642/carbondata alter_preaggreagate_support Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1493.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1493 ---- commit ca863f0898706677c9a5ca941318f9f54ec558c2 Author: kunal642 <[hidden email]> Date: 2017-11-13T18:53:11Z restrict alter for pre-aggregate tables ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1493 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1081/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1493 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1684/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1493 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1082/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1493 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1083/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1493#discussion_r150668515 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateListeners.scala --- @@ -94,23 +93,43 @@ object PreAggregateDataTypeChangePreListener extends OperationEventListener { val carbonTable = dataTypeChangePreListener.carbonTable val alterTableDataTypeChangeModel = dataTypeChangePreListener.alterTableDataTypeChangeModel val columnToBeAltered: String = alterTableDataTypeChangeModel.columnName - val dataMapSchemas = carbonTable.getTableInfo.getDataMapSchemaList - if (dataMapSchemas != null && !dataMapSchemas.isEmpty) { + if (carbonTable.hasDataMapSchema) { + val dataMapSchemas = carbonTable.getTableInfo.getDataMapSchemaList dataMapSchemas.asScala.foreach { dataMapSchema => - val childColumns = dataMapSchema.getChildSchema.getListOfColumns - if (childColumns.asScala.exists(_.getColumnName.equalsIgnoreCase(columnToBeAltered))) { - throw new UnsupportedOperationException(s"Column $columnToBeAltered exists in a " + - s"pre-aggregate table ${ dataMapSchema.toString - }. Cannot change datatype") - } + val childColumns = dataMapSchema.getChildSchema.getListOfColumns + val parentColumnNames = childColumns.asScala + .flatMap(_.getParentColumnTableRelations.asScala.map(_.getColumnName)) + if (parentColumnNames.contains(columnToBeAltered)) { + throw new UnsupportedOperationException(s"Column $columnToBeAltered exists in a " + --- End diff -- split after the argument like ``` UnsupportedOperationException( s"Column $columnToBeAltered exists in ``` --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1493 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1685/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1493 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1086/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1493 LGTM --- |
In reply to this post by qiuchenjian-2
|
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1493 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1686/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1493 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1687/ --- |
Free forum by Nabble | Edit this page |