You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by mohammadshahidkhan <gi...@git.apache.org> on 2018/07/27 07:28:01 UTC

[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 <mo...@...>
Date:   2018-07-27T07:21:49Z

    [CARBONDATA-2792][schema restructure] Create external table fails post schema restructure.

----


---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7721/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7662/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7559/



---

[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/2571


---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6082/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6326/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6418/



---

[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...

Posted by mohammadshahidkhan <gi...@git.apache.org>.
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 issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7637/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7686/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    retest this please



---

[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...

Posted by KanakaKumar <gi...@git.apache.org>.
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 ...

Posted by mohammadshahidkhan <gi...@git.apache.org>.
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 issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6311/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6447/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7692/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6363/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6114/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    retest sdv please



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    LGTM


---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    retest this please



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7569/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    LGTM


---

[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...

Posted by mohammadshahidkhan <gi...@git.apache.org>.
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 issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7681/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6379/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6412/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6084/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by mohammadshahidkhan <gi...@git.apache.org>.
Github user mohammadshahidkhan commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    retest sdv please


---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6029/



---

[GitHub] carbondata issue #2571: [CARBONDATA-2792][schema restructure] Create externa...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2571
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6393/



---

[GitHub] carbondata pull request #2571: [CARBONDATA-2792][schema restructure] Create ...

Posted by kunal642 <gi...@git.apache.org>.
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).


---