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

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
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 <mohdshahidkhan1987@...>
Date:   2018-07-27T07:21:49Z

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

----


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user mohammadshahidkhan commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user brijoobopanna commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user KanakaKumar commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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).


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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)


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
12