[GitHub] [carbondata] shenh062326 opened a new pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

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

[GitHub] [carbondata] shenh062326 opened a new pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
shenh062326 opened a new pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559
 
 
    ### Why is this PR needed?
   
   
    ### What changes were proposed in this PR?
   
       
    ### Does this PR introduce any user interface change?
    - No
    - Yes. (please explain the change and update document)
   
    ### Is any new testcase added?
    - No
    - Yes
   
       
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-570565321
 
 
   Build Failed with Spark 2.2.1, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.2/1433/
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-570566332
 
 
   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1445/
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
jackylk commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363072487
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+    sql("create table table1 (col1 string, col2 string) partitioned by(pt string) stored by 'carbondata'")
+    sql("create table table2 (t2_c1 string, t2_c2 string, t2_c3 string) partitioned by(pt string)")
+
+    sql("insert overwrite table table2 partition(pt=20200101) values('v11', 'v12', 'v13')")
+    val e = intercept[Exception] {
+      sql("insert into table1 select * from table2")
+    }
+    assert(e.getMessage.contains("number of columns are different"))
+  }
 
 Review comment:
   You mean in this case, user should use `insert into table1 select t2_c1, t2_c2, pt from table2` after adding new column in table2?

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] shenh062326 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
shenh062326 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363093351
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+    sql("create table table1 (col1 string, col2 string) partitioned by(pt string) stored by 'carbondata'")
+    sql("create table table2 (t2_c1 string, t2_c2 string, t2_c3 string) partitioned by(pt string)")
+
+    sql("insert overwrite table table2 partition(pt=20200101) values('v11', 'v12', 'v13')")
+    val e = intercept[Exception] {
+      sql("insert into table1 select * from table2")
+    }
+    assert(e.getMessage.contains("number of columns are different"))
+  }
 
 Review comment:
   User should also add column in table1 after adding new column in table2. If not, we should throw exception, like parquet table.

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-570918913
 
 
   retest this please

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
jackylk commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363097790
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+    sql("create table table1 (col1 string, col2 string) partitioned by(pt string) stored by 'carbondata'")
+    sql("create table table2 (t2_c1 string, t2_c2 string, t2_c3 string) partitioned by(pt string)")
+
+    sql("insert overwrite table table2 partition(pt=20200101) values('v11', 'v12', 'v13')")
+    val e = intercept[Exception] {
+      sql("insert into table1 select * from table2")
+    }
+    assert(e.getMessage.contains("number of columns are different"))
+  }
 
 Review comment:
   ok, agreed

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-570925051
 
 
   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1482/
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-570992382
 
 
   LGTM

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] xubo245 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
xubo245 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363151748
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
 
 Review comment:
   Please move the test case class: InsertIntoCarbonTableTestCase, no need to create new one.  

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] xubo245 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
xubo245 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363151748
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
 
 Review comment:
   Please move it to insert into test case class: InsertIntoCarbonTableTestCase, no need to create new one.  

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] shenh062326 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
shenh062326 commented on a change in pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#discussion_r363175183
 
 

 ##########
 File path: integration/spark2/src/test/scala/org/apache/spark/sql/CarbonAnalysisTest.scala
 ##########
 @@ -0,0 +1,25 @@
+package org.apache.spark.sql
+
+import org.apache.spark.sql.common.util.Spark2QueryTest
+import org.scalatest.BeforeAndAfterAll
+
+class CarbonAnalysisTest extends Spark2QueryTest with BeforeAndAfterAll {
+
+  override def afterAll(): Unit = {
+    sql("DROP TABLE IF EXISTS table1")
+    sql("DROP TABLE IF EXISTS table2")
+  }
+
+  test("test carbon insert and select table column not equal") {
 
 Review comment:
   done

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571045069
 
 
   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1487/
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571078089
 
 
   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1489/
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
jackylk commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571145666
 
 
   LGTM

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
akashrn5 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571895229
 
 
   PR changes are already merged to master. Closing the PR

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
akashrn5 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571895410
 
 
   @shenh062326 you can close this PR, changes are already present in master.

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] shenh062326 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
shenh062326 commented on issue #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559#issuecomment-571922194
 
 
   > @shenh062326 you can close this PR, changes are already present in master.
   
   ok, I will close it.

----------------------------------------------------------------
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]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] shenh062326 closed pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal

GitBox
In reply to this post by GitBox
shenh062326 closed pull request #3559: [CARBONDATA-3652] Make insert and select table columns equal
URL: https://github.com/apache/carbondata/pull/3559
 
 
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services