[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user asfgit closed the pull request at: https://github.com/apache/carbondata/pull/2571 ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user mohammadshahidkhan commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2571#discussion_r206525134 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/util/CarbonSparkUtil.scala --- @@ -87,18 +88,20 @@ object CarbonSparkUtil { val fields = new Array[String]( carbonRelation.dimensionsAttr.size + carbonRelation.measureAttr.size) val carbonTable = carbonRelation.carbonTable +val columnSchemas: mutable.Buffer[ColumnSchema] = carbonTable.getTableInfo.getFactTable. + getListOfColumns.asScala.filter(_.getSchemaOrdinal != -1).filter(!_.isInvisible). --- End diff -- @kunal642 Changed the filter condition from && to ||, the earlier filters were serving the OR. ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user mohammadshahidkhan commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2571#discussion_r206503427 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/util/CarbonSparkUtil.scala --- @@ -87,18 +88,20 @@ object CarbonSparkUtil { val fields = new Array[String]( carbonRelation.dimensionsAttr.size + carbonRelation.measureAttr.size) val carbonTable = carbonRelation.carbonTable +val columnSchemas: mutable.Buffer[ColumnSchema] = carbonTable.getTableInfo.getFactTable. + getListOfColumns.asScala.filter(_.getSchemaOrdinal != -1).filter(!_.isInvisible). --- End diff -- @kunal642 change to val columnSchemas: mutable.Buffer[ColumnSchema] = carbonTable.getTableInfo.getFactTable. getListOfColumns.asScala .filter(cSchema => cSchema.getSchemaOrdinal != -1 && !cSchema.isInvisible). sortWith(_.getSchemaOrdinal < _.getSchemaOrdinal) ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user kunal642 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2571#discussion_r206480372 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/util/CarbonSparkUtil.scala --- @@ -87,18 +88,20 @@ object CarbonSparkUtil { val fields = new Array[String]( carbonRelation.dimensionsAttr.size + carbonRelation.measureAttr.size) val carbonTable = carbonRelation.carbonTable +val columnSchemas: mutable.Buffer[ColumnSchema] = carbonTable.getTableInfo.getFactTable. + getListOfColumns.asScala.filter(_.getSchemaOrdinal != -1).filter(!_.isInvisible). --- End diff -- both filter conditions can be combined to one like .filter(a>2 && b<10). ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user mohammadshahidkhan commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2571#discussion_r206425523 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/createTable/TestCreateExternalTable.scala --- @@ -111,5 +115,13 @@ class TestCreateExternalTable extends QueryTest with BeforeAndAfterAll { } assert(exception.getMessage().contains("Create external table as select")) } + test("create external table with post schema resturcture") { --- End diff -- @KanakaKumar Thanks for review. I have modified the test case to validate the data post restructure and external table creation. Please review once. ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
Github user KanakaKumar commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2571#discussion_r206152587 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/createTable/TestCreateExternalTable.scala --- @@ -111,5 +115,13 @@ class TestCreateExternalTable extends QueryTest with BeforeAndAfterAll { } assert(exception.getMessage().contains("Create external table as select")) } + test("create external table with post schema resturcture") { --- End diff -- Please do insert some data and add assertion for data after create external table. ---
[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...
GitHub user mohammadshahidkhan opened a pull request: https://github.com/apache/carbondata/pull/2571 [CARBONDATA-2792][schema restructure] Create external table fails post schema restructure. ⦠Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [X] Any interfaces changed? NA - [X] Any backward compatibility impacted? NA - [X] Document update required? NA - [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. added test case to validate the create external table post restructure scenario. - [X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. NA You can merge this pull request into a Git repository by running: $ git pull https://github.com/mohammadshahidkhan/incubator-carbondata schema_restructure_fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2571.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 #2571 commit eb538ff122a40cd29eea326a525fe801a247aab0 Author: mohammadshahidkhan Date: 2018-07-27T07:21:49Z [CARBONDATA-2792][schema restructure] Create external table fails post schema restructure. ---